# BTC Cross-Chain Bridge

OpenBit's innovative cross-chain bridge for BTC assets is the industry's first truly secure BTC asset cross-chain bridge. Its security relies on TEE (Trusted Execution Environment) and ZKP (Zero-Knowledge Proof) technologies, rather than the committee model adopted by most current solutions. The core idea is that the deposit address for BTC assets is generated within the TEE's enclave, and the corresponding private key cannot be exported from the enclave. The control program for the private key is also within the enclave, and a transfer operation through the private key will only occur upon the genuine monitoring of corresponding on-chain events. The control program for the private key is open-source and undergoes remote attestation through TEE, allowing anyone to ensure the legitimacy and integrity of the deposit address and control program by examining the source code and remote attestation certificate. The overall structure is illustrated in the diagram below.

<figure><img src="https://1294477177-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FflKJ5L7VKztexLApM9K3%2Fuploads%2FISgd6NdSaimuXkZI4UOe%2Fimage.png?alt=media&#x26;token=4ade5e33-5a09-43e3-a4bd-9a872de362f9" alt=""><figcaption><p>Figure : BTC assets cross-chain bridge</p></figcaption></figure>

As shown in the diagram, there are two programs within the enclave: the Address Generate Program and the Key Control Program. The Address Generate Program is responsible for randomly generating the deposit address and private key for BTC, as well as the public-private key pair for the BTC-ETH conversion contract. The Key Control Program monitors deposit events on the BTC chain. When a deposit event occurs, it calls the BTC-ETH conversion contract using the private key of the contract to mint the corresponding BTC assets on the ETH side for the respective user. It also monitors events of the BTC-ETH conversion contract. When BTC assets on the ETH side are destroyed through this contract, it sends the corresponding assets to the user on the BTC chain. Since both programs are located within the TEE's enclave, a remote attestation certificate can be generated via the CPU, indicating the hash of these two programs, as well as the generated deposit address and public key. The remote attestation certificate, along with the program's source code, deposit address, and public key, will be publicly available on the OpenBit website. Anyone can obtain the remote attestation certificate and interact with the Intel TEE server to verify the authenticity of the certificate. Once the remote attestation certificate is successfully verified, it means that the private key corresponding to the deposit address published by OpenBit is sealed within the enclave and can only be operated by the open-source Key Control Program. No one, including OpenBit's operators, can tamper with the logic of the Key Control Program or obtain the private key for the corresponding address. The BTC-ETH conversion contract's destruction event is only called after the verification of the ZKP proof. Therefore, the combination of TEE and ZKP ensures the security of OpenBit's BTC asset cross-chain bridge.


---

# Agent Instructions: 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://openbitbtc.gitbook.io/docs/btc-cross-chain-bridge.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.
