bitpro가 원문에서 글자만 모은 내용이에요. 표·그림·수식은 빠지거나 깨질 수 있어요. 전체 6쪽 중 5쪽
t T has the operator ID of O
2. Verify that payout block containsT
3. With public input extraction of payout block’s blockhash, verify that it is equal to payout tx blockhash
4. With public input extraction of operator chain’s latest blockhash, verify that it is equal to latest blockhash
5. Verify that operator chain is valid and contains payout block with Header Chain Proof
6. Verify using citrea light client proof that Citrea includes the deposit transaction of citrea vault tx and
withdrawal endpoint of T
7. Let max watchtower total work := 0
8. For each Watchtower with ID i and signature W from watchtower signatures:
(a) If watchtower sent challenge[i] is false, skip this iteration
(b) Verify that the given signature W is valid
(c) If the proof provided by signature W for the Watchtower Circuit (Figure 6) proves that given chain with total
workw is valid and doesn’t contain payout tx blockhash:
i. Let max watchtower total work := max{max watchtower total work,w}
9. Verify that the operator chain has greater total work compared to max watchtower total work
Fig. 7: Pseudocode of the Bridge Circuit used to compute the BridgeDisproveScript proof ΠB. This
circuit defines the relation R over which we define the (recursive) SNARG.
23
ClementineDisproveScript
Created for Operator O∈O with Watchtower hashesH
Preimages are known only by O and are revealed upon a WatchtowerChallenge. The corresponding hashes are
publicly known at setup. Each script is created using the following variables:
– Hashes H as constants
– watchtower sent challenge[] as an input, enforced to be the same as its counterpart in the Bridge Circuit
through public input extraction
Each subroutine i does the necessary verifications for Watchtower with ID i, expects a preimage P and its script
executes the following code:
1. If preimage P corresponds to the hash of Watchtower i and watchtower sent challenge[i] is false, make the
script spendable
Fig. 8: Pseudocode of ClementineDisproveScript.
Setup
Operator O∈O
Upon Setup being invoked with an input (txid,idx ) on Bitcoin owned by O, do the following:
1. For j∈{ 0,...,n o− 1}, create ( pkj, skj) using WintKeyGen and broadcast ( pkj) to P. Using these public keys,
create Round1 transaction with ⋆ := (txid,idx ).
2. Let T :=∅
3. For i∈{ 2,...,n r}:
(a) Create ReadyToReimbursei−1 transaction.
(b) For j∈{ 0,...,n o− 1}, create (pkj, skj) using WintKeyGen and broadcast (pkj) toP. Using these public keys,
create Roundi transaction.
(c) For j∈{ 0,...,n o− 1}:
i. Create UnspentKickOffi−1,j transaction
ii. Let σO :=Σ.SignO(UnspentKickOffi−1,j)
iii. Let T :=T∪{ (UnspentKickOffi−1,j,σO)}
4. Broadcast ( setupComplete, (txid,idx ),T ) toP
5. Post Round1 to Bitcoin and wait u rounds for it to appear.
Signer S∈S
Upon receiving ( setupComplete, (txid,idx ),T ) from O∈O , do the following:
1. Using the Winternitz public keys ( pk) received from O in (Setup phase of O) steps 1 and 3b, create the following
transactions (mimicking the protocol steps of the Operator). If any public key is missing, go idle.
2. Create Round1 transaction with ⋆ := (txid,idx ).
3. For i∈{ 2,...,n r}:
(a) Create ReadyToReimbursei−1 transaction.
(b) Create Roundi transaction.
(c) For j∈{ 0,...,n o− 1}:
i. Verify that ( tx,σO)∈T , where tx is O’s UnspentKickOffi−1,j transaction and Σ.VrfyO(tx,σO)4. If all checks pass, mark O as “ok” .
Fig. 9: Pseudocode of the Setup phase.
24
Peg In
Alice A∈P
Upon Peg In being invoked with input (txid,idx ) on Bitcoin and a Citrea address citrea addr, both owned by A, do:
1. Create Deposit transaction with ⋆ := (txid,idx ) and citrea addr inscribed.
2. Post Deposit on Bitcoin, which appears after u rounds.
3. If MoveToVaultappears on Bitcoin, wait for uc rounds for Mint to appear on Citrea. If no Mint transaction
appears on Citrea, create a light client proof for MoveToVaultand Mint, and post Mint to Citrea.
4. If Deposit remains unspent after t1 blocks rounds it has appeared on-chain, create and publish a transaction that
spends the output of Deposit to an address owned by A.
Operator O∈O
After completing Setup, whenever a Deposit appears on Bitcoin, let pid :=H(Deposit), and do the following:
1. Broadcast ( requestKey, pid) toS. Wait for 2δ rounds to receive ( replyKey, pid, pkS,pid) for every S∈S . Combine
all of these|S| public keys pkS,pid to create the n-of-n condition CheckCovenant used to generate the transactions
below. If not all messages are received, go idle.
2. Run crs← SNARG.Setup(RW ) with each Watchtower W ∈W and crs← SNARG.Setup(RB) (cf. Section 3.4),
whereRW andRB are defined in Section 6.2. This is used to encode SNARG.Vrfy in the “Disprove Connectors” of
KickOffi,j
3. Let T2 :=∅. Create MoveToVault; add it toT2. Let c be the maximum index, such that Roundc is on Bitcoin.
4. For i∈{c,...,n r}:
(a) Choose J ⊆{ 1,...,n o} uniformly at random, such that |J| = nu. For l∈{ 0,..., 100ns}, create ( pkl, skl)
using WintKeyGen and broadcast ( pkl) to P. These keys are used to create BridgeDisproveScript and the
“Latest Blockhash/Assert Connectors” of KickOffi, .
(b) For j∈J:
i. Let {si,j,1,...,s i,j,m} be a set of m numbers sampled uniformly at random.
ii. Create KickOffi,j using{H(si,j,1),...,H (si,j,m)}, and add the transaction to the set T2.
iii. For k∈{ 1,...,m }:
A. Create WatchtowerChallengeTimeouti,j,k and add it to the set T2.
B. Create the transaction OperatorChallengeNACKi,j,k and add it to the set T2. Let σ :=
Σ.SignO(OperatorChallengeNACKi,j,k) and broadcast (σ) toP.iv. Create Challengei,j and add it to the set T2. Create NoChallengei,j and add it to the set T2.
v. Create BlockHashTimeouti,j and add it to T2. Let σ :=Σ.SignO(BlockHashTimeouti,j), broadcast
(σ) toP.
vi. For l∈{ 1,...,n s}:
A. Create AssertTimeouti,j,l and add it to the set T2. Let σ := Σ.SignO(AssertTimeouti,j,l) and
broadcast (σ) toP.
vii. Create Disprovei,j,h and add it to the set T2. Let σ :=Σ.SignO(Disprovei,j,h) and broadcast (σ) toP.viii. Create DisproveTimeouti,j, KickOffNotFinalizedi,j, and Reimbursei,j, then add them to T2. Let
σ :=Σ.SignO(KickOffNotFinalizedi,j) and broadcast (σ) toP.
5. Broadcast ( sendTxSet,T2) toP (and in particular, to S).
6. Wait for 2 δ rounds to receive ( replySig,VS) for every S∈S . If not all messages are received, go idle.
7. For S∈S :
(a) If VS does not contain a signature σ, such that Σ.VrfypkS,pid(tx,σ ) for every transaction (regardless of in-
dicies) tx∈{ WatchtowerChallengeTimeout, OperatorChallengeNACK, Challenge, NoChallenge,
BlockHashTimeout, AssertTimeout, DisproveTimeout, KickOffNotFinalized, Reimburse}, go idle.
pkS,pid denotes the key received at step 1.
(b) If VS does not contain a signature σ, such that Σ.VrfypkS(MoveToVault,σ ), where pkS denotes S’s genericpublic key, go idle.
8. Combine the signatures for S∈S in the setsVS to form the Covenants for the transactions in T2. Store all these
covenants in the setV.9. Post MoveToVaultto Bitcoin, which appears after u rounds. Create a light client proof for MoveToVaultand
Mint, and post Mint to Citrea. StoreMT (pid) :=T2,MV (pid) :=V
Signer S∈S
Upon receiving ( requestKey, pid) from an operator O∈O , do: (1) Let ( pk, sk) :=Σ.Gen(1κ). (2) Store sk for pid. (3)
Send (replyKey, pid, pk) to O.
Upon receiving ( sendTxSet,T2) from some O∈O , who has been marked as “ok” in the Setup phase ofS, step 4, do:
1. Verify that T2 contains every transaction outlined in the Operator’s PegIn protocol code from steps 3 to 4(b)viii,
and only those transactions, correctly constructed, and building on some valid Deposit as input. If not, go idle.
2. Verify, that the correct SNARG.Vrfy (using RB, RW , and the corresponding crs) is encoded in the “Disprove
Connectors” of KickOffi,j, and that the the Winternitz public keys ( pk) received from O in step 4a are used.
3. If having previously not received σ, such thatΣ.VrfypkS,pid(tx,σ ) for every transaction (regardless of indicies) tx∈
{OperatorChallengeNACKi,j,k, BlockHashTimeouti,j, AssertTimeouti,j,l, KickOffNotFinalizedi,j}, go
idle. Else, sign every transaction, regardless of indices, Challenge, WatchtowerChallengeTimeout,
OperatorChallengeNACK, NoChallenge, BlockHashTimeout, AssertTimeout, DisproveTimeout,
KickOffNotFinalized, Reimburse, using sk for pid, and add the resulting signatures to VS.
4. Sign MoveToVaultusing S’s generic secret key, and add the resulting signature to VS.
5. Broadcast ( replySig,VS) toP (and in particular, send it to O). Delete sk for pid.
Fig. 10: Pseudocode of the Peg In phase.
25
Peg Out
Bob B∈P
Upon Peg Out being invoked with an input (txid,idx ) holding vB on Citrea, owned by B, do the following:
1. Create a (partial) Payout. Let σ :=Σ.SignB(Payout) with flag SIGHASH SINGLE|ANYONECANPAY.
2. Create a Burn transaction based on (txid,idx ), which specifies the first output of Payout, and post it on Citrea.
It appears after at most uc rounds. Send ( sendPayout, Payout,σ ) to O∈O .
Operator O∈O
After completing Setup, upon receiving ( sendPayout, Payout,σ ) from B∈P , do the following:
1. If Citrea.read() does not contain a Burn in whichvB are burnt byB, Burn specifies Payout.output[0] in its body,
and Σ.VrfyB(Payout,σ ) with flag SIGHASH SINGLE|ANYONECANPAY, go idle.
2. Find the corresponding Deposit, let pid := H(Deposit) and retrieve the Store T2 :=MT (pid),V :=MV (pid).
If either entry does not exist, go idle. The following transactions and witnesses come from T2 andV (or are
created on-the-fly). Let i be the maximum index, such that Roundi is on Bitcoin. Select the smallest j, for which
KickOffi,j∈T 2 and Roundi.output[j] is unspent. If it does not exist, go idle.
3. Finish Payout using an output holding v−f coins on Bitcoin owned by O.
4. Sign Payout and post it to Bitcoin. If it does not appear after u rounds, go idle.
5. Using a Winternitz commitment to bh :=H(B) for B := Bitcoin.read()[−1], post KickOffi,j to Bitcoin and wait
for it to appear after at most u rounds and denote the block height of the block in which it is included as h1.
6. If, within t3 blocks after h1, a WatchtowerChallengei,j,k transaction appears on Bitcoin, create transaction
OperatorChallengeACKi,j,k usingsi,j,k (the secret chosen in the Operator’s PegIn procedure step 4(b)i). Post
this transaction to Bitcoin. For every k∈{ 0,...,m − 1}, for which KickOffi,j.output[ns + 2k + 5] is unspent at
t3 blocks after h1, post WatchtowerChallengeTimeouti,j,k
7. If, within t5 blocks after h1, a Challenge transaction appears on Bitcoin, do the following:
(a) Using a Winternitz commitment to lbh :=H(B) for B := Bitcoin.read, create and post BlockHashi,j.
(b) Let π← SNARG.Prove(RB,crs,ϕ,w ), whereRB is defined in Section 6.2,crs is created in the Setup, Operator,
step 2,ϕ contains all Watchtower proofs fromWatchtowerChallengei,j,k, bh, all Watchtower’s Schnorr public
keys and a boolean array indicating which Watchtower has sent a challenge. Run SNARG.Vrfy(RB,crs,ϕ,π )
yielding z0,...,z i,j,100ns, create Asserti,j,l and post these transactions to Bitcoin.
(c) If, at t8 blocks after h1, no Disprovei,j is on Bitcoin, post DisproveTimeouti,j to Bitcoin.
8. If, at t5 blocks after h1, no Challengei,j is on Bitcoin, post NoChallengei,j to Bitcoin.
9. If there are no other unfinished PegOut requests of O and O wants to proceed with the reimbursement (else wait
until this is the case), spend all outputs in Roundi,j via BurnUnusedKickOff, after they all appear on Bitcoin,
post ReadyToReimburse, after it appears, wait for t9 blocks, post Roundi+1, and then post Reimbursei,j.
WatchtowerWk∈W
Whenever a KickOffi,j appears on Bitcoin do the following:
1. Extract WinCom(bh) from KickOff.witness[0]. Let C := Bitcoin.read()
2. If ∄B∈ C :H(B) = bh:
(a) π← SNARG.Prove(RW,crs,ϕ,w ), where RW is defined in Section 6.2, crs is created with the O in the Setup,
Operator, step 2, ϕ is the blockhash committed to in the witness of KickOffi,j, and w := C.
(b) Create WatchtowerChallengei,j,k using π, then sign WatchtowerChallengei,j,k and post it to Bitcoin.
Challenger C∈C
Challengers maintain a mapping from pid to a validated transaction/signature set ( T2,V) for each operator. These
sets are gathered during the protocol execution (e.g., via broadcasts or local observation of ( sendTxSet,T2) and
(replySig,VS) messages from operators and signers).
Whenever a new KickOffi,j appears on Bitcoin, let h1 denote the block in which it is included, do the following:
1. If ∄B∈ C :H(B) = bh, where bh is the the committed blockhash in KickOffi,j’s witness, post Challengei,j.
2. For every k∈{ 0,...,m − 1}, for which KickOffi,j.output[ns + 2k + 6] is unspent at t4 blocks after h1, post
OperatorChallengeNACKi,j,k.
3. If there is a Challengei,j on chain, and if KickOffi,j.output[4] is unspent at t7 blocks after h1, post
BlockHashTimeouti,j.
4. If there is a Challengei,j on chain, and if there is anyl∈{ 1,...,n s}, such that KickOffi,j.output[5+l] is unspent
at t6 blocks after h1, post AssertTimeouti,j,l.
5. If there is a Challengei,j on chain, and if there is no l∈{ 0,...,n s}, such that KickOffi,j.output[5 +l] is unspent
at t6 blocks after h1, Execute SNARG.Vrfy(RB,crs,ϕ,π )where RB is defined in Section 6.2, crs is created in the
Setup, Operator, step 2, and ϕ,π are contained in Asserti,j,0 (z′0), yielding z0,...,z i,j,100ns. If z0,...,z i,j,100ns
does not match any Asserti,j,l or there is a WatchtowerChallengei,j,k on-chain, but not set in the boolean
array in ϕ, create and post Disprovei,j and post it to Bitcoin. In the latter case, using the secret si,j,k of O,
revealed in OperatorChallengeACKi,j,k
Whenever a new ReadyToReimbursei (spending Roundi.output[0]) appears on Bitcoin, do the following:
1. If there is a KickOffi,j on Bitcoin and KickOffi,j.output[2] is unspent, post KickOffNotFinalizedi,j.
2. If there exists a j∈{ 1,...,n o}, such that Roundi.output[j] is unspent, post UnspentKickOffi,j.
Fig. 11: Pseudocode of the Peg Out phase.
26
Peg In and Peg Out Amounts. Clementine inherits the same limitation of the BitVM Bridge: the
amount of the peg in must be equal to the amount of that is peg out. As discussed in [14], a simple
mitigation is to spread the bridge deposits across multiple Clementine instances of different sizes. In
practice, however, peg-in and peg-out transactions will likely be performed by professional users as a
service.
9 Informal Security Analysis
Clementine is designed as an on-chain multi-party protocol, which is executed by mutually distrusting
participants. The protocol ensures that any correct participant is guaranteed to not lose money. As a
result of the protocol execution, BTC can be securely locked (or released) and cBTC can be securely
minted (or burnt) between Bitcoin and Citrea, thus behaving as a blockchain bridge.
We now state Clementine’s security guarantees, showing what it means for it to be safe, live, and
balance secure. We will focus on the peg out mechanism, which is the one Clementine realizes. Recall
that bridging out of Citrea is the most challenging part, due to the limitations of Bitcoin script that
do not allow to deploy and run standard bridge protocols. On the other hand, the security of the peg
in is trivially achieved via a standard light client-based bridge protocol running on Citrea. Consider
the following informal properties.
Definition 3 (Clementine safety). No incorrect peg out succeeds.
In other words, Clementine’s safety means the adversary cannot successfully get the corresponding
BTC on Bitcoin, without first burning the cBTC on Citrea.
Definition 4 (Clementine liveness). Any correct peg out will succeed, eventually.
In other words, Clementine’s liveness means that an honest user can always eventually peg out of
Citrea (by burning their cBTC) and get the corresponding BTC back on Bitcoin.
Definition 5 (Clementine balance security). No correct Clementine participant will lose money.
In the following, we informally analyze the security of Clementine, and argue why and how this
properties are ensured given our model and assumptions Section 4. The goal is twofold: First, ensure
that Clementine users can always peg-in and peg-out without putting their money at risk. Second,
we ensure that no correct participant (users, Operators, Challengers, Signers, and Watchtowers) loses
money during the protocol execution by arguing that the correct, intended outcome is always enforce-
able. Informally, Clementine achieves liveness by economically motivating Operators to act honestly,
i.e., by pegging out users, else they will not collect fees. Similarly, safety is ensured by design via
Bitcoin script and via economically motivating Operators to behave honestly, else they lose their col-
lateral. We observe that from Section 5 and Section 6, the intended outcome of the protocol is defined
such that the balance of correct parties is not a risk (balance security).
We do a case analysis for the protocol at each stage, investigating how an honest Operator can
always enforce the correct outcome while a Challenger or a Watchtower can always successfully chal-
lenge a malicious Operator’s incorrect claim. Finally, we analyze the hash rate resilience of our scheme
against a Byzantine adversary trying to fool the light client by mining a private fork.
9.1 KickOff Transaction Not Finalized
Malicious Operator. An Operator posting a KickOffi,j transaction can be forced to respond to
WatchtowerChallengei,j (via the transaction OperatorChallengeACKi,j), and to Challengei,j
(via BlockHashi,j and all Asserti,j,l transactions). Regardless of how these mechanisms work (cf.
Sections 9.2 and 9.3 for details on that), if the Operator remains unresponsive to these challenges,
the KickOffi,j transaction remains unfinalized, which is indicated by KickOffi,j.output[1] (“Final-
izer Connector”) being unspent. Should the Operator try to get to reimbursement by posting the
ReadyToReimbursei with the hope of also posting Roundi+1 and Reimbursei,j, a Challenger
27
has a window of t9 blocks (timelock of ReadyToReimbursei’s only output) to post the transac-
tion KickOffNotFinalizedi,j, which will spend the output of ReadyToReimbursei, destroying
any chance of this Operator to complete this or any future reimbursement.
Since this mechanism is only active for the largest i, such that Roundi is on-chain for that
Operator (and not for previous i), we need to ensure that Operators do not use outputs of stale
Roundi transactions (for any i that is not the largest one, such that Roundi is on-chain for that
Operator). An Operator is thus supposed to post a BurnUnusedKickOffi,j for every output with
index j that is unspent before posting the ReadyToReimbursei. Otherwise, a Challenger has a
window of t9 blocks to post UnspentKickOffi,j, destroying any chance of this Operator completing
this or any future reimbursement.
Honest Operator. An honest Operator can always make sure to post a BurnUnusedKickOffi,j
before posting a ReadyToReimbursei, thereby preventing any (malicious) Challenger from post-
ing an UnspentKickOffi,j transaction. Similarly, an honest Operator can always make sure that a
KickOffi,j is finalized, i.e., the “Finalizer Connector” is spent: Either via a NoChallengei,j or via a
DisproveTimeouti,j transaction.
9.2 Disputing the KickOff Transaction
Malicious Operator. A malicious Operator can try to post a KickOffi,j with an incorrect blockhash
commitment WinCom(bhi,j) as witness, i.e., one that does not below to the honest, longest Bitcoin
chain. A malicious Operator can try this, putting a blockhash commitment of a private fork that
contains a Payout where the Operator is paying the user who is pegging out; however, the Payout
is not part of the honest longest chain.
The Challengers have a window of t5 blocks (after KickOffi,j appears on-chain) to post the
Challengei,j transaction before the Operator can post NoChallengei,j. After posting the challenge,
the Operator has a window of t7 blocks (after KickOffi,j appears on-chain) to post BlockHashi,j and
a window of t6 blocks (after KickOffi,j appears on-chain) to post all Asserti,j프로젝트로 돌아가기