Beginners’ Guide to Optimism

In this beginner's guide series, we explore Optimism, a layer 2 scaling solution for Ethereum.

Beginners’ Guide to Optimism

What is Optimism?

Optimism is an Ethereum scaling solution based on optimistic rollups that aims to feel exactly like interacting with Ethereum, but with transactions costing a fraction of what they do.

Optimistic Rollups take advantage of the consensus mechanism of their parent chain instead of providing their own, in Optimism's case, its parent blockchain is Ethereum.

Why is there a need to build Optimism?

Ethereum is expensive to use.

A swap on Uniswap costs US$30 and a simple token transfer can cost $10. Furthermore, these gas prices aren't set in stone and they can fluctuate wildly especially during periods of high demand.

As more users demand for precious block space on Ethereum, a number of scaling solutions are being explored outside of the main protocol layer. These include sidechains, channels, rollups and more.

Rollups are a way to scale Ethereum by moving the execution layer of transactions away from the main blockchain and rolling the transactions up in batches. Often, they compress the data and verify them off-chain before storing the state data on the main chain.

What are rollups?

In a rollup, all transactions are written on the Ethereum mainnet as calldata, but the actual computation and storage of the contract are done off-chain. This allows anyone to use all the available public information to determine the current correct state of the blockchain since they have the full history of the chain.

A validator posts an assertion about what the contract will do and the assertion rolls up all of the transaction calls and their results into a single on-chain transaction.

There are two main types of rollups - optimistic rollups and zero knowledge rollups. Optimism uses optimistic rollups.

Why optimistic rollups?

Optimistic operates a type of rollup that's optimistic in nature, where the state of the blockchain is advanced by any validator that posts a rollup block that it claims is correct without any proof.

Instead, a bond is posted by the validator making the assertion.

Once an optimistic assertion is posted, there is a time period where anyone can post their own bond and challenge the assertion if they think that it is invalid. This challenge is called a fraud proof.

During the challenge process, there are rounds of interactions to resolve the dispute.

If the assertor is wrong, they will lose their bond. If the challenge period expires without a successful challenge, then the assertion is accepted and finalized.

Once the assertion is finalized, the transaction data is logged onto Ethereum.

What are the benefits of Optimism?

Optimism's launch is very welcomed by both developers and users alike:

  • Optimism has its security rooted in Ethereum, and any party can ensure correct and valid results based on the concept of fraud proofs.
  • Optimism supports Ethereum Virtual Machine (EVM) contracts with little to no modifications
  • The cost to use and transact on Optimism is extremely low

The experience of using Optimism is similar to Ethereum.

One of the biggest benefits of using Optimism is that the experience is extremely similar to using a dApp on Ethereum mainnet.

Since the codebase can be easily reused by developers, most of the dApp functionality should stay the same. Transactions can run on Layer 2, which is faster and cheaper, and have its state saved periodically on Layer 1.

Who uses Optimism?

The growth of Optimism has been remarkable. As of April 2023, the number of unique addresses on Optimism has reached 3.3M and growing.

Optimism unique addresses. Source: Optimistic

The number of daily transactions has also slowly trended up since November 2021.

Optimism Daily Transactions. Source: Optimistic

How much does it cost to transact on Optimism?

As of April 2023, it costs $0.44 to send ETH on Optimism.

Transaction fees on L2. Source: L2fees.

This is about 20% the cost of transacting directly on Ethereum mainnet.

How much does Optimism pay for Ethereum security?

According to L2fees, Optimism is the second top payer among L2s for Ethereum security at US$74,000 daily, just below Arbitrum. This is calculated as the amount in ETH paid to post proofs on Layer 1.

One day security costs. Source: L2fees.

This graph below from Dune shows the daily gas used by the Optimism sequencer, which has been relatively stable.

Daily gas used by Optimism sequencer. Source: Dune

How do I deposit tokens into Optimism?

You can deposit tokens into Optimism in one of several ways.

Once you have deposited tokens into Optimism, you can connect your wallet and interact with apps.

How to setup MetaMask for Optimism Network
In this guide, we explain how to setup Metamask for Optimism network.

Are all tokens supported by Optimism?

Most tokens were created as an ERC-20 token on Ethereum Layer 1.

In order for that token to be available on Optimism, someone (e.g. the development team) must bridge that token from Layer 1 to Layer 2. The Optimism team maintains a list of bridged tokens on this token list.

What wallets support Optimism?

Optimism is supported by a wide array of wallets including:

  • Raby
  • Coinbase Wallet
  • Coin98 Wallet
  • Rainbow Wallet
  • Trust Wallet

A list of supported wallets can be found on here.

How do I withdraw tokens from Optimism?

You can withdraw tokens from Optimism in one of several ways.

For standard withdrawals using the official bridge, there is a waiting period currently set as 7 days to allow sufficient time for verifiers to detect fraud on Optimism.

During this time, your funds are locked. After 7 days, you can click on the Claim button to receive your funds on Layer 1.

You can use alternate bridges above if you need faster withdrawals or withdrawals at lower cost.

What are the risks of using Optimism?

Optimism is experimental software, hence, bugs and risks may arise.

Some of the top risks of using Optimism include:

  • Failure of verifiers to check the published state resulting in stolen funds
  • The smart contract receives a malicious code upgrade
  • The Optimism Virtual Machine, which is independent from the Ethereum Virtual Machine, is used to execute transactions, may contain implementation bugs that can lead to loss of funds
  • Withdrawals from the system is initiated on L2 and that transaction takes several days to finalize. If during that time, the centralised validator goes down, users may not be able to exit the system resulting in frozen funds
  • The system employs a privileged centralised sequencer that has priority in submitting transaction batches and ordering transactions. It has the ability to front-run user transactions resulting in MEV extraction

Are there NFTs on Optimism?

Yes, there are a few.

One of the biggest marketplaces for NFTs on Optimism is Quixotic. But the NFT ecosystem on Optimism is still nascent.

How can I track my DeFi portfolio on Optimism?

You can track your DeFi portfolio on Optimism using one of the following supported portfolio trackers:

Where can I swap tokens on Optimism?

You can swap tokens on several DEXes on Optimism, including:

Does Optimism have a token?

Yes, Optimism has recently announced its OP token, which is used for governance. The native token for transacting on Optimism is ETH.

What is the use of Optimism's OP token?

The Optimism network generates millions in revenue from the small fees users pay to submit transactions. In the future, this income will be supplemented by auctioning off blockspace to non-malicious sequencers.

Instead of all that value being captured by private actors, Optimism treats it as a source of funding for public goods that support the ecosystem.

What can I do on Optimism?

Check out the following article for yield farming opportunities on Optimism.

Guide to Yield Farming on Optimism
We explore some of the yield farming platforms on Optimism and where investors can provide liquidity for yield.

Buy ETH or OP on Binance or Bybit and get up to 20% discount on trading fees when you trade cryptocurrencies.

For updates and special announcements, follow our Instagram (@stakingbits) and join our community on Telegram.