10
20
30
40
50
60
70
80
90
100
Dec 17, 2024We Built the Fastest Rollup on Ethereum, then left

At N1 (formerly Layer N), our guiding ambition is to build onchain consumer apps that rival their Web2 and centralized counterparts. Exceptional UX and performance are crucial to onboarding the next cohort of Web3 users, fuelling the innovation flywheel for increasingly advanced apps. However, while pursuing performance, we remain steadfast in upholding the ethos of decentralization and security.

Our journey began in the turbulent aftermath of the FTX and Luna collapses in the summer of 2022 when trust in centralized cryptosystems was at an all-time low.

2022: The Genesis of Nord

This challenging environment inspired the creation of Nord, our ambitious project to develop a self-custody decentralized exchange (DEX) specific rollup that matches the performance and throughput of centralized exchanges while maintaining the shared security of permissionless blockchains. Over the next year, we solved a series of complex technical challenges to create Nord, the highest-throughput exchange-specific rollup built on Ethereum. Here are some of our key breakthroughs:

1. Achieving Persistent Write-Bound Performance

The Nord execution environment was designed to scale to the latency limits of physical persistence (storage) while ensuring fast reads from RAM. We inverted the traditional "log-before-execution" journaling paradigm, instead executing first and logging successful operations using a single disk write. This required modifications to journaling and snapshotting/recovery logic to preserve ACID durability properties.

Our optimized transaction pipeline—Execute, Log, Periodically Sync Snap—allowed us to push throughput from 40K to over 200K TPS, constrained only by the SSD’s write throughput and latency. We experimented with AWS, GCP, and bare-metal machines, ultimately finding that AWS’s CX5 instances offered the best SSD performance. RAM handled the entire read workload, while boot recovery was accelerated through asynchronous snapshotting on a separate machine, ensuring Nord’s logical state was always up-to-date outside the critical performance path.

2. Ensuring Fault Tolerance and Operational Integrity

Our high-speed central limit order book (CLOB) needed robust fault tolerance. Transactions on Nord are replicated at three levels, each with distinct functionalities:

  • Level 1: Journals on the Nord server are stored on RAID-5 SSDs, offering resilience against disk failures.
  • Level 2: Journals are streamed via QUIC to a secondary server, Rollman, which manages proving and settling updates to the L1.
  • Level 3: Rollman streams the journal to EigenDA, a high-throughput data availability (DA) layer that guarantees availability for the latest transaction epoch.

Performance tuning culminated in saturating EigenDA’s feed, overcoming this final bottleneck to unlock the full potential of Nord.

3. Pioneering zkFraud Proofs for Faster Settlement

Rollups traditionally rely on zkProofs or optimistic proofs for settlement, each with significant drawbacks: zkProofs are slow, and optimistic proofs involve long challenge windows. We introduced zkFraud Proofs, a hybrid mechanism that optimistically settles transactions but resolves state conflicts using zkProofs. This approach eliminates the interactivity delays associated with optimistic challenges while achieving rapid finality.

In summary, our innovations created a fully optimized data workflow and pipeline for high-performance DEXs operating on permissionless L1s. For high-frequency trading (HFT) enthusiasts, Layer N is the spiritual successor to the LMAX architecture—reimagined for Web3 and decentralization.

Why leave?

Our DEX-specific rollup achieved unparalleled performance without compromising decentralization, becoming the first team to saturate EigenDA’s bandwidth allocation of 2 MBps. This milestone proved our ability to support multiple dApps, bringing Web3 infrastructure closer to the performance of traditional systems.

Despite achieving high performance metrics and being mainnet-ready, we recognized that long-term success required a different path. At a high level, Ethereum was not designed to be a lean base layer for L2 execution. Ethereum’s settlement latency significantly impacts L2 settlement time. Even with offchain DA layers, just 1MiB of data results in expensive transactions, which in the long run, is unsustainable. These bandwidth and latency constraints stem from consensus, finality, and noisy neighbor problems, that are all solved on our own settlement layer specifically designed to scale an app-centric execution layer.

Furthermore, we were constrained by dependencies and constraints from multiple other teams—each with their own priorities, timelines, and roadmaps. Even with extreme execution optimization, we had no control over critical components like settlement and data availability, which are crucial to hyper-optimize performance. This left us with two options: build endless workarounds in a system with many constraints out of our control, or take ownership of the entire stack and redesign it from first principles.

The only way to deliver truly unparalleled performance is to own the entire stack—from settlement to execution. This decision enables us to redefine blockchain infrastructure for long-term success.

To learn more, visit docs.n1.xyz.