Grail Bridge - Deposit
Last updated
Last updated
Three smart contract functions are used to coordinate operations for a deposit on the bridge. For clarity, “a user” refers to a user of the bridge, not an agent such as the operator.
The Bridge - 3 Smart Contracts
Initiate deposit
A user specifies a set of funding UTXOs on the Bitcoin network and requests an address to make a deposit.
Operators work together to generate an address and a set of pre-signed transactions.
A Taproot address is created using BitSNARK.
Confirm deposit
As soon as the operators have signed the required transactions, the deposit is confirmed, and the user can initiate the transfer.
The user can verify that the address has been generated correctly and that all the requisite transactions have been signed before transferring their funds.
Complete deposit
Given a proof of transfer to the accepted bridge deposit address on the Bitcoin network, the equivalent amount of the rollup’s ERC20 token is transferred to the user in the rollup
The locked UTXOs are registered in the smart contract and remain locked until a SNARK is generated to enable their retrieval.