Logo Coinbase

Guide to Base

July 13, 2023

Introduction to Base

Base is an Ethereum Layer 2, incubated by Coinbase and built on the open-source OP Stack, that allows developers to easily deploy reliable, secure applications on a scaling solution with low transaction fees. Rather than launch a standalone blockchain, Base is using Optimism’s modular & open-source blueprint for creating an interoperable and scalable blockchain. The goal of Base is to make “onchain the next online,” whereby Base will not only serve as a home for Coinbase’s onchain products, but also as an open ecosystem where developers & enterprises globally can build incredible new onchain tools & products. Coinbase does not plan to issue a new token for the Base network.

Benefits of Base

Base aims to solve some of the main challenges facing those looking to build onchain today, namely issues concerning: reliability, security, and scalability of the underlying infrastructure. 

  1. Reliable Platform for Onchain Products In the crypto-economy’s present state, teams looking to build onchain applications are confronted with an array of developer toolkits -EVM, Rust with Solana, Cosmos-SDK, etc. Oftentimes these toolkits are still nascent, with limited infrastructure for those looking to build highly reliable & enterprise-grade applications. Whether you are a Web 2.0 company looking to build its first onchain product or a seasoned builder in the Web 3.0 space, Base provides enterprise-grade infrastructure for any team to build on. 

  2. Secure Platform for Onchain Products For onchain to truly become the new online, builders & enterprises need to know they are building in a secure environment. By creating a platform in Coinbase’s orbit, builders can know that their infrastructure is benefiting from Coinbase’s best practices. For builders, especially those in the Web 2.0 space, that are on the fence as to whether they can build onchain, Base aims to remove this security concern. 

  3. A Bridge Not an Island Base makes it easy to build decentralized apps with access to not only Coinbase’s products, users, and tools but also the wider crypto economy. Base aims to be a stepping stone to allow Coinbase users to easily utilize onchain products on the Ethereum L1, other L2s, and even other L1 ecosystems like Bitcoin, Solana and Cosmos. 

  4. Low Fees Since the implementation of the Bedrock release, protocols built on the OP Stack have seen a significant drop in fees. As of June 27th, 2023, fees on Optimism are roughly $0.06 to send ETH and $0.11 to swap ETH making it one of the lowest fee L2 chains.

How Base Works

Base is being built on the Bedrock release of the OP (Optimism) Stack which is designed to make Optimism as close & equivalent as possible to Ethereum. The Bedrock release brings maximum compatibility with the existing Ethereum developer experience. The OP Stack is a series of modules across the consensus, execution and settlement layers that work together to form coherent and reliable blockchains. The Bedrock release has streamlined the ability to swap out different components of the OP Stack codebase and add new functionalities & capabilities. This modular architecture allows you to not only modify specific modules but swap them out entirely (for example swapping out Ethereum in favor of Celestia for the data availability layer).

Source: Introducing the OP Stack

The above diagram from the Optimism Collective highlights how modules can be swapped out across the Consensus, Execution and Settlement Layers. The items highlighted in white are modules that were released as a part of the Bedrock upgrade, whereas the items highlighted in yellow represent WIPs or simply are there to emphasize that you could create your own new module to provide functionality to that particular layer - hence the “Pokemon?!” callout. 

As of today, the above diagram notes that the Execution Layer has an Ethereum Virtual Machine (EVM) module. The Ethereum Virtual Machine is a piece of software that executes smart contracts & computes the state of the Ethereum network after each new block is added - more details can be found in this article as it relates to Ethereum specifically.  In the case of the modular OP Stack, this is a lightly modified version of the EVM that adds functionality for L2 transactions initiated on the L1 (Ethereum) and adds an additional L1 data fee for each transaction to account for the fee/gas needed to publish this transaction to the L1 (Ethereum). 

Additionally, the diagram references a Governance module in the Settlement Layer, which is a set of tools & processes to manage system configurations, upgrades, and design decisions. 

The Optimistic Rollup

The OP Stack utilizes an Optimistic Rollup to govern how state commitments are published to the L1 (Ethereum). An optimistic rollup is a way of scaling Ethereum that involves moving computation and state storage off-chain - e.g. off Ethereum. Optimistic rollups, such as Base, execute transactions outside of Ethereum, but post transaction data to the Ethereum mainnet as calldata.

Base combines off-chain transactions together in batches before sending them to Ethereum, which enables the spreading of fixed costs across multiple transactions in each batch - leading to reduced fees for those using Base and other Optimistic rollups. 

Optimistic rollups are called ‘Optimistic’ because they assume off-chain transactions are valid and don’t publish proofs of validity for transaction batches posted on-chain. Optimistic rollups instead rely on a fraud-proving process whereby anyone can challenge a rollup batch during a set time window by computing a fault proof

Interaction with Ethereum

Rollups built using the OP Stack interact with the Layer 1 through a series of smart contracts deployed on the Ethereum network. There are two key components of the optimistic rollup architecture:

On-chain Contracts: The optimistic rollup utilizes smart contracts running on Ethereum. This includes contracts that: store rollup blocks, monitor state updates on the rollup, and track user deposits. 

Off-chain Virtual Machine: Computation and state storage occur on Base and not the Ethereum Virtual Machine. This off-chain virtual machine is where applications live and operate. 

Source: Optimistic Rollups

Introduction to Sequencers

L2s built on the OP Stack, such as Base, have sequencer(s) that post data to the underlying L1 (Ethereum). 

A sequencer has the task of accurately executing transactions received.

Core sequencer tasks

  • Provides transaction confirmations and state updates

  • Constructs and executes L2 blocks

  • Submits user transactions to the L1 (Ethereum)

Source: Rollup Protocol

Base blocks are produced every two seconds, regardless of whether they are empty (no transactions), filled up to the block gas limit with transactions, or somewhere in the middle. 

Transactions Get to the Sequencer in Two Ways

  1. Transactions submitted on the L1 (which are called deposits in the OP Stack) are included in the chain in the appropriate L2 block. Every L2 block is identified by the ‘Epoch’, which is the L1 (Ethereum) block to which it corresponds. The first block of the epoch includes all the deposits that happened in the L1 block to which it corresponds. If a sequencer attempts to ignore a legitimate L1 transaction it ends up with a state that is inconsistent with the verifiers, just as if the sequencer attempted to fake the state through another mechanism. This provides L2s built using the OP Stack with Ethereum level censorship resistance. 

  2. Transactions submitted directly to the sequencer on the L2. 

Source: Rollup Protocol

The Requirements for the Processing of a Rollup Transaction

  1. The transaction needs to be written to L1 (Ethereum). This role is normally performed by op-batcher, but any user can send an L1 transaction to submit an L2 transaction (known as "forced inclusion"), in which case op-batcher is bypassed.

  2. The transaction needs to be executed to modify the state (by op-geth). Periodically, op-proposer writes a commitment of the post-transaction state to L1. Note that op-proposer does not need to write an L1 commitment after each L2 block; instead it happens at a consistent period measured in L1 blocks.

Source: Transaction Flow

Compression & Posting to the L1 (Ethereum)

The batcher combines sequencer batches into channels. When a channel is full, it is posted to the L1 either as a stand alone transaction or as a batch of multiple transactions. 

Source: Transaction Flow

Bridging Assets

Base is designed to allow users to send arbitrary messages between smart contracts on the L2 (Base) and L1 (Ethereum), making it feasible to transfer digital assets, including ERC20 tokens, between the two layers. Base uses a smart contract bridge to allow users to deposit digital assets from Ethereum to Base and also to allow withdrawals from Base back to Ethereum. 

Moving from the L1 to the L2

In the OP Stack, transactions going from the L1 (Ethereum) to the L2 (Base) are called deposits, regardless of whether or not they involve assets. Deposit transactions become part of the canonical blockchain in the first L2 block of the “epoch” that corresponds to the L1 block where the deposits occurred. The L2 block will usually be created a few minutes after the corresponding L1 block. 

Moving from the L2 to the L1

In the OP Stack, transactions going from the L2 (Base) to the L1 (Ethereum) are called withdrawals, regardless of whether or not they involve assets. These transactions have three stages:

  1. User initializes the withdrawal with a transaction on the L2 (Base).

  2. Wait for the next output root to be submitted to the L1 (Ethereum) so the withdrawal can be proven.

  3. After the fault challenge period ends, the proven withdrawal is finalized.

Build on Base

The team behind Base is building a Layer 2 scaling solution for those looking to build onchain products and experiences. Whether you are a seasoned onchain builder or a beginner, the Base community offers many resources and support. Visit the Base Discord server to join the community discussions and learn more.

Some helpful links are noted below:

This document and the information contained herein is not a recommendation or endorsement of any digital asset, protocol, network, or project. However, Coinbase may have, or may in the future have, a significant financial interest in, and may receive compensation for services related to one or more of the digital assets, protocols, networks, entities, projects, and/or ventures discussed herein. The risk of loss in cryptocurrency, including staking, can be substantial and nothing herein is intended to be a guarantee against the possibility of loss.This document and the content contained herein are based on information which is believed to be reliable and has been obtained from sources believed to be reliable, but Coinbase makes no representation or warranty, express, or implied, as to the fairness, accuracy, adequacy, reasonableness, or completeness of such information, and, without limiting the foregoing or anything else in this disclaimer, all information provided herein is subject to modification by the underlying protocol network. Any use of Coinbase’s services may be contingent on completion of Coinbase’s onboarding process and is Coinbase’s sole discretion, including entrance into applicable legal documentation and will be, at all times, subject to and governed by Coinbase’s policies, including without limitation, its terms of service and privacy policy, as may be amended from time to time.