# Transaction Confirmation, Processing and tgBTC minting

Once the block containing the user’s transaction attains the status of confirmed, the next stage of the Peg-in process begins. The user, or any other network participant, can submit the completed transaction to the TON Teleport BTC system, accompanied by cryptographic proof of the transaction’s inclusion in the confirmed block. This proof is most commonly provided through a Merkle proof. This step ensures that the transaction was indeed part of the Bitcoin blockchain and confirmed by the network.

Smart contracts within TON Teleport BTC then verify the submitted data. They confirm that the transaction is contained within the specified block and extract the necessary information from the transaction, including the amount of BTC transferred and the recipient’s address in the TON blockchain, which was encoded in the BTC deposit address. Upon confirmation of these details, the system mints an equivalent amount of tgBTC into the recipient’s account in TON.

The entire logic for processing Bitcoin transactions is implemented through smart contracts in TON. For the TON blockchain, Bitcoin transactions are essentially just a set of bits. However, specialized smart contracts in TON Teleport BTC are capable of interpreting these data; they ”read” Bitcoin transactions, understand their content, extract necessary information, and use it to execute operations within the TON blockchain.

These smart contracts function similarly to nodes in the Bitcoin network or standard Bitcoin wallets, processing transactions and maintaining conformity between the two distinct blockchains. This functionality allows TON Teleport BTC to automatically and securely manage cryptocurrency assets, transferring them from one network to another. This system is unique and valuable for users who wish to utilize their BTC across a broader spectrum of applications and services within the TON ecosystem.


---

# 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://tgbtc.gitbook.io/docs/whitepaper/key-concepts/peg-in-btc-deposit/transaction-confirmation-processing-and-tgbtc-minting.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.
