Table of contents
The paper introduces BitSNARK and Grail, systems designed to optimize Bitcoin Rollup Bridges. BitSNARK is an improvement over BitVM, providing better efficiency and reduced complexity for verifying SNARK proofs on the Bitcoin blockchain. Grail implements BitSNARK, enabling practical and scalable Bitcoin Rollup Bridges.
The paper discusses the historical challenges of scaling Bitcoin while maintaining decentralization and computational expressivity. Gregory Maxwell's introduction of SNARKs as a potential solution remained theoretical due to perceived implementation barriers. Robin Linus's BitVM in 2023 demonstrated the potential for Turing-complete smart contracts on Bitcoin, but practical limitations persisted. BitSNARK aims to overcome these limitations, optimizing for SNARK verification and reducing complexity.
BitSNARK is a software library for verifying SNARK proofs on Bitcoin. It focuses on zkSNARK verification, offering a faster and less costly solution than general-purpose systems. The BitSNARK VM uses a simplified register-based processor with three instructions (addmod, andbit, equal), making the verification protocol more efficient and secure.
This part is still lacking:
The Interactive Verification Protocol is a core component of BitSNARK, designed to facilitate secure and efficient verification of zkSNARK proofs on the Bitcoin blockchain. This protocol involves a two-party interaction between a prover and a verifier, enabling the execution and verification of computations with minimal on-chain data and reduced complexity.
The protocol is initiated by a prover who provides an input and the result of a computation.
This computation corresponds to a full execution of a BitSnark trace and it's derivated changes.
The verifier has the opportunity to challenge the prover's claims if they suspect an error or fraud.
The interaction is structured as a series of challenges and responses.
The prover commits to intermediate states of the computation, allowing the verifier to select specific points to challenge.
Each step of the protocol involves a time-locked transaction, ensuring that both parties are incentivized to participate honestly and promptly.
Unsure if the time-lock is for every step inside the BitSnark trace. If so, doesn't it take forever to run this step of the protocol?
If it is not, what are the things that this time-locks mentioned in the paper are based on?
Carlos
If a verifier successfully proves a discrepancy in the prover's claims, the funds remain locked, and the verifier is rewarded from the initial transaction output created by the prover.
If no challenge is issued within the allowed time, or if the verifier fails to prove the claim, the funds are unlocked for the prover.
I assume that here, not only the funds are unlocked but also the profit of the prover is rewarded (coming from user fee or whatever)
Carlos
The protocol's complexity is logarithmic (O(log(n))), allowing for efficient handling of large computations by dividing the verification steps into manageable parts.
The use of pre-signed transactions and a simplified instruction set (only three instructions: ADDMOD, ANDBIT, EQ) further streamlines the verification process.
Both the prover and the verifier are economically incentivized to act honestly.
The prover deposits a stake, which can be forfeited in case of fraudulent behavior.
The verifier also stakes funds to initiate challenges, deterring unfounded/wrong disputes.
Carlos
This is missing the incentives of the prover (benefits in particular).
Why would a prover like to stake and work here? In exchange of fees I assume. If so, we need to say from where do they come
The protocol's design ensures that even a single honest verifier can prevent fraudulent transactions. The interactive nature and the economic incentives make it robust against various attack vectors.
By reducing on-chain data and utilizing off-chain computations, the protocol scales efficiently with minimal impact on the Bitcoin network. The logarithmic complexity ensures that large computations can be verified with relatively few steps.
Grail is a system enabling asset transfers between Bitcoin (Layer 1) and Rollups (Layer 2). Operators play a key role in monitoring and assisting with deposits and withdrawals. Grail uses Taproot addresses and SNARK proofs to lock and transfer funds securely between Bitcoin and Rollups.
Carlos
How do we ensure:
- Liveness (now two parties need to be up always, in pair. Which makes it even harder than having only a sequencer).
- Censorship resistance. In this case, it's really hard to see/argue how we can reach it. One may say that having a pool of Operators can make it. But with TornadoCash-style bans. It can happen that censorship is reached.
The active group of operators maintains a multi-signature identity used to pre-sign transactions and optimize operational costs. The MuSig2 two-round protocol is employed to create Schnorr signatures approved by the entire operator set.
Carlos
I need more deteils in this part.
What is this Multisig optimizing and what is it understood by operational costs in the paper?
The deposit process involves initiating, confirming, and completing a deposit. Users specify funding UTXOs, and operators generate pre-signed transactions to facilitate the transfer of funds.
Grail Bridge Deposit Process
To manage deposits efficiently, three smart contract functions coordinate the operations:
Carlos
THis needs to be expanded. How pre-signed transactions specifically help the protocol here?
Why do Operators need to collaborate? Which ones? Whitelist? Random? All of them?
Carlos
Which are the required transactions to be signed by the operators? These pre-seigned transactions mentioned avobe right?
What does it take to confirm the Deposit?
Is there any way on which the signed transactions can be tricked or the user can be lied such that we can confirm but never complete?
Do Operators actually need to prove they've done all the Pre-Signing correctly? Can they trick/be tricked by the user somehow?
Carlos
Expand on SNARK stuff once the issue avobe is clarified.
Does the image represent that the ERC20 contract will verify a proof and depending on it, will transfer to the deposit address?.
If so, Is any of these 2 mentioned in the paper?
Withdrawals can be initiated by operators or users, involving SNARK proofs to transfer funds securely. The system supports coordinated and operator-assisted withdrawals, ensuring smooth operations and minimizing wait times.
Operator-Initiated Withdrawal:
Carlos
This is simply an operator leaving the protocol and getting their stake back right? Also the benefits earned so far? Or not?
Carlos
This
Carlos
The info here is minimal and not clear at all how should it work or if should even be mentioned.
Need to expand on this a lot.
So the operator is getting tokens instead of being burn? If that's the case, this is not inline with which I discussed in the previous call.
Grail uses zkSNARK proofs for transaction inclusion on the Bitcoin network and state transitions on the bridge smart contract. These proofs enhance security and support the bridge's operations.
Carlos
How do we account for confirmations in a proof?
This requires a deeper formalisation!
Carlos
Confirmation of two exclusive things is complex. (Doable of course but also expensive and more difficult).
Would love to go deeper into this and take more notes such that I can get a better sense.
No info in the paper is mentioned about it.
Keep on this tomorrow trying to elaborate all the info I know and continue formalizing.
BitVM vs BitVM2
Just trying to corroborate my understanding of the components overview: