tgBTC Docs
  • Intro to TON Teleport BTC
  • USER GUIDES
    • Testnet in TON
    • Signet in BTC (for PC)
    • Signet in BTC (for Mobile)
    • Mint your first tgBTC
    • Burn your tgBTC for BTC
    • View transaction history
    • Common errors and solutions
    • How passwords keep you safe
  • DEVELOPMENT
    • Build first tgBTC dApp
    • tgBTC API by TONX
  • INFORMATION DESK
    • FAQ
    • Key resources
  • Whitepaper
    • Abstract
    • Declaration of Trustlessness
    • Overview
    • Key Concepts
      • Peg-in (BTC Deposit)
        • Bitcoin Simplified Payment Verification Client
        • Transaction Confirmation, Processing and tgBTC minting
      • Peg-out (tgBTC Withdraw)
        • Building of Withdrawal Transactions
        • DKG and FROST
        • Peg-out Timing and Optimizations
      • Additional Components and Security Mechanisms
        • Bitcoin Transaction Fees
        • Validator Rotation and Key Management
        • Refund Mechanism for Expired Deposits
        • Consensus-based System Updates
        • Inspectors
    • Expanding Possibilities and Value for TON
    • Conclusion
    • Papers
Powered by GitBook
On this page
  1. Whitepaper
  2. Key Concepts
  3. Peg-out (tgBTC Withdraw)

Building of Withdrawal Transactions

Before the TON Teleport BTC system starts operating, a critical preparatory stage occurs—the DKG process, which involves all active validators. This process is repeated with each change of validators and serves to create a common public key used for signing withdrawal transactions. Details of this process are described in the technical specification and are crucial for understanding how the security and reliability of validators are ensured when signing transactions.

During the system’s operation, users perform Peg-in transactions, the results of which are the recording of available UTXOs (Unspent Transaction Outputs) in the TON blockchain. These UTXOs represent registered incoming transactions whose funds have not yet been spent or converted back into BTC.

When smart contracts receive a command to burn tokens, a special withdrawal contract is automatically activated. This contract aggregates all available UTXOs collecting incoming funds from all users who have performed Peg-ins, and forms two outputs:

  1. The first output is directed to the user who initiated the withdrawal.

  2. The second output is returned to the system’s ”bank,” allowing the accu- mulation and control of the balances of unspent funds in a single address.

After collecting all necessary data and forming the outputs, the transaction signing process begins using the FROST protocol. This process includes several steps—from commitment to the aggregation of signatures. Upon completion of this process, a ready-to-send Bitcoin transaction is formed in the smart contract.

The final transaction, containing all necessary signatures and requiring no further modifications, can be sent to the Bitcoin network by any participant. This ensures transparency and openness of the process, as the transaction is already fully formed and verified, eliminating the possibility of its alteration or manipulation.

PreviousPeg-out (tgBTC Withdraw)NextDKG and FROST

Last updated 6 months ago