Overview
Deposits are finalized through a three-step MuSig2 signature aggregation process coordinated by the aggregator. The process ensures that all verifiers collaboratively sign transactions without any single party having control over the funds.Participants
Verifiers (Signers)
- Hold partial signing keys in an N-of-N multisignature setup
- Generate nonces and partial signatures for deposit transactions
- Participate in MuSig2 aggregation protocol
- Validate deposit scripts and security requirements
Aggregator
- Coordinates the signature aggregation process
- Collects nonces from all verifiers
- Distributes aggregated nonces back to verifiers
- Aggregates partial signatures into final signatures
- Creates the move transaction
Operators
- Provide withdrawal infrastructure (kickoff UTXOs)
- Supply BitVM assert data and watchtower challenge acknowledgment hashes
- Receive collateral funding requirements
Watchtowers
- Monitor operator behavior
- Provide Winternitz public keys for challenge mechanisms
- Verifiers automatically act as watchtowers
Deposit Types
Base Deposit
Created by users who want to bridge Bitcoin to Citrea L2. Required data:- User’s EVM address (destination on Citrea)
- Recovery taproot address (for timelock recovery)
- Deposit outpoint (Bitcoin UTXO)
- Base deposit script with N-of-N aggregated public key and EVM address
- Timelock script allowing user recovery after
user_takes_afterblocks
Replacement Deposit
Created by the security council to migrate funds to a new deposit structure (e.g., bug fixes or upgrades). Required data:- Old move transaction ID being replaced
- Security council M-of-N multisig parameters
- Replacement deposit script referencing the old move txid
- Security council multisig script for emergency unlocking
Three-Step MuSig2 Process
Nonce Aggregation
Each verifier generates a nonce pair (secret and public) for the deposit transaction.The aggregator:
- Collects public nonces from all verifiers
- Aggregates nonces using MuSig2 protocol
- Sends the aggregated nonce back to all verifiers
Signature Aggregation
With the aggregated nonce, verifiers create partial signatures.The aggregator:
- Requests partial signatures from all verifiers for the aggregated nonce
- Each verifier creates a partial signature for the move transaction
- Aggregates partial signatures using MuSig2
- Verifies the final Schnorr signature
- Sends the final signature to verifiers
Move Transaction Creation
Verifiers use the aggregated signatures to finalize the deposit.The aggregator:
- Receives move transaction partial signatures from verifiers
- Aggregates the move tx signatures
- Creates the final move transaction
- Broadcasts the transaction to the Bitcoin network (if automation is enabled)
Key Collection and Distribution
Before deposit finalization, the aggregator orchestrates key collection: The aggregator collects from operators:- BitVM Winternitz public keys for assert transactions
- Watchtower challenge acknowledgment hashes
- Round transaction data
N-of-N Security Model
Why N-of-N?
Funds stay in an N-of-N setup, which differs from traditional M-of-N multisig:- Key Deletion Covenant: Functions as a covenant restricting how UTXOs can be spent
- Security Guarantee: Funds remain safe as long as at least one signer’s key is secure
- Liveness Guarantee: System remains operational as long as at least one operator participates
Security Council Backup
The Bridge Contract maintains a separate M-of-N multisig that can:- Update the N-of-N signer set if needed
- Subject to time restrictions (e.g., one month for updates)
- Allows participants to exit if they don’t trust new signers
Advantages Over M-of-N
- Stronger Security: Existing deposits remain protected by original N-of-N covenant
- Upgrade Path: New deposits can use updated signer sets
- Exit Window: Time-delayed updates allow users to withdraw if concerned
Deposit Validation
Verifiers validate deposits by checking:-
Script Correctness
- Deposit address contains required taproot scripts
- N-of-N aggregated public key matches verifier set
- Recovery timelock uses correct parameters
-
Actor Uniqueness
- All verifiers have unique public keys
- All watchtowers have unique public keys
- All operators have unique public keys
-
Security Council Configuration
- Threshold ≤ number of public keys
- Public keys are valid X-only public keys
- Order is preserved (affects multisig script)
Database Persistence
Deposit data is stored in PostgreSQL including:- Deposit outpoint and type
- Actor public keys (verifiers, operators, watchtowers)
- Security council configuration
- Cached N-of-N aggregated public key
- Move transaction ID
Related Endpoints
POST /api/v1/deposit- Submit new depositGET /api/v1/deposit/{txid}- Query deposit statusGET /verifier/params- Get verifier public keyGET /operator/xonly_public_key- Get operator public key
Code References
- Deposit data structures:
core/src/deposit.rs - MuSig2 implementation:
core/src/musig2.rs - Aggregator coordination:
core/src/aggregator.rs - Move transaction creation:
core/src/builder/transaction/deposit_signature_owner.rs