Citrea 백서

Citrea

원문

bitpro가 원문에서 글자만 모은 내용이에요. 표·그림·수식은 빠지거나 깨질 수 있어요. 전체 6쪽 중 1쪽

Clementine: A Collateral-Efficient, Trust-Minimized, and Scalable Bitcoin Bridge Ekrem Bal1 Lukas Aumayr2,3 Atacan ˙Iyido˘ gan1 Giulia Scaffino2,4 Hakan Karaku¸ s1 Cengiz Eray Aslan 1 Orfeas Stefanos Thyfronitis Litos 2,5 1 Citrea 2 Common Prefix 3 University of Edinburgh 4 TU Wien 5 Imperial College London Abstract. This whitepaper introduces Clementine, a secure, collateral-efficient, trust-minimized, and scal- able Bitcoin bridge based on BitVM2 that enables withdrawals from rollups or other side systems to Bitcoin. Clementine proposes a new Bitcoin light client that remains secure against adversaries controlling less than 50% of Bitcoin’s hash rate, assuming at least one honest Watchtower in a permissioned set. The protocol is collateral-efficient, reusing locked funds over time and reducing unnecessary dust outputs through the strategic use of 0-value outputs, and scalable, enabling a single challenge per Operator to slash multi- ple misbehaviors. This increases throughput and reduces on-chain load without compromising security. Clementine enables trust-minimized and efficient peg-outs from Citrea to Bitcoin, making zk-rollups on Bitcoin practical and unlocking new paths for native scalability and interoperability. 1 Introduction Since the inception of Bitcoin [29], hundreds of new blockchains have been deployed, each one with its own native coins and features, including programmability, privacy, throughput, or latency. Today’s blockchain ecosystem is very diverse. Interestingly, Bitcoin has remained the most successful chain, dominating the market in many important metrics such as total value locked (TVL) [12] and security stemming from Proof-of-Work (PoW) [15]. Bitcoin’s importance and inherent value have also been recently acknowledged by economists, banks, and governments [8,11,26]. The Bitcoin protocol, intro- duced by Satoshi Nakamoto, enables a peer-to-peer payment system, but by design, it only supports a very limited scripting language. While this design choice works perfectly for rather simple money transfers, it has limited Bitcoin’s use cases and hindered its interoperability and scalability. Specif- ically, while protocols like bridges, DeFi, and rollups thrive in the EVM ecosystems, the restricted language of Bitcoin has prevented such applications from flourishing. Related Work. Recently, BitVM1 [13] has been a major breakthrough for Bitcoin. BitVM enables parties to run, for the first time, practical execution of arbitrary computations without modifying Bitcoin’s scripting language or relying on additional trust assumptions, such as trusted hardware, trusted third parties, or committees with some threshold honesty assumption. It uses a custom virtual machine to execute Turing-complete programs off-chain, producing a verifiable execution trace. If both parties agree on the result, the protocol is completed in just three on-chain transactions. In case of dispute, a bisection game narrows down the disagreement, and a single computational step is verified on-chain within Bitcoin Script. BitVM1’s main limitations are (i) its reliance on one dedicated party, the Verifier, to check the computation and (ii) a worst-case overhead of up to 79 on-chain transactions, which can result in long delays due to per-transaction challenge windows (for instance, 79 days if the window is 1 day). To overcome these limitations, a subsequent work introduces BitVM2 [14], where the program is split into sequential chunks and executed off-chain. The Prover commits to the inputs, the final outcome of the computation, and, if challenged, to all intermediate results. Anyone can then penalize the Prover for incorrect computation by triggering on-chain execution of the specific chunk that first led to a faulty result. BitVM2 requires fewer on-chain transactions and makes fewer assumptions about the participants, as it does not rely on a specific party for verification; anyone can challenge. The paper presents BitVM Bridge, utilizing BitVM2 to build a bridge. Finally, BitVMX [28] improves over BitVM1 in terms of efficiency: instead of Merkle trees, it uses hash chains of program traces and other optimizations. BitVMX makes running any user-defined program efficient and practical but still requires dedicated parties for verification. Citrea Rollup and Clementine Bridge. These advancements finally pave the way to deploy a variety of new applications in Bitcoin, including interoperability and scalability protocols. In the evolving Bitcoin ecosystem, Citrea [1] emerges as the first rollup protocol built on top of Bitcoin . It enhances Bitcoin’s scalability by executing transactions off-chain while periodically checkpointing its state onto the Bitcoin base layer, which guarantees both data availability and settlement (a.k.a. finality). Citrea is fully EVM-compatible: it features a deterministic, stack-based virtual machine, equivalent to the Ethereum Virtual Machine (EVM), that operates on Bitcoin. Citrea uses cBTC as its native asset, which represents BTC bridged to Citrea. A key aspect of Citrea is its custom zkEVM, a scalable and trustless proof system based on zk-STARKs, which makes the full virtual machine’s execution provable. Securely transferring funds from Bitcoin to Citrea ( peg in ) is straightforward thanks to the quasi-Turing complete 6 scripting capabilities of Citrea that allow it to run a Bitcoin light client in the rollup. Still, trustlessly and securely moving funds back from Citrea to Bitcoin ( peg out) is non-trivial due to the limited scripting language supported by Bitcoin [18,27]. A fundamental component of Citrea is the Clementine bridge, which allows users to exit the rollup ( peg out) and get back their coins into Bitcoin in a secure, efficient, scalable, and trust-minimized manner. Notably, Clementine features crucial improvements when compared to state-of-the-art protocols such as BitVM Bridge [14]. First, Clementine runs the first provably secure Bitcoin light client on Bitcoin, achieving resilience against an adversary with less than 50% of the computational power in the presence of a permissioned set of watchtowers, of which at least one is assumed to be honest. Then, Clementine is collateral efficient : while BitVM Bridge requires Operators to lock separate collateral for each deposit, Clementine minimizes the collateral that an Operator needs to lock by allowing collateral re-use across all deposits . Finally, Clementine is more scalable: it increases the throughput by allowing a single challenge to slash any malicious activity an adversarial Operator attempts. This contrasts with BitVM Bridge, which requires the challenge of every incorrect reimbursement claim of the Operator to slash. This vastly decreases the on-chain overhead and addresses some security concerns with BitVM Bridge, namely, that an adversarial Operator can cause congestion by forcing multiple, potentially block-filling challenges. After giving a high-level overview of the Clementine protocol in Section 2 and presenting the necessary building blocks in Section 3, in this whitepaper, we make the following contributions: – We define the models and assumptions that we use for Clementine security (Section 4) and we de- scribe the design of Clementine (Section 5), the scalable, collateral-efficient, trust-minimized bridge of Citrea built on top of Bitcoin. We proceed by gradually introducing the different components of the protocol, e.g., the parties and their roles, the light client, and the payoff rounds. – We formally define all the transactions (Section 6) of the Clementine protocol by showing their inputs, outputs, and witnesses in a compact table. We further expand on the logic of the zkSNARK proofs used by the protocol. – We put forth the pseudocodes of Clementine (Section 7) protocol divided into the different phases: Setup, Peg In, and Peg Out of the bridge. – We discuss the security of Clementine through a case analysis (Section 9). We prove that an honest Operator can always enforce the correct outcome, while a malicious Operator cannot enforce an incorrect outcome. We further prove the security holds for an adversary controlling less than 50% of the hash rate. We finally compute the failure probabilities for some concrete parameter settings. 2 Clementine: Protocol Overview Clementine is a trust-minimized bridge used by the Citrea rollup on Bitcoin. Clementine relies on 5 sets of parties: Operators, Watchtowers, Challengers, Signers, and Users. Clementine allows users to move their funds from Bitcoin to Citrea and back to Bitcoin again, in a seamless and trust-minimized 6This term is adopted in the blockchain community and indicates Turing-complete languages that bound the execution (e.g., Ethereum’s gas consumption) and thus guarantee termination [30]. 2 way. Consider a user, Alice, that wants to move her 2 BTC to Citrea: she locks 2 BTC in a deposit transaction and she posts it onto Bitcoin. Upon seeing the deposit of Alice, the bridge Operators (or Alice herself) relay the request to a light client smart contract on the Citrea side which mints 2 cBTC and sends them to Alice. This mechanism, known as peg in, is rather simple thanks to the quasi-Turing complete scripting capabilities of Citrea. On the contrary, the opposite direction, known as peg out, is not trivial to achieve due to the limited scripting capabilities of Bitcoin, which does not permit deploying a light client contract of Bitcoin itself on the Bitcoin chain. To allow users to securely peg out of the Citrea rollup and get back their money in Bitcoin, Clementine needs to guarantee users that, upon burning some BTC on Citrea, they get an equivalent amount of BTC back on Bitcoin. We achieve this by incentivizing Operators to front the money to users and then get reliably reimbursed thanks to the following components of Clementine: – An optimistic Bitcoin light client which checks whether the Citrea rollup has checkpointed a state to Bitcoin that includes the users’ burn transaction, as well as whether the payout transaction, in which Operator fronts the money to the user, is on-chain. This is done optimistically, with the Operator committing to a Bitcoin chain that it claims is the canonical one. A timer then starts, within which any Watchtower can dispute the claim. If the timeout expires without a dispute, then the Operator is reimbursed. Otherwise, if Watchtowers challenge the Operators’ commitment, the light client logic must be executed to determine which is the canonical chain. – A BitVM program executes the light client logic, with Challengers ensuring the correct outcome of the computation is enforced on-chain. The client logic consists of a recursive zkSNARK verifier: First, when disputing the canonical chain of the Operator, a Watchtower posts a transaction and reveals a signed zkSNARK proof showing that the Watchtower knows a valid chain with certain restrictions. Then, the Operator takes this proof and feeds it into another zkSNARK verifier which, given the Watchtower’s proof, the payout transaction the Operator published on Bitcoin, the Operator’s chain and necessary components of Citrea, outputs a proof proving that the Operator has the canonical chain that includes the correct payout transaction, and it is therefore entitled to be reimbursed. – A payoff round mechanism which minimizes the Operator’s collateral and makes it reusable, while retaining economic safety of the bridge. 3 Preliminaries and Key Building Blocks 3.1 The UTXO Model On a blockchain, each user U is identified by the public key of a digital signature key pair ( pkU, skU), proving ownership over a coin. In the Unspent Transaction Output (UTXO) model, a UTXO object holds some units of currency, coins, and a set of instructions that specify the requirements in order to spend those coins, e.g., the signature corresponding to which public key can spend the coins. A transaction tx is an atomic update of the state of the blockchain and maps a non-empty list of inputs, i.e., unspent outputs, to a non-empty list of newly created outputs. In other words, a transaction consumes some UTXOs and creates new UTXOs. In Bitcoin, a transaction includes (i) inputs, which uniquely identify unspent outputs, (ii) outputs, which specify the amount of currency held by the output and the conditions under which the coins can be spent, and (iii) witnesses, which store the data fulfilling the spending conditions of the inputs. 3.2 Emulating Covenants Using Presigned Transactions In this work, we explore Bitcoin covenants [10, 16], a proposed class of script operators that enable a transaction to impose constraints on how its funds can be utilized by subsequent spending trans- actions. Covenants can also be recursive, requiring the script of the spending transaction to include the same covenant as the spent one. At the time of writing, covenants have not yet been integrated in Bitcoin. If added to Bitcoin Script, covenants would provide the ability to restrict the outputs of future transactions and would enable the storage and execution of a state machine across different 3 transactions. This would equip Bitcoin with more expressive smart contract capabilities and it would enable more complex applications on Bitcoin. In Clementine, the way some UTXOs can be spent must be restricted so that operators spending from Clementine transactions can be challenged. Without Bitcoin-native covenants, we closely follow [14] and emulate the covenant functionality using a committee of n signers S1,...S n, where at least one is honest (existential honesty assumption). In practice, anyone is allowed to join the committee as long as they are active (idle signers are kicked out of the committee to avoid denial of service); honest users could convince themselves of the existential honesty by joining the committee [21]. Specifically, during the setup phase of the Clementine bridge, we introduce the following steps: – Each signer generates a fresh key pair. – For each transaction output that should be spendable only under specific conditions, we add an n-of-n multi-signature spending condition, requiring all signers to collaboratively produce the signature in order to spend the UTXO. – The signers pre-sign the specific transactions intended for spending the output. Each operator is given a dedicated set of pre-signed transactions, which they can spend under certain conditions. – Finally, the signers erase their keys. This mechanism guarantees that as long as at least one signer remains honest and deletes their key, the UTXOs can only be spent using one of the pre-signed transactions, i.e., only in the pre-defined way. One can leverage signature aggregation schemes to reduce the on-chain footprint. For readability and to highlight that enabling covenants can eliminate the need for the committee, we abstract this emulation and henceforth use CheckCovenant to refer to a spending condition on outputs. 3.3 Winternitz One-Time Signatures A Winternitz one-time signature scheme [19] is a hash-based signature scheme. Let n be a security parameter,w the compression level, andm the message to be signed. A Winternitz one-time signature scheme consists of three algorithms: – (pk, sk)← WintKeyGen(n,l ) is a Probabilistic Polynomial Time (PPT) algorithm that takes as input a positive integern and returns a key pair (pk, sk), consisting of a secret keysk = (sk1,..., skl) of l n-bit strings chosen uniformly at random and a public key pk = ( pk1,..., pkl) obtained by hashing w times the l strings of the secret key to obtain another set of l n-bit numbers. Usually, l = 32 and n = 256. – σ ← WintSig(sk,m ) is a Deterministic Polynomial Time (DPT) algorithm parameterized by a secret key sk, that takes as input a message m and outputs the signature σ = (σ1,...,σ l), which we also call (Winternitz) commitment. To generate σ, m is hashed to produce a n-bit digest. –{True, False} ←VerifyWintSig(pk,m,σ ) is a DPT algorithm parameterized by a public key pk that takes as input a message m, a signature σ, and outputs True iff σ is a valid signature for m generated by the secret key sk, corresponding to pk, i.e., ( pk, sk) is a key pair generated by WintKeyGen. The Winternitz signature scheme admits several optimizations. For example, Citrea derives all secret keys from a single master secret by appending a unique index to it and then applying a cryp- tographic hash function [2, 24]. This technique enables deterministic generation of all required secret keys from a single seed, eliminating the need to store multiple keys. A crucial property of a Winternitz signature is that it is one time: When the message m is signed andσ is created, the key pair becomes bound to m. If the same key pair is then used to sign a message m′̸=m the unforgeability property of the scheme is lost, and so is its security. Importantly, Winternitz signature verification can be implemented with Bitcoin script, i.e., we can verify a Winternitz commitment provided in the witness of a Bitcoin transaction. 3.4 Succinct Non-Interactive Arguments (SNARGs) Similar to [14], we make use of SNARGs and base our definitions on [23, 25]. We denote R←R (λ) a relation generator that takes as input a security parameter λ and returns a polynomial time decidable 4 binary relation R. We call ϕ the statement and w the witness for the pairs ( ϕ,w )∈ R. An efficient publicly verifiable non-interactive argument forR consists of three PPT algorithms: – crs← SNARG.Setup(R): Given as input a relation R, it generates a common reference string crs. – π← SNARG.Prove(R,crs,ϕ,w ): Given as input a relation R, a common reference string crs, and (ϕ,w )∈R, it generates an argument π. –{0, 1}← SNARG.Vrfy(R,crs,ϕ,π ): Given as input a relation R, a common reference string crs, a statementϕ, and an argument π, it returns 1 if π is a valid argument, and 0 otherwise. The SNARG tuple ( Setup, Prove, Vrfy) is a non-interactive argument for R if it has perfect com- pleteness and computational soundness, as defined in [23, 25]. On a high level, these two properties guarantee that: (i) For a true statement ϕ, an honest prover can convince an honest verifier except with negligible probability (completeness), and (ii) for a false statement ϕ, a prover cannot convince an honest verifier except with negligible probability (soundness). If the verifier runs in polynomial time inλ +|ϕ| and the proof size is polynomial in λ, we denote the scheme as a succinct non-interactive ar- gument (SNARG). Later, we make use of succinct non-interactive arguments of knowledge (SNARKs) implementations, such as [25]. However, we neither care nor use the zero-knowledge property of this scheme. 3.5 BitVM Core We make use of the BitVM core construction, as explained in [14]. This protocol allows us for some quasi-Turing complete function (or program) f, to assert on Bitcoin that f(x) = y. Observe that we can represent any quasi-Turing complete program in Bitcoin Script. The main problem is the resulting program size, which is likely to be too large to fit into a Bitcoin transaction, which can be at most of 4MB. The main idea of BitVM core is to split such a programf intok sub-programsf1,...,f k, such that eachfi is small enough to fit into a Bitcoin transaction. The prover can then execute these off-chain: z1 :=f1(z0), z2 :=f2(z1), ..., zk :=fk(zk−1). The prover then posts a Winternitz commitment of every zi for i ∈ {0,...,k } on-chain. The verifier can check these results off-chain, and should there be an incorrect result zi̸=fi(zi−1) for some i∈{ 1,...,k }, the verifier can execute fi(zi−1) on-chain and disprove the claim of the prover, that f(x) =y. One can use this construction to build a SNARG verifier (cf. Section 3.4 SNARG.Vrfy), i.e., a Groth16 verifier [25]. 4 Model and Assumptions Time and Network Model. We model time to proceed in discrete rounds. Further, we assume a synchronous network, i.e., messages sent from one honest party to another a
프로젝트로 돌아가기