Optimistic Rollups are the solution to the scalability problem that Ethereum has been plagued with over 20,000 transactions or transfers happening every second on the blockchain network and over 4000 or more Dapps deployed and actively used on the network. Ethereum initially never expected so much traffic and scale and this is where rollups enter to solve this problem of scaling.

Therefore to solve these high amounts of computational costs and memory requirements required by users and dapp developers alike on the Ethereum blockchain, we introduce Optimistic Rollups - A solution for addressing the scalability problem of Ethereum in the Blockchain Trilemma.

Rollups are a layer 2 blockchain construction that sought to improve and offload the amount of load and usage Ethereum, in general, gets off-chain. It is a way to improve the performance and reduce the latency of the Ethereum mainnet by moving both expensive computation and data storage “off-chain”. In this article, we will be covering the “Optimistic Rollups” type of rollup in the Ethereum blockchain how it works, and what it is.

Disclaimer: Nothing in this article is financial advice and the author is not liable for any damages that may occur. Users are encouraged and required to do their research before investing in anything.

P.S. ZK Rollups have already been covered by me in an alternative article in case you were looking for it.

Introduction

An Optimistic Rollup is a way to offload computation and transactions “off-chain” from the Ethereum blockchain for the purposes of reducing the amount of load or the compute that happens on the mainnet.

Optimistic rollups are a layer 2 (L2) scaling solution designed to enhance Ethereum's throughput and latency by moving computation and data storage off-chain. This innovative approach significantly improves processing speeds by reducing computation on the main Ethereum chain.

Unlike other scaling solutions, optimistic rollups ensure security by publishing transaction results on-chain, enhancing transparency, security, and decentralization. Here's a detailed breakdown of how optimistic rollups work and their key features:

In conclusion, optimistic rollups play a crucial role in enhancing Ethereum's Layer 2 ecosystem by providing faster, cost-effective transactions while maintaining robust security measures. Their unique approach to off-chain transaction processing and fraud detection mechanisms make them a promising solution for improving Ethereum's scalability without compromising on security or trustlessness.

The Architecture of Optimistic Rollups

Optimistic rollups are a Layer 2 (L2) scaling solution designed to enhance the scalability and efficiency of the Ethereum network by processing transactions off-chain and then posting the results to the Ethereum Mainnet. This architecture significantly reduces the computational load on the Ethereum blockchain, leading to faster transaction times and lower fees.

In an Optimistic Rollup (OR) model, proposers suggest new state roots resulting from applying transactions to the current state, while challengers verify and challenge incorrect state roots if necessary. The state transitions are determined by a deterministic function applied to a sequence of transactions starting from an initial state, usually organized into blocks with ordered transactions.

Now, we will be exploring the architecture of this -

The Optimistic Rollups are comprised of around 4 components which are -

  1. Sequencer: The sequencer is responsible for the batching of the transactions from various users into ordered blocks and committing to the order of the blocks. This order can be subject to rollup-specific constraints and the most important thing that makes these rollups “optimistic” is that the order of these blocks that represent bundled-together transactions is public in nature and immutable or resistant to change. Finally, all of the roll-up users at all times should come together to a consensus to agree on the relative ordering of these blocks.

  1. Proposer: The job of the proposer is to evolve the state of the virtual machine by applying sequenced transactions on it and committing to a new state by posting the updated state root to the rollup contract that initiated the rollup request. The result of evolving of the state machine is expected to be deterministic in nature and any party evolving through the same state by applying the same ordered list of transactions with the transition function is expected to arrive at the same evolved state.

  1. Challenger: The challenger nodes act like a crucial part of the optimistic rollups where they exercise a similar role to the proposer but instead of posting the new / updated state roots to the rollup, they challenge the state root in the rollup contract if it ends up computing to a different VM State than the one on the proposer making these rollup contracts secure and resistant to any form of unauthorized mutation thus making them “tamperproof” in nature.

  1. Rollup Contract’s Functions: These rollup contract functions have the responsibility to store the state roots, provide an interface for the purpose of storing sequenced transactions and also providing a challenge mechanism and they are in general split and distributed across multiple smart contracts in general.

How do Transactions Take Place in the Optimistic Rollups

The interactions between the components of the Optimistic Rollups in the architecture discussion will now be discussed and the flow that takes place for transactions to undergo an “Optimistic Rollup” process will be explored.

  1. Submission of a Transaction: The process starts off with the user submitting a transaction that is specific to a rollup service of the user’s choice in general like a JSON-RPC server before it gets forwarded to the sequencer that is responsible for the batching or grouping together of multiple transactions which is responsible for ordering these batches into blocks which will be sent to the chain and this is done mainly to reduce costs and increase efficiency. These blocks are sent on the chain to act like a source of truth and are called “rollup contracts”.

  1. Source of Truth: The roll-up contract aka the smart contract on-chain now stores the blocks ensuring data availability on the main net blockchain and serves as a reliable source of truth.

  1. New Block Discovery: Upon being notified about the existence of a new block, the proposer is responsible for its execution, updating the virtual machine’s state, and committing to the updated state of the rollup contract.

  1. Challengers: Now, after this the challengers step in and for a specific time window, they meticulously verify the state by retrieving data from the rollup contract and stay ready to initiate any challenges in case an inconsistency is found and if it is found, the challenger will obtain a reward and the proposer in question will be punished. This step proves to be crucial for ensuring that the roll-up contract has not been tampered with whatsoever.

  1. Users Monitoring: The users are also allowed to monitor the transaction outcomes in a secure manner through the Rollup API guaranteeing transparency and reliability throughout the process.

Finally, Optimistic Rollups are considered "optimistic" because they assume off-chain transactions are valid and do not publish proofs of validity for transaction batches posted on-chain. Instead, they rely on a fraud-proving scheme to detect cases where transactions are not calculated correctly. If a fraud-proof succeeds, the roll-up protocol re-executes the transaction(s) and updates the rollup's state accordingly. If the rollup batch remains unchallenged after the challenge period elapses, it is deemed valid and accepted on Ethereum.

This process allows Optimistic Rollups to offer significant improvements in scalability, with the ability to process transactions off-chain and then post the results on-chain, thereby reducing congestion on the Ethereum mainnet and improving transaction throughput.

Virtual Machines in Optimistic Rollups

Now, you may be wondering how a virtual machine is relevant to the process of verifying transactions and making sure they are tampered proof forming the crux of the process of optimistic rollups. We will be covering that now.

The role of a virtual machine in optimistic rollups proves to be crucial mainly for the L2 scaling solutions operation and security. Optimistic rollups are designed to improve the scalability of the main network like Ethereum by executing transactions off-chain and then posting the results of the executed transaction on-chain while making sure that it is cryptographically secure [cryptographic guarantee] and has not been tampered with.

The VM plays a crucial role in this process, facilitating the execution of transactions and maintaining the state of the rollup.

Off-chain Virtual Machine (VM)

The VM in the optimistic rollup forms the core infra where transactions are executed and it is separate from the Ethereum Virtual Machine.

Ethereum Virtual Machine (EVM) Compatability

Optimistic rollups are designed to be EVM-Compatible, meaning they support the EVM at the bytecode level and this compatibility allows developers to leverage existing Ethereum tooling, libraries, and infrastructure when building Layer 2 rollups. It also facilitates the migration of existing smart contracts to Layer 2 without extensive modifications.

In summary, the role of the VM in Optimistic Rollups is to provide an execution environment for transactions, manage the state of the rollup, and facilitate the fraud-proving mechanism. Its compatibility with the EVM and integration with on-chain contracts ensure that Optimistic Rollups can offer scalability, security, and developer-friendly features while leveraging the Ethereum ecosystem.


Optimistic Nature of Rollups

Now, we will be discussing the optimistic nature of rollups and how it is a fundamental aspect of how Optimistic Rollups execute and operate, offering a unique approach to the scaling of Ethereum.

Optimistic Rollups are layer 2 scaling solutions that improve Ethereum’s throughput and latency through the process of processing transactions off-chain and then posting their results on-chain. The term ‘optimistic’ refers to the assumption that all the transactions are valid until proven otherwise by challenger nodes. This is in stark contrast [no pun intended] to ZK Rollups and other rollups which require cryptographic proofs for every transaction to ensure their validity.

How It Works

The optimistic nature of rollups is a key feature that distinguishes them from other scaling solutions. It allows for the efficient processing of transactions off-chain while maintaining the security and integrity of the Ethereum network. This approach enables Optimistic Rollups to offer scalability, cost-effectiveness, and developer-friendly features, making them a significant part of efforts to scale Ethereum using Layer 2 architecture.

Fraud Proving Mechanism in Optimistic Rollups

The fraud-proving mechanism in Optimistic Rollups (ORs) is a critical component that ensures the integrity and security of the rollup's state. It operates under the assumption that all transactions are valid until proven otherwise, which is why ORs are considered "optimistic."

Here's a detailed explanation of how the fraud-proving mechanism works in Optimistic Rollups:

Basics of Fraud Proving

How Fraud Proofs Work

Importance of Fraud Proof

Pros and Cons of Fraud Proofs

Optimism, A double-edged Sword

The "optimism" in Optimistic Rollups refers to the assumption that all transactions are valid until they are proven otherwise. This optimistic approach has several implications, some of which are considered demerits or drawbacks in certain contexts:

Delay in Transaction Finality

Capital Efficiency

Security Concerns

ZK vs Optimistic Rollups

Optimistic Rollups and ZK-Rollups are both Layer 2 scaling solutions designed to increase Ethereum's transaction throughput and reduce costs. They achieve these goals by processing transactions off-chain and then posting the results on-chain. However, they differ significantly in their approach to transaction validation, data posting, and overall efficiency. Here's a detailed comparison between the two:


Transaction Validation

Data Posting

Scalability and Costs

Security and Privacy

Latency

Programming Easiness

In summary, while Optimistic Rollups offer quicker transaction processing and lower entry barriers, they introduce delays in transaction finality and rely on the honesty of network participants. ZK-Rollups, on the other hand, provide enhanced privacy and security through zero-knowledge proofs but are more complex and have higher computational costs. The choice between the two depends on the specific requirements of the application and the priorities of the developers and users involved.

Now, we will be covering the popular blockchains that are using optimistic rollups in them.

  1. Optimism: Optimism is an Optimistic Rollup that operates on top of the Ethereum blockchain. It aims to increase the scalability and reduce the cost of transactions by processing them off-chain and then submitting them to the Ethereum mainnet. Optimism uses a sequencer to manage block production and allows for the transfer of ETH or tokens between the Layer 1 (Ethereum) and Layer 2 (Optimism) networks.

  1. Arbitrum: Arbitrum is another Optimistic Rollup that also operates on the Ethereum blockchain. It focuses on providing a scalable and cost-effective solution for Ethereum applications by processing transactions off-chain and then submitting them to the Ethereum mainnet. Arbitrum is known for its efficient handling of smart contracts and its support for existing Solidity smart contracts.

  1. Metis Andromeda: Metis Andromeda is a Layer 2 scaling solution that aims to provide high throughput and low latency for decentralized applications (dApps) on the Ethereum blockchain. It uses a combination of technologies, including Optimistic Rollups, to achieve its scalability goals. Metis Andromeda is designed to be a flexible and scalable platform for dApp development.

  1. Mantle Network: The Mantle Network is a Layer 2 scaling solution that focuses on providing a high-throughput, low-latency environment for dApp development on the Ethereum blockchain. It uses Optimistic Rollups to process transactions off-chain and then submits them to the Ethereum mainnet. Mantle Network aims to offer a cost-effective and scalable solution for Ethereum applications.

  1. Boba Network: Boba Network is an Optimistic Rollup that operates on the Ethereum blockchain. It aims to provide a scalable and cost-effective solution for Ethereum applications by processing transactions off-chain and then submitting them to the Ethereum mainnet. Boba Network is designed to be a flexible and scalable platform for dapp development.

  1. Base: Base is a Layer 2 scaling solution that aims to provide a high-throughput, low-latency environment for dApp development on the Ethereum blockchain. It uses Optimistic Rollups to process transactions off-chain and then submits them to the Ethereum mainnet. The base network is designed to offer a cost-effective and scalable solution for Ethereum applications.

  1. Zora: Zora is a decentralized marketplace for digital content on the Ethereum blockchain. It uses Optimistic Rollups to process transactions off-chain and then submits them to the Ethereum mainnet. Zora aims to provide a scalable and cost-effective solution for digital content creators and consumers.

Each of these networks plays a role in the Optimism Rollup ecosystem, contributing to the scalability and efficiency of the Ethereum blockchain by processing transactions off-chain and then submitting them to the mainnet.

Top 2 Optimism Rollup using Blockchains

We will now be covering the top 2 most popular optimism rollups using blockchains which you should definitely be watching closely.

Arbitrum and Optimism are the top two chains in the realm of optimistic rollups, each offering unique features and advantages that cater to different aspects of Ethereum's scalability needs. Here's a comparison between them :


Similarities

Differences

Both Arbitrum and Optimism are powerful Layer 2 scaling solutions with their own strengths and trade-offs. The choice between them depends on specific requirements, such as the need for speed, security, compatibility with existing Ethereum contracts, and developer experience. As both projects continue to evolve, they are expected to offer even more robust solutions for scaling Ethereum's transaction throughput and enhancing its overall scalability and efficiency.

Real-World Use Cases of Optimistic Rollups

Optimistic Rollups (ORs) are a Layer 2 scaling solution that significantly enhances the Ethereum blockchain's scalability and efficiency by processing transactions off-chain and then submitting them to the Ethereum mainnet. Here are some real-world use cases :

  1. Scaling Decentralized Applications (dApps): Optimistic Rollups are designed to scale dApps and interact with smart contracts in a more cost-effective and efficient manner. By moving computation and data storage off-chain, they reduce congestion on the Ethereum mainnet, thereby improving scalability and reducing transaction costs.

  1. Ethereum Scaling: Optimistic rollups are a major part of efforts to scale Ethereum using layer 2 architecture. They build on Ethereum's security and decentralization while offering cheaper fees and faster transactions. Projects like Arbitrum and Optimism are leading examples of optimistic rollup implementations.

  1. DeFi and Financial Applications: Optimistic rollups offer high throughput and reduced gas fees, making them suitable for applications like DeFi (Decentralized Finance). This is because they can process transactions off-chain, significantly reducing the cost and time associated with transactions on the Ethereum mainnet.

  1. Cross-Chain Bridges: While optimistic rollups are built on top of Ethereum’s base layer, assets on both chains are not natively compatible. However, cross-chain bridges allow for the transfer of funds from an L1 chain, like Ethereum, to an optimistic rollup, enabling more seamless and efficient cross-chain interactions.

  1. Testing and Development: Optimistic rollups also provide testnets, like the Optimistic Ethereum Kovan Testnet and Arbitrum Rinkeby Testnet, which simulate the behavior of the main network. These testnets allow developers to deploy and test smart contracts with minimal risk, facilitating the development and testing of dApps and other blockchain applications.

Conclusion

In conclusion, optimistic rollups represent a significant advancement in the scalability and efficiency of blockchain networks, particularly Ethereum. By leveraging layer 2 solutions, optimistic rollups enable the processing of thousands of transactions off-chain, significantly reducing congestion and improving transaction speeds and costs.

This innovative approach not only enhances the user experience but also opens up new possibilities for decentralized applications (dApps) and smart contracts, making them more accessible and cost-effective.

The adoption of optimistic rollups is not just a technical solution but a strategic move toward a more scalable and sustainable future for blockchain technology. As projects like Arbitrum and Optimism continue to develop and implement these solutions, we can expect to see a surge in the adoption of dApps and smart contracts, leading to a more vibrant and decentralized ecosystem.

Moreover, the security and decentralization of optimistic rollups, combined with their compatibility with Ethereum's existing infrastructure, make them a compelling choice for developers and users alike. The ability to scale without compromising on security or decentralization is a testament to the potential of optimistic rollups to revolutionize the blockchain space.

As we look forward, the implementation and optimization of optimistic rollups will undoubtedly play a crucial role in the future of blockchain technology. By addressing the scalability challenges that have long plagued Ethereum and other blockchain networks, optimistic rollups pave the way for a more scalable, efficient, and user-friendly blockchain ecosystem.