Bitcoin as a Data Availability Layer: What, Why, How?

Bitcoin as a Data Availability Layer: What, Why, How?

Rollups are fundamentally defined by data and the order in which that data is processed. As a result, the choice of a data availability layer is crucial to the trust model that underpins rollups. The integrity and security of rollups depend heavily on the safety and publishing guarantees provided by the selected data availability layer.

Citrea stands out as the only solution that leverages Bitcoin as both a data availability and settlement layer. With the launch of Citrea Public Devnet, Bitcoin is being tested as a data availability layer for the first time in its history. But this raises important questions:  Why has Citrea chosen Bitcoin for this purpose, and how does it work as a Data Availability Layer?

What is Data Availability?

Data availability refers to the presence and accessibility of all transactional data, ensuring that anyone with a full node can verify blocks and transactions on the blockchain. This principle—“don’t trust, verify”—is the core idea of blockchains.

When proposing solutions to scaling a base layer blockchain, data availability becomes a central challenge. One approach is to increase block size to fit more data (i.e., transactions) into each block. But, this leads to centralization as it requires increasing hardware requirements for nodes, making it too expensive for many to run them. As the number of nodes decreases, the network becomes more centralized and vulnerable. 

Experimenting with scaling proposals at the Layer 1 consensus level can be extremely costly, especially for Bitcoin, which secures over $1 trillion with its decade-old consensus mechanism and strong decentralization. So, how can Bitcoin scale to process complex transactions at a higher throughput without altering its consensus and compromising the availability and verifiability of transaction data?

Why use Bitcoin as a Data Availability Layer? 

Bitcoin’s blockspace is limited in both throughput and programmability, making it the most decentralized and secure blockchain, albeit with a trade-off in scalability. Using Bitcoin as a data availability layer allows rollups to scale the demand for this premium blockspace while also increasing its expressivity. Rollups create a scalable and programmable layer for on-chain finance secured by Bitcoin, making it a foundation for diverse on-chain applications, from DeFi to private transfers.

By leveraging Bitcoin as a data availability layer, Citrea achieves maximum integrity and security for its transaction data, ensuring that everyone can access the data needed to reconstruct and verify Citrea’s state. Without such strong data publishing guarantees, nodes might be unable to retrieve the rollup data, jeopardizing the rollup’s integrity and functionality.

A scenario in which nodes are unable to receive data

Currently, Citrea Public Devnet is implementing proof sampling instead of proving every sequencer commitment, and is testing the sequencer, the prover, and the full node software. As Citrea’s architecture becomes fully implemented, Citrea will inherit Bitcoin’s liveness, censorship resistance, reorganization resistance, and validity through Clementine

The implementation of forced transactions will enable Citrea to inherit Bitcoin’s censorship resistance and liveness guarantees. Users will be able to inscribe any Citrea transaction they want onto Bitcoin. These forced transactions will be extracted from Bitcoin and enforced by the prover, so the sequencer will be required to include them in a Citrea block. This ensures that forced transactions cannot be censored, and state transitions will eventually occur.

Reorganizations, or "reorgs," happen when a block is removed from the chain because it is no longer part of the longest chain. By inheriting Bitcoin’s reorg resistance, Citrea secures its transaction ordering with Bitcoin. To ensure this, the Merkle root of the tree containing Citrea’s soft block headers, known as sequencer commitments, is inscribed onto Bitcoin. This ensures that the sequencer cannot re-org the chain even if the proof is still in production. Once the proof is inscribed in Bitcoin, the rollup fully inherits its re-org resistance for the proven batch. 

Bitcoin has a perfect record of liveness and the strongest record of censorship resistance, something other Layer 1s have struggled with. As for reorg resistance, executing a deep reorg attack on the Bitcoin network would be prohibitively costly, thanks to its proof-of-work consensus mechanism and the significant computational power distributed globally across various mining entities.

That said, Bitcoin is not the most ideal blockchain for serving as a data availability layer due to its extremely scarce blockspace. Therefore, it is crucial to leverage Bitcoin's security with the least amount of data possible. The most efficient way to use Bitcoin blockspace in a verifiable manner is through zero-knowledge proofs.

How Can Bitcoin Be a Data Availability Layer?

The main challenge in using Bitcoin as a data availability layer is ensuring that the data needed to reconstruct the rollup’s state fits within the limits of Bitcoin's blockspace. Inscribing all transactions directly onto Bitcoin is not a viable option because of these constraints. Therefore, the data must be minimized while still being sufficient to fully reconstruct the rollup’s state from Bitcoin. This is where zero-knowledge proofs come into play.

Citrea’s prover processes hundreds of Citrea blocks, also known as batches, and generates a zero-knowledge proof of the batch along with the state differences resulting from it. These state differences, or "state diffs," are the storage slots difference between the initial and latest state of a given batch. By computing the sum of state diffs, Bitcoin full nodes can accurately reconstruct Citrea’s state. This architecture enables Citrea to inherit Bitcoin’s security guarantees in the most cost-efficient way. For a detailed breakdown of how Citrea’s proving mechanism works, refer to this article.

Batches and state differences

While using Bitcoin as a data availability layer provides the highest level of security and aligns with Bitcoin’s incentives, it comes with a significant trade-off: relatively high fees on the rollup. Although Bitcoin’s security may be attractive to users looking to leverage large amounts of capital during on-chain financial activities, offering different data availability options is crucial for supporting a diverse range of applications.

For instance, decentralized applications (dApps) like on-chain games might not require Bitcoin’s data availability guarantees, as they prioritize low costs. To accommodate such needs, Citrea plans to utilize Validiums and the Volition model. Apps that do not need Bitcoin’s data availability guarantees will have the option to post their zero-knowledge proofs to Citrea while using an off-chain source for their data availability, thus becoming Validiums. With the Volition model, apps will be able to give users the option to choose where their data will be stored. This flexibility allows for a broader ecosystem where different types of applications can thrive. 

Conclusion

Bitcoin is the most resilient and battle-tested blockchain, renowned for its unmatched security and decentralization, with the largest number of nodes compared to any other network. This robust security makes Bitcoin an ideal foundation for on-chain finance, despite its inherent blockspace limitations. Citrea builds on Bitcoin’s security to create a secure and scalable infrastructure for on-chain applications.  

By utilizing state diffs and Clementine (Citrea’s BitVM-based trust-minimized two-way peg), Citrea enhances the expressivity and the utility of Bitcoin and Bitcoin blockspace. Soon, BTC holders will be able to access complex financial applications in the most secure and cost-effective way possible.

For other fun and creative apps, developers will have the flexibility to use Citrea and/or other layers as data availability options to build solutions tailored to their needs. Citrea’s future is bright, offering a welcoming platform for a wide range of applications and user needs. 

Tugce Smith & Yusuf Ozmis


Join the community and follow us on X to witness our journey of making Bitcoin the foundation of the World’s finance!