Skip to content

Rollup

Introduction

A rollup is a layer 2 scaling solution that relies on a smart contract to manage the state of the rollup chain. The smart contract is responsible for verifying the correctness of the rollup chain state transitions. In ZK rollups, the smart contract uses a zero-knowledge proof protocol to verify the state transitions. The state update of the rollup is posted on the main chain as data. In the context of Cardano, the state update is attached to an unspent transaction output as datum.

Besides the state transition verification, the rollup smart contract is also responsible for briding assets between the main chain and the rollup chain. The smart contract can lock assets on the main chain and mint corresponding assets on the rollup chain, and vice versa. Those minted assets are called wrapped tokens. In order to unlock assets on one chain, the wrapped tokens must be burned on the other chain.

A rollup does not have its own consensus mechanism. Instead, it relies on the main chain for consensus. The main chain is responsible for finalizing the state updates of the rollup chain. Thus, the finality of the rollup chain cannot be faster than the finality of the main chain. The latter also acts as a data availability layer for the rollup chain.