Everything You Need to Know About Optimism

Overview

  • Rollups Explained
  • A Brief History of Optimism
  • How Optimism Scales Ethereum
  • The Optimism Collective
  • Vision For The Future
  • Further Resources

Rollups Explained

Before getting into Optimism and Optimistic Rollups, it’s useful to know what rollups are and how they work.

Rollups are central to the vision for scaling Ethereum, as outlined by Vitalik Buterin here. Until Ethereum becomes vastly more scalable and able to handle a much higher throughput than centralized payment networks like VISA, rollups are the tool of choice.

As well as being able to handle the load of onboarding new users while also keeping costs low without sacrificing decentralization. Rollups derive their security from the main Ethereum chain, where they are as secure as the Ethereum consensus mechanism against large block reorganizations.

There are many different teams working on a variety of rollup solutions, but they can broadly be categorized into two groups: Optimistic Rollups (ORs) and Zero-knowledge Rollups (ZKRs).

Both rollup flavors share the property that they batch transactions together and then post them on-chain, in effect reducing fees by ‘rolling up’ transactions together as if they were one. The difference between ORs and ZKRs is that the former relies on economic incentives, whereas ZKRs rely on computationally heavy cryptographic proofs.

A joke about rollups to help you remember the difference between ORs and ZKRs:

Some of the main advantages of ORs as compared to ZKRs:

  • ORs have lower fixed costs, resulting in lower fees at a smaller scale.
  • EVM compatibility and equivalence are a lot easier to achieve.
  • ORs have greater censorship resistance, since ZKRs have high hardware requirements due to the cost of generating validity proofs and there needs to be both a prover and a sequencer to produce blocks.

A Brief History of Optimism

Optimism was initially known as the Plasma Group, which was launched in January 2019 and worked on scaling Ethereum through Plasma chains. Like ORs, Plasma incorporated a fault proof, which refers to the method in which invalid state transitions are detected.

In fact, ORs and Plasma have a lot in common, but the key difference is that all the transaction data and computation is done off-chain with the Plasma, while ORs provide a way to seamlessly port over existing Ethereum dapps with minimal modifications.

In July 2019, the Optimistic Virtual Machine (or OVM) was introduced which was designed to support all L2 protocols and expanded on the correct-by-construction Casper research. But the OVM wasn’t equivalent to the Ethereum Virtual Machine (EVM), which meant that a lot of tooling broke and effortless deployment was a challenge for builders.

Plasma Group transformed from a research group into a new, separate entity by rebranding to Optimism at the start of 2020 and had already introduced the technical details of their OR scaling solution. By September 2020, Synthetix became the first protocol to start exploring Optimism’s testnet.

By the turn of 2021, Optimism had launched their alpha mainnet. In the second half of 2021, Perp v2 and Uniswap v3 went live and the developer whitelist was removed to allow anyone to freely deploy contracts. Optimism also became the first rollup to achieve EVM equivalence with their new and improved OVM 2.0, which means it shares the following with Ethereum: the Ethereum Virtual Machine, the account and state structure, and the gas metering mechanism and fee schedule.

Fast forward to today and Optimism is the second largest by total value locked (with almost $1.7 billion at the time of writing) and a thriving ecosystem of more than 50 protocols.

Total Value Locked in ETH terms over the past year. Source: L2Beat

How Does Optimism Enable Scaling for Ethereum?

Ethereum users can enjoy lower fees and faster transaction confirmations, all while enjoying the security of the main chain. But how exactly does Optimism achieve greater throughput and computational efficiency?

First off, assets like ETH must be bridged to the Optimism network, with the process explained in the video below:

Once you have funds on the Optimism network, whenever you make a transaction, it is submitted to the sequencer. The job of the sequencer is to ‘roll up’ all Optimism users’ transactions together, compress the underlying data and publish the block on Ethereum. The sequencer passes all blocks, including state roots and transactions, through calldata on mainnet.

The calldata block is merkelized and a single 32 byte state root is stored, which allows challengers to construct fault proofs and dispute any invalid transactions from the rollup. Since the relevant information is stored on Ethereum’s base layer, anyone can execute the rollup’s state and verify the correctness of the state transitions.

A special smart contract on Ethereum known as the Canonical Transaction Chain (CTC) stores blocks produced on Optimism. And unlike Ethereum’s mainnet, there’s currently no mempool on Optimism, where transactions are immediately accepted or rejected according to the order in which they were received.

The idea is that anyone will be able to become a sequencer in the future by providing a bond to produce blocks and earn transaction fees. In this way, ORs utilize crypto-economic incentives to ensure validators are honest, as if they post an invalid block or they build on top of an old, invalid block, their bond can be slashed. The challenge game gives challengers 7 days to contest any blocks to ensure that validators are honest.

Currently, the sequencer is centralized and is responsible for the following:

  • Instant transaction confirmations and state updates
  • Constructing and executing L2 blocks
  • Submitting user transactions to L1

Whenever a user sends a transaction, they are added to the local state as a pending block. Pending blocks are submitted in large batches to Ethereum, reducing the overall transaction fees for users by spreading the fixed cost over all transactions within a given batch. The data published to Ethereum is also minimized using compression techniques.

The chart below shows how this works in practice, with transactions becoming increasingly cheaper over time as adoption progresses. It currently costs less than $0.10 for an ETH transfer as well as for trades on Uniswap v3 or Perp v2. Gas costs on Optimism are anywhere between 3 to 30 times cheaper than on mainnet, although this depends on the complexity of a transaction with more complex operations saving more gas.

Source: Dune Analytics

As a result, billions of dollars worth of gas fees have been saved by batching transactions together, compressing the data and submitting to Ethereum’s L1.

The lower costs have also spurred activity on the L2, with Optimism processing around 30,000 transactions per day at the start of 2022 and is now around 100,000 per day. Rapid growth in the number of daily active addresses has also been observed, rising approximately threefold since the start of 2022 to ~10,000.

Source: Dune Analytics

As well as the increase in the number of active addresses and transactions, the monthly dollar inflows have also grown significantly in recent months as the rollup gains traction, more projects are deploying to this L2 and the OP summer incentives.

Source: Dune Analytics

Check out the Optimism for Non-techies video to dive deeper:

The Optimism Collective

What makes Optimism stand out from other rollup solutions is its dual governance model. In April 2022, Optimism announced their governance plan, the Optimism Collective, and released details about the token airdrop. Five percent of the token supply was airdropped in June 2022 to almost a quarter of a million addresses, with around 74% of these tokens claimed so far.

Source: Dune Analytics

Future airdrops will account for another 14 percent of the token supply, with the allocations shown in the pie chart below. Although the eligibility criteria for future airdrops is not clear, you can bridge ETH and frequently use different dApps on Optimism for a higher chance of receiving the next user allocation.

Source: Optimism

The vision behind Optimism is to equate profit with a positive impact on the world, where the aim of the Optimism Collective is to fund public goods that can bring major benefits.

The idea is that the revenue generated by the sequencer will be redirected to public goods funding, which in turn brings value to users and builders and increases the demand for blockspace. This positive feedback loop reinforces the development of public goods to create a vibrant ecosystem.

As well as incentivizing adoption, the $OP token is used in governance to vote on proposals.

There are two “houses” which have different responsibilities (although they also share the responsibility of granting citizenships and network parameters).

  1. The Token House is responsible for project incentives, protocol upgrades, treasury funds with $OP utilized to vote on decisions in these areas. Holders of the token can also delegate their voting power to other accounts to vote on their behalf.
  2. The Citizen’s House, on the other hand, is tasked with retroactive public goods funding, where citizenship is determined with non-transferrable NFTs. As the number of citizens rises as more people use Optimism, revenue from the network will be distributed to public goods funding.

Project incentives have already been determined in Phase 0 and currently Phase 1 is underway, where any project on Optimism is eligible to submit proposals, which are then reviewed and approved by the Token house. If you want to dig in deeper, all proposals and discussions take place on the governance forum.

Apart from governance, Perpetual Protocol recently expanded the use case for $OP by introducing the token as a new collateral type so that holders can maintain exposure to Optimism’s native token while going long or short with up to 10x leverage.

Vision for the Future

Looking ahead, Optimism’s vision for the future includes:

  • Cannon: the first EVM-equivalent fault proof.
  • Decentralizing the Sequencer.
  • Bedrock: a new version of the Optimism protocol to utilize Cannon and increase reliability.
  • EIP-4844: also known as ‘proto danksharding’, this update will push rollups transaction costs much lower.

Let’s briefly look at each in turn.

Cannon

Following the OVM 2.0 upgrade, the fault proof mechanism was disabled, which means users are implicitly trusting the sequencer that is run by Optimism PBC to public valid state roots to Ethereum. As the first public EVM-equivalent fault proof, Cannon will enable the theoretical minimum calldata costs and introduces the challenge game mentioned earlier.

To learn more about the technical details of Cannon, check out this thread and this presentation.

Decentralizing the Sequencer

This involves the elimination of Optimism's role so that participation as a block producer in the network is available to all. The first step to decentralizing the sequencer will be to rotate that sequencer with some frequency with the rotation mechanism dependent on two factors:

  1. an economic mechanism which creates a competitive market for sequencing, and redirects excess sequencer profits towards protocol development (opens new window).
  2. a governance mechanism which prevents sequencers from prioritizing short-term profits over the long-term health of the network.

At a later stage, a standard Byzantine Fault Tolerance consensus protocol will be implemented to support multiple, concurrent sequencers.

Bedrock

Anticipated to go live in Q4 2022, Bedrock is a re-design of the Optimism rollup to utilize Cannon and increase reliability. In essence, Bedrock will help Optimism achieve what is known as ‘Ethereum equivalence’ where it will inherit the existing Ethereum codebase.

By reusing as much as the Ethereum codebase as possible, this minimizes the surface area for bugs and the chances of downtime. As a result, the upgrade blurs the lines between being an L2 core contributor and L1 core contributor, since they will be architected in the same way.

The most centralized aspect of Optimism, as well as all other L2 solutions, is that there exists a trusted party that can make changes to the protocol. If the upgrade keys are compromised, then the funds on Optimism would be at risk. Taking cues from Ethereum, the release of Bedrock will enable a multi-client architecture that is key to decentralization, because if there’s just one dominant client and there’s a critical bug, then the whole network is brought to a standstill.

Therefore, much of the work ahead for Optimism will involve supporting the creation of alternative Optimism clients and the development of multi-client proof contracts, which will eventually remove the need for the upgrade keys and further decentralize.

If zero-knowledge technology becomes powerful enough to support EVM Equivalence, it is possible to add it as another client in this multi-client ecosystem. Different clients executing different fault proofs results in a more robust system.

To learn more about the technical details of Bedrock, check out this video.

EIP-4844

While not exclusive to Optimism, EIP-4844 is another important upgrade that will significantly improve the user experience on L2s.

This proposal introduces a new transaction type known as ‘blob transactions’, which improves data availability and scalability. This new transaction type will be used when sharding (a longer-term scalability solution) is fully implemented on mainnet. Instead of putting transactions into calldata, the block submitters will add it to blobs, which are independent of EVM, to reduce the overhead for nodes and are expected to reduce gas fees by up to 100x.

Further Resources

Subscribe to Nekodex by Perpetual Protocol 🥨
Receive the latest updates directly to your inbox.
Mint this entry as an NFT to add it to your collection.
Verification
This entry has been permanently stored onchain and signed by its creator.