Source: Bitcoin Magazine; Translation: Wuzhu, Golden Finance
Rollups have recently become the focus of BTC expansion, becoming the first thing to truly steal the spotlight from the Lighting Network, in terms of broader attention. Rollups are intended to be an off-chain second layer not constrained or restricted by the core Liquidity of the Lighting Network, where end users need someone to allocate (or “lend out”) funds in advance in order to receive money, or intermediate routing Nodes need channel balances to facilitate the full flow of payment amounts from sender to receiver.
These systems were initially developed to run on Ethereum and other Turing Complete systems, but recently the focus has shifted to porting them to UTXO-based blockchains such as BTC. This article is not intended to discuss the current state of implementation on BTC, but rather to discuss the functionality of an idealized Rollup that people have long sought, which depends on the ability to directly verify Zero-Knowledge Proofs (ZKP) on BTC, a capability that BTC currently does not support.
The basic architecture of Roll is as follows: a single account (UTXO in BTC) stores the balances of all users in Rollup. This UTXO contains a commitment, which exists in the form of the Merkle root of the Merkle tree, committing all current balances of existing accounts in Rollup. All these accounts are authorized using Public Key/Private Key pairs, so in order to make off-chain expenditures, users still need to sign certain content using the Secret Key. This part of the structure allows users to exit at any time without permission, simply by providing transaction proof that their account is part of the Merkle tree. They can unilaterally exit Rollup without the permission of the operator.
The operator of Rollup must include a ZKP in the transaction to update the merkle root of the on-chain account balance during the off-chain transaction. Without this ZKP, the transaction will be invalid and cannot be included in the Block chain. This proof allows people to verify whether all changes to the off-chain account are properly authorized by the account holder, and whether the operator has not maliciously updated the balance to steal user funds or dishonestly reallocate them to other users.
The problem is, if only the root of the Merkle tree is published on-chain for users to view and access, how can they place their branches in the tree so they can exit without permission whenever they want?
In the appropriate Rollup, every time a new off-chain transaction is confirmed and the state of the Rollup account changes, the information will be directly put into the blockchain. Not the entire tree, that would be too absurd, but the information necessary to rebuild the tree. In a simple implementation, the summary of all existing accounts in the Rollup will include the balance, and the accounts will only be added in the updated transactions of the Rollup.
In more advanced implementations, use balance diffs. This is essentially a summary of which accounts have added or subtracted funds during the update process. This allows each Rollup update to only contain the account balance changes that have occurred. Then, users can simply scan the chain and “compute” from the beginning of the Rollup to determine the current status of account balances, allowing them to reconstruct the current balance Merkle tree.
This can save a lot of expenses and Block space (thus saving funds), while still allowing users to ensure access to the information required for unilateral exit. Rollup rules require that these data be included in the formal rollup provided to users using the Block chain, and transactions that do not include account summaries or account differences are considered invalid transactions.
Another way to address the issue of user withdrawal data availability is to store the data outside the Block chain. This introduces subtle issues as rollup still needs to enforce that the data is available elsewhere. Traditionally, other Block chains have been used for this purpose, specifically designed to serve as data availability layers for systems such as rollup.
This has created a dilemma of equally strong security. When data is directly posted to the BTCBlock chain, Consensus rules can ensure that it is absolutely correct. However, when it is posted to an external system, the best it can do is to verify SPV proof, that is, the data has been posted to another system.
This requires verifying that the data exists in other on-chain proofs, which ultimately is an Oracle Machine problem. The BTC Block chain cannot fully verify anything other than what happens on its own Block on-chain. The best it can do is verify ZKP. However, ZKP cannot verify whether the Block containing rollup data is truly publicly broadcasted after generation. It cannot verify whether external information is truly made public to everyone.
This opened the door for data withholding attacks, which involve creating a commitment to publish data and using it to advance rollup, but the data is actually not available. This results in users being unable to withdraw their funds. The only real solution is to rely on value and incentive structures outside of BTC entirely.
This presents a dilemma for rollup. When it comes to data availability, there is essentially a binary choice of whether to publish the data to the BTC blockchain or elsewhere. This choice has significant implications for the security, sovereignty, and scalability of rollup.
On the one hand, using the BTC Blockchain as the data availability layer will set a hard limit on the scalability of rollups. Block space is limited, which sets a limit on the number of rollups that can exist at once and the total number of off-chain processed transactions for all rollups. Each rollup update requires Block space proportional to the number of accounts whose balances have changed since the last update. Information theory only allows data to be compressed to a certain extent, and at this point, there is no more room for expansion.
On the other hand, using different layers to achieve data availability eliminates the hard upper limit of scalability gains, but it also brings new security and sovereignty issues. In Rollups that achieve data availability using BTC, if the data that users need to extract is not automatically published to the blockchain, the state of the Rollup cannot change. With Validiums, this guarantee depends entirely on the ability of the external systems used to resist deception and data hiding.
Now, any Block producer on the external data availability system can hijack BTCRollup users’ funds by producing Blocks instead of actually broadcasting them, thereby making the data available.
So, what would it be like if we really achieved the ideal Rollup implementation on BTC and truly realized unilateral user withdrawals?