Optimistic Rollups for the Rest of Us
Tech Deep Dives

Optimistic Rollups for the Rest of Us

5ในการอ่าน
2 years ago

Contributor: Optimistic rollups are a mouthful, and a pretty technical concept for even the most crypto savvy. Let's see if we can break it down here.

Optimistic Rollups for the Rest of Us

สารบัญ

Optimistic rollups (ORUs) are the most promising avenue for scaling Ethereum — and blockchains in general — today. But what are they, and why are Ethereum developers and scalability researchers so excited about them?

In this post, we’ll explore the fundamentals of ORUs in an approachable manner. For a more technical deep-dive, see here.

Features

ORUs have many desirable features, the combination of which is mostly unmatched across all blockchain scaling techniques. A properly-designed system will have all these properties:

  1. Trustless. Unlike traditional sidechains, ORUs are trustless (or, if you want to be technical, trust-minimized). You don't have to trust that a majority of the URU's block producers are honest to always be able to withdraw your funds from the rollup.
  2. Permissionless. Unlike Plasma, ORUs are permissionless. Anyone can produce a new block for an ORU since all the rollup block data is posted on Ethereum and available. The specifics of how to decide who the next leader is an implementation detail rather than a fundamental constraint.
  3. Non-custodial. Combining the above two properties, since an ORU is both trustless and permissionless, you can always withdraw your funds and no one can stop you. Therefore, they are non-custodial.
  4. Expressive. Unlike ZK rollups, ORUs allow (both in theory and in practice) for a high level of expressivity, ranging from Bitcoin-like UTXO payments to full-blown EVM-compatible execution.
  5. Open participation. Unlike channels, ORUs support smart contracts with open participation, like Uniswap.
  6. Capital efficient. Unlike channels, ORUs do not require that users lock up capital upfront.
  7. Resistant to chain congestion. Unlike channels and Plasma, ORUs are resistant to chain congestion, since fraud is proven at the block level rather than the channel closure or Plasma exit level.
  8. No novel cryptography. Unlike ZK rollups, ORUs do not require any novel cryptography.
  9. Fast (but not instant) finality. Unlike ZK rollups, there is no need to generate proofs, so ORU blocks can be posted to Ethereum immediately. Since valid ORU blocks can't be rolled back, they have the same finality guarantees as Ethereum as soon as they're posted to Ethereum.

A Brief History of Optimistic Rollups

One of the earliest attempts to improve and extend Bitcoin was sidechains. A sidechain is a blockchain that runs alongside a parent chain, and can have different properties: shorter block times, larger blocks, more expressive smart contracts, etc. However, plain sidechains have a fatal flaw: user funds can be stolen if a majority of a sidechain’s miners/validators are dishonest.
There were many techniques throughout the years that attempted to augment sidechains by guaranteeing user funds cannot be stolen even under such a dishonest majority (called a trust-minimized two-way peg). Earlier examples include merged mining, shadow chains and later Plasma and ZK rollups. Interestingly, a very close precursor to ORU is delayed state execution in the context of sharding (we’ll come back to this soon!).
The research happening on these many fronts culminated in the publishing of a concrete description of the technique we now know as "optimistic rollups" in June 2019 under the title Minimal Viable Merged Consensus. Since then, the Ethereum community has embraced ORUs wholeheartedly as a way to scale Ethereum-style smart contract execution without having to wait for Serenity Phase 2.

How Do Optimistic Rollups Work?

Optimistic Rollups Visualization
As sidechains with a trust-minimized two-way peg (in other words, sidechains that cannot result in stolen funds even if every single one of the sidechain's validators are dishonest), ORUs are surprisingly simple in terms of how they work (though the why is more involved).
1. An aggregator collects transactions for the rollup into a rollup block, and sends the rollup block to a smart contract on Ethereum (or another blockchain with Ethereum-style smart contracts with rich state), along with a bond (we'll see shortly why we need this bond). The rollup block isn't interpreted or executed—the contract simply records the hash of the block and keeps track of all the rollup block hashes. The rollup blocks themselves aren't stored in the contract, but are available for everyone to see in historical Ethereum transactions.
2. Rollup blocks include a state root: the root of the Merkle tree of the rollup's state. If this state root is invalid, anyone can prove it is invalid with a fraud proof within some timeout. This could be because a transaction in the rollup block is invalid, or because the state root is simply incorrect. If a rollup block is proven invalid, the contract rolls back its view of the rollup chain by orphaning all rollup blocks that descend from the invalid block. On a successful fraud proof, a part of the bond is paid to the prover and a part is burned.

3. If the timeout expires without a fraud proof, the contract finalizes the rollup block, allowing the bond to be withdrawn. Withdrawals of user funds from the rollup back to Ethereum are started on the rollup and can only be completed once the contract finalizes the rollup block.

That's it! ORUs seem so simple, so why did it take so long for them to actually be proposed concretely and developed? It's because the design space for these techniques is essentially infinite, and "to find the answer, you must know the answer."
Note: all of the above is how ORUs work in the context of a blockchain like Ethereum, with on-chain execution. ORUs can also be implemented as applications with client-side execution on top of projects like Celestia where fraud proofs can be distributed via a P2P network instead of having to be published to a smart contract.

Compromises

While ORUs do have numerous features that are critical in the context of decentralized blockchains and unstoppable financial platforms and applications, these features come at some minor costs.

  1. By default, the timeout for fraud proofs (and thus, the delay for withdrawing funds) can be quite long—on the order of weeks—due to the inherent latency of interacting with smart contracts on Ethereum. With client-side execution, the timeout can be shortened substantially. This delay can however be circumvented easily by having liquidity providers (LPs) service withdrawals using atomic swaps for a small fee. In fact, this is a new DeFi primitive: LPs can earn a return on their liquidity trustlessly by providing a service.
  2. The throughput of an ORU is upper-bounded by the data availability throughput of Ethereum. In this context, ORUs can actually be thought of as pseudo-shards. Multiple ORUs can run in parallel over a single data availability layer. And fortunately, it's easier to scale data availability than execution. Projects like Celestia are specifically optimized for providing a highly-scalable general-purpose data availability layer that all rollup projects can use to unlock their full potential.

Conclusion

To wrap things up, ORUs are here to stay. They offer a way for Ethereum and blockchains in general to achieve most of the promise of sharding much earlier than Serenity Phase 2: scalable execution for decentralized applications without compromising on critical properties. Projects building ORU infrastructure include (non-exhaustive, not an endorsement): Fuel Labs, Offchain Labs, Optimism and Hubble. Projects that are planning on building on top of an ORU in the near future are too numerous to count!
This article contains links to third-party websites or other content for information purposes only (“Third-Party Sites”). The Third-Party Sites are not under the control of CoinMarketCap, and CoinMarketCap is not responsible for the content of any Third-Party Site, including without limitation any link contained in a Third-Party Site, or any changes or updates to a Third-Party Site. CoinMarketCap is providing these links to you only as a convenience, and the inclusion of any link does not imply endorsement, approval or recommendation by CoinMarketCap of the site or any association with its operators. This article is intended to be used and must be used for informational purposes only. It is important to do your own research and analysis before making any material decisions related to any of the products or services described. This article is not intended as, and shall not be construed as, financial advice. The views and opinions expressed in this article are the author’s own and do not necessarily reflect those of CoinMarketCap.
7 people liked this article