Author: Henry Poon, IOSG
Summary of Content:
Let’s start with Why.
What is Unichain? 4 major features:
1/Rollup-Boost & Sequencer Builder Separation
2/Block Building in TEE
3/Flashblock
4/Unichain Validation network
A comparison between Unichain vs General Rollup vs Appchain
Summary and Takeaways
Let’s start with Why.
Over the years, Uniswap Lab has been consistently pushing features and innovations that make swaps more friendly and fairer for users. For instance, we see Uniswap mobile, Fillers Network in UniswapX, ERC-7682 for unified cross-chain intent standards, and soon, hooks in Uniswap V4 that open up for customized AMM pools and so on.
On October 10, Uniswap announced their general optimistic rollup, Unichain. This chain aims to be the one-stop liquidity hub within the superchain ecosystem, offering traders a near-instant swapping experience while ensuring a tamperproof process for MEV participants through the use of TEEs in the process.
While the visions are impressive, users have questioned the need for another L2, some, including Vitalik, commenting Unichain = “A copy of Uniswap on every rollup does”. In other words, he argues that launching a Uniswap clone on a new chain serves the same purpose as launching Unichain itself.
So, is Unichain bullish or bearish? Today’s article will explore Unichain’s architecture and understand the reasons behind its creation.
What is Unichain?
Unichain is an optimistic rollup designed to execute near-instant transactions while using privacy tech TEEs to minimise the potential impact to LPs and swapper on the chain.
Since Unichain is built with the same properties and standards as other optimistic rollup chains, it can now leverage interoperability within the superchain ecosystem and access shared liquidity across the network.
To do it, Unichain brings 4 major innovations to the table:
- Rollup-Boost & Sequencer Builder Separation
- Block Building in TEE
- Flashblock
- Unichain Validation network
Rollup Boost: Sequencer Proposer Separation (SBS):
Block sequencing is always the key to address MEV issues.
Before MEV Boost, Ethereum was plagued by censorship risks and a terrible user experience. Users faced high transaction fees and front-running issues due to the intense competition between searchers for profit driven order inclusion. To address these issues, flashbot built MEV-boost.
MEV Boost separated the role of block builders and proposers by introducing a relayer to aggregate their bids and submit the most profitable blocks to proposers to sign. This design effectively decentralised the MEV extraction process and democratise MEV profit between validators and specialised builders.
The concept of Rollup Boost is similar to that of MEV Boost. In which, L2 that is enabled with SBS (Sequencer Builder Separation) can decouple the block building process from the sequencer’s execution engine via a system called “Block Builder Sidecar”.
In short, inside the system, there are 4 major components:
- OP-node
- OP-geth
- Sidecar / Blockbuilder Sidecar
- External blockbuilders
Below is a picture of optimism architecture, in which we can see that the sequencer node (Aka op-chain) is composed of Op-geth & Op-node.
To separate the roles of block building and proposing in the sequencer, a component called sidecar has been added. Sidecar enables the OP-node to receive blocks from external builders, which, in turn, creates a marketplace between block builders and proposers.
Here’s the workflow:
- The OP-node sends an update to the sidecar.
- The sidecar as a middleman forward the update to op-geth
- When the OP-node requests a block from OP-geth, the sidecar intercepts the requests.
- Then, the sidecar forwards the request to external blockbuilders, this is the “gap” where external builders can bid and compete.
- After the external / winner block is received, the sidecar sends it to the OP-node.
- If not, the sidecar will forward the locally produced block instead.
The major benefit of the block builder sidecar is that 1) Upgrades require no modification to OP-chain clients while 2) Allowing a more flexible, streamlined and censorship resistance over the transaction sequencing rules.
However, since an intermediary (sidecar) has been added, there may be some latency hit.
TEE:
Rollup Boost takes this process a step further by introducing Trusted Execution Environments (TEEs) to the block building process to ensure the integrity of transactions. Real time performance is possible thanks to recent hardware advancement such as Intel TDX.
For those who are unfamiliar with TEEs, they are security enclaves within a processor or hardware that provide enhanced privacy by preventing unauthorized entities from reading the data inside. At the same time, TEEs maintain a high level of integrity since the code within the TEE cannot be modified or replaced.
In the context of Rollup Boost, Unichain will use TEE builders to mitigate the risk of MEV leakage. This means that when bundles or transactions are sent to the TEE block builders, the integrity and tamperproof aspect of TEE guarantees that the order in which transactions arrive at the builders cannot be influenced by external parties attempting to extract further MEV.
Moreover, TEEs offer trustless revert protection, which can safeguard users against failed transactions since TEE can run a simulation and any reverting transactions are detected and eliminated before they are processed. This not only enhances the efficiency of AMMs (as no failed txs can go though) but also improves the overall user experience, particularly during periods of high transaction volume.
To improve the fairness of the block ordering and building process, an execution attestation will be made publicly available for users after the block. This attestation is crucial for verifying priority ordering, a concept that will be explained in later paragraphs.
Flashblock and Verifiable Block Building:
Ethereum’s average block time of 12 secs is too slow to support today’s demand for an acceptable transaction experience. Also, slow block times expose the network to more MEV opportunities and make it vulnerable to network congestion under spam attacks.
L2s are designed to improve ethereum’s scalability by bundling off-chain txs and submitting proofs to verify computational correctness. To provide a smoother trading and transaction experience, Unichain aims to achieve a 250ms block time.
However, for this to be possible, unichain needs a system that can constantly stream blocks with low latency along with near instant confirmation time. Solana can process 440Ms with parallelism but sacrifices a certain level of decentralisation for such speed.
Previously, in most L2 block proposing processes, serialisation of data and state root generation created the latency that makes fast blocktime infeasible.
To cater for this issue, flashbot has created flashblock, an idea to “break down” blocks into smaller shards and therefore shorten the time between blocks to maximise the UX / LP benefits.
WTF is Flashblock?
Flashblock is a pre-confirmation that is issued by the TEE block builders for partial but quick confirmation.
First, transactions are streamed into the TEE block builders. If the L2 has been enabled with SBS (Sequencer-Builder Separation), the block builder will be separated from the sequencer. After sequencing, the block builder will incrementally form a partial confirmation called Flashblock. The Flashblock is then broadcasted to other nodes every 250ms from the sequencer for validation.
On the other hand, because latency in L2 is caused by state root generation and serialization. Unichain amortizes the cost of the block building process by calculating the state root and achieving consensus only once for multiple partial blocks, therefore drastically reducing latency.
In short, Flashblock is powerful because:
- The shorter block time reduces the risk of adverse selection costs for LPs.
- Flashblock serves early execution state over the existing state, making wallet and frontend integration easier.
- Fast transactions provide a great user experience (UX).
Moreover, because the TEE can enforce priority ordering in each Flashblock, applications and smart contracts can now impose an MEV tax that hijacks priority ordering for its own benefit and redistributes the MEV back to the LPs and users.
As Dan Robinson highlighted in his tweet, allowing apps and users to “control” their MEV is one of the major features / purposes of Unichain.
https://x.com/danrobinson/status/1844407479528194262
What’s even better is that priority ordering can be verified by the public execution attestation in the TEE. This lets users verify exactly how their transaction was executed. It’s super important because it’s the only way for users to be sure that the priority ordering is being done fairly.
- Unichain Validation Network (UVN):
Majority of L2 Sequencers are centralized today, and the behaviour of a single sequencer can impact the fairness of MEV, and liveliness or the finality of the block etc. For example, if a sequencer posts an invalid block and a fraud proof is submitted to challenge it, the resulting chain reversion can actually affect the speed of the chain.
To combat the potential single point of failure in sequencers, Unichain introduced the Unichain Validation Network (UVN).
UVN adds an additional layer of finality by focusing on verifying blocks through verifiers attesting to the canonical chain (Ethereum) as blocks are proposed. This process is actually similar to parallelization, where different stages of the block building can happen concurrently in one epoch.
However, without further details in the documentation, it’s too early to make assumptions about the pros and cons at this stage.
- $UNI Token
$Uni token is now more than just a governance token, It is a utility token.
To become a validator, an operator must first stake $Uni as collateral on the mainnet. A smart contract will track the balance and update the status via Unichain’s native bridges.
At the start of each epoch, the current staked balances are snapshotted, and fees are distributed proportionally to the weight of the stake. The validators with the highest $UNI stake-weight will be selected as the active set, and they can post attestations for a share of the validation rewards. Validators who have missed or didn’t post the attestation will not receive the reward, and the reward will be rolled over to the next epoch.
Based on the limited public information available, we can infer that the validation rewards will be:
(L2 fees paid by users on Unichain — MEV taxes imposed by applications — Cost of submitting bundles to Layer 1)
Unichain vs General Rollup vs Appchain
- The major differentiating factors between Unichain, general rollups, and appchains are MEV, pre-confirmation and competition for block space.
- Due to the flexibility for appchains to customize their architecture, they can implement different MEV mechanisms to mitigate issues such as eliminating censorship risk or reducing MEV leakage.
- Meanwhile, Unichain mitigates and restructures MEV by ensuring that the order of transactions is not affected by any third parties, thanks to the integrity properties offered by TEEs. Verifiable priority ordering also ensures that MEV is fair and transparent, with the possibility of redistributing MEV revenues back to the users and liquidity providers.
- Most sequencers on the market are centralized, allowing them to capture the greatest amount of value from the order flow. In contrast, Unichain takes a more “public good” approach, as its MEV redistribution mechanism somewhat limits the amount of MEV the original sequencer can capture.
Unichain is built with Opstack, the unified standard of optimistic chains provides the ability for Unichain to read messages and transfer assets across the superchain via secure message passing, thereby achieving low latency (~2 seconds) with its native optimistic interoperability design.
On the other hand, appchains can tap into different interoperability solutions, such as joining the IBC ecosystem or building as a L3 on Arbitrum Orbit (Although this is not as common for L2 with the OpStack).
Summary & Takeaway:
Unichain is an interesting concept that not only offers users a smooth trading experience with pre-confirmation, but also minimizes the window for MEV exploitation due to a shorter block time enabled by flashblcoks. Such innovation also reduces the adverse selection risk for LPs and benefits users / LPs with lower slippages etc.
On the other hand, the integrity and privacy properties of the Trusted Execution Environment (TEE) ensure that users on the chain can enjoy guaranteed transactions with fair, verifiable, or application managed MEV redistribution thanks to priority ordering on Unichain.
Unichain’s validation process also protects sequencers from the single point of failure and validators play an important role in verifying blocks with fast finality while turning $Uni token into a productive asset with yield.
Yet, by enabling MEV redistribution, sequencer actually lost its potential of capturing the maximum amount of MEV but more of that benefits are returning to the LPs / users on the chain.
While some might argue that Unichain may not be attractive enough for assets to migrate to the new chain, I believe that as the L2 ecosystem continues to grow, the interoperability between op-chains will allow Unichain to tap into a bigger pool of liquidity, such as that from Base.
Furthermore, besides grants (which Unichain can also offer in USDC after the Uniswap DAO), new DeFi have sufficient incentive to build on Unichain since they can benefit from customizing their MEV redistribution strategy. At the same time, the assets within the ecosystem can benefit from TEEs for mitigating MEV leakage.
Therefore, Unichain could potentially become the next hub of DeFi thanks to its speed, fairness in MEV redistribution, and the interoperability that the chain can potentially offer.
Reference:
- https://www.archetype.fund/media/the-little-transaction-that-could-sequencers-mev-intents-and-more
- https://writings.flashbots.net/block-building-inside-sgx
- https://blockworks.co/news/0xresearch-newsletter-mev-trusted-execution-environments
A First look at Unichain. was originally published in IOSG Ventures on Medium, where people are continuing the conversation by highlighting and responding to this story.