Architecture
Traditional Decentralized Exchanges (DEXes) run entirely on-chain. This subjects their transaction ordering, and consequently user outcomes, to the priorities of block proposers and builders, often leading to value extraction (see The Problem).
To reclaim control over its transaction lifecycle, Angstrom adopts a hybrid architecture that separates the off-chain trade processing & sequencing from the on-chain settlement. This design paradigm, known as App-Specific Sequencing, allows Angstrom to implement its own sequencing rules, ensuring that user orders are executed fairly and efficiently, while also capturing value that would otherwise be lost to external searchers or block builders.
1. The Angstrom Validator Network
The validator network is responsible for processing and sequencing every trade. This includes order intake, gossiping & consensus, running the arbitrage and batch auctions, and finally assembling the compressed batch transaction for on-chain settlement.
-
Composition
A decentralized set of staked validators running a sidecar module alongside a standard Rust Ethereum execution client (Reth). -
Core Responsibilities
- Order Intake & Gossiping
Receive signed user swaps & arbitrage bids, verify signatures & balances, and gossip them across the network. - Sequencing
Continuously run the Arbitrage Auction and Batch Auction as new orders are received to pick the winning arb trade and uniform-price batch each block. - Batch Assembly
Near block cut-off, the leader aggregates all views into an optimal batch and submits it to builders & the public mempool. - Consensus
Run Angstrom’s custom consensus protocol to confirm the batch transactionf matches the agreed-upon optimal outcome—any leader misbehavior incurs slashing.
- Order Intake & Gossiping
2. Protected Liquidity Pools
A cornerstone of Angstrom's architecture is its use of Protected Liquidity Pools on Uniswap V4. These pools are secured by a custom Angstrom hook, which controls initial access each block by strictly ensuring that only Angstrom's staked validators can submit and execute the first transaction against the pool – this being the official Angstrom-sequenced batch.
The purpose of this "pool lock" is to ensure that Angstrom's core market-rebalancing mechanisms—the Arbitrage Auction and the uniform clearing price discovery of the Batch Auction—conclude before the pool is opened for general interaction. This prevents these processes from being undermined by direct swaps that frontrun the batch to exploit stale prices.
Importantly, this swap protection mechanism does not affect Liquidity Providers' (LPs) ability to deposit or withdraw their liquidity directly from the Uniswap V4 pools at any time.
-
Hook-Controlled Access & Initial Lock The Angstrom hook acts as the gatekeeper. At the start of each block, the pools are locked to direct public swaps. Only an authorized Angstrom validator, can execute swaps against these pools.
-
Settlement, Rebalancing, and Subsequent Unlock The Angstrom batch, which is a single ethereum transaction, first settles all Angstrom-sequenced trades from the Arbitrage Auction and Batch Auction. This step effectively rebalances the pool to reflect fair market prices. Immediately following this rebalancing the pool is unlocked. This makes the newly rebalanced pool available for general DeFi interactions for the remainder of the block. (The specifics of different unlock scenarios are detailed in Pool Unlock).
-
Key Benefits of This Design
- Fair Pricing & Order Integrity: The initial lock guarantees that Angstrom's rebalancing mechanisms operate without interference or need for ordering priority. When the pool subsequently unlocks, anyone can interact with the pools that reflects up-to-date, fair prices. This is integral to Angstrom's App-Specific Sequencing model.
- Preserved Composability: Once Angstrom's settlement is complete and the rebalanced pool is unlocked, it functions as a standard Uniswap V4 pool, ensuring seamless composability with other DeFi protocols.
Interplay and Flow
In essence, the Angstrom system operates through a coordinated flow:
- Users submit their signed orders to the Angstrom Off-Chain Network.
- This network processes these orders through its app-specific mempool, auction mechanisms, and consensus protocol, culminating in an optimized batch transaction.
- The batch is optimistically submitted by the leader for on-chain execution.
- The Angstrom hook executes the batch, settling all trades atomically and updating the pool states.
For a more detailed step-by-step depiction of this entire process, please see the Flow of an Order document.
Architectural Advantages
This hybrid, two-component architecture is fundamental to Angstrom's ability to:
- Effectively implement robust App-Specific Sequencing, thereby shielding users from harmful MEV like front-running and sandwich attacks.
- Internalize and redirect arbitrage value that would typically be lost, instead returning it to Liquidity Providers.
- Provide fairer, more predictable trade execution and pricing for all users.
- Optimize gas usage through the batching.
- Improve user UX, via a gasless one click experience.
Next Steps
To gain a deeper understanding of specific functionalities and concepts within Angstrom:
- Follow the complete lifecycle of a trade in Flow of an Order.
- Deepen your understanding of App-Specific Sequencing, which is central to Angstrom's design.
- Explore our core mechanisms such as the Arbitrage Auction, Batch Auction, and Pool Unlock.