> For the complete documentation index, see [llms.txt](https://docs.bitcoinos.build/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.bitcoinos.build/technical-documentation/grail/grail-bridge-deposit.md).

# Grail Bridge - Deposit

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**

1. A user specifies a set of funding UTXOs on the Bitcoin network and requests an address to make a deposit.
2. Operators work together to generate an address and a set of pre-signed transactions.
3. A Taproot address is created using BitSNARK.

**Confirm deposit**&#x20;

1. As soon as the operators have signed the required transactions, the deposit is confirmed, and the user can initiate the transfer.
2. 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**

1. 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
2. The locked UTXOs are registered in the smart contract and remain locked until a SNARK is generated to enable their retrieval.

<figure><img src="/files/MDQRYk6e07G4i7CkGE3V" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.bitcoinos.build/technical-documentation/grail/grail-bridge-deposit.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
