BTB
/

tBTC

Bitcoin Bridgewebsite
tBTC v2 is an ERC-20 token on Ethereum, fully backed by Bitcoin held by threshold-controlled wallets. An agent can hold and transfer tBTC on Ethereum, mint tBTC from a Bitcoin deposit that has been revealed to the Bridge, and unmint or redeem tBTC back to Bitcoin.

What you can do

hold-transfer-tbtcHold and transfer tBTC on EthereumERC-20 calls on 0x18084fbA666a33d37592fA2633fD49a74DD93a88: balanceOf, transfer, approve. Amounts are 18 decimals.
mint-tbtc-from-bitcoinMint tBTC from a Bitcoin depositsend BTC to the deposit address the tBTC app or the tBTC docs give for your Ethereum address (a deposit with a refund locktime). Once the deposit is confirmed and revealed to the Bridge (revealDeposit), the wallet sweeps it and the Bank balance is credited. Then call TBTCVault.mint(amount) with amount a multiple of 10^10 wei. Check isOptimisticMintingPaused() first.
redeem-tbtc-to-bitcoinRedeem tBTC back to BTCapprove TBTCVault for the tBTC amount, then call unmintAndRedeem(amount, redemptionData) with redemptionData encoding the Bitcoin output script. The wallet pays the BTC out later; the payout is not instant.
unmint-to-bankMove tBTC back to the Bank balance without a Bitcoin payoutapprove TBTCVault, then unmint(amount).
Minting and redeeming depend on Bitcoin confirmations and on the threshold wallets. Bitcoin deposits can take hours before tBTC is minted, and BTC payouts take hours too.
Bitcoin deposits must be revealed before their refund locktime or they become refundable to the depositor. Reveal them in time.
tBTC is backed by BTC held in threshold-controlled wallets. A wallet failure, a fraud challenge, or a slashing event can pause or delay redemptions.
Optimistic minting can be paused by guardians. While paused, a deposit may wait for the full sweep before tBTC is minted.

Contracts

Read any function, or build a write and sign it. Amounts are in base units (1 USDC = 1000000).
TBTC v2 tokentoken on ethereum0x18084fbA666a33d37592fA2633fD49a74DD93a88
write approve(address,uint256)
Approve a spender for a tBTC amount in its smallest unit (18 decimals). Approve TBTCVault before unmint or unmintAndRedeem.
read balanceOf(address)
tBTC balance of an address, 18 decimals.
write transfer(address,uint256)
Send tBTC. Amount in wei (18 decimals).
write burn(uint256)
Burn tBTC held by the caller. This does not release Bitcoin. To get BTC back, use TBTCVault.unmintAndRedeem.
TBTCVaultvault on ethereum0x9C070027cdC9dc8F82416B2e5314E11DFb4FE3CD
write mint(uint256)
Mint tBTC from your Bank balance. Argument: amount in tBTC wei, a multiple of the satoshi multiplier (10^10) to avoid dust. The vault takes amount divided by 10^10 satoshis from your Bank balance and mints the same amount of tBTC to you. Requires the vault allowance on the Bank balance.
write unmint(uint256)
Burn tBTC and return the value to your Bank balance (no Bitcoin is sent). Argument: amount in tBTC wei. Approve TBTCVault for the amount first.
write unmintAndRedeem(uint256,bytes)
Burn tBTC and request a redemption to Bitcoin. Arguments: amount in tBTC wei and redemptionData (the encoded wallet, Bitcoin output script and other data the Bridge expects). Approve TBTCVault for the amount first. The Bitcoin payout is made later by the wallet.
read isOptimisticMintingPaused()
True when optimistic minting is paused by a guardian. Check it before expecting a fast mint.
read optimisticMintingDebt(address)
Outstanding optimistic minting debt for an address. Argument: the depositor address.
read optimisticMintingDelay()
Seconds a requested optimistic mint waits before it can be finalized.
Bridge (proxy)bridge on ethereum0x5e4861a80B55f035D899f66772117F00FA0E8e7B
write revealDeposit((bytes4,bytes,bytes,bytes4),(uint32,bytes8,bytes20,bytes20,bytes4,address))
Reveal a Bitcoin deposit to the Bridge so the wallet can sweep it into tBTC. Arguments: fundingTx (version, inputVector, outputVector, locktime, as taken from the Bitcoin transaction) and reveal (fundingOutputIndex, blindingFactor, walletPubKeyHash, refundPubKeyHash, refundLocktime, and vault, which is the TBTCVault address to mint into). The Bitcoin transaction must already be confirmed, and the reveal must happen before the refund locktime.
write requestRedemption(bytes20,(bytes32,uint32,uint64),bytes,uint64)
Request a redemption of tBTC to a Bitcoin output script. Arguments: wallet pubkey hash, the wallet main UTXO (tx hash, output index, value), redeemerOutputScript, and amount in satoshis. Usually called through TBTCVault.unmintAndRedeem instead.
read redemptionParameters()
Current redemption settings such as the request timeout and minimum amount. Read it before sizing a redemption.
read activeWalletPubKeyHash()
The pubkey hash of the wallet currently taking new deposits.
read liveWalletsCount()
Number of live wallets holding BTC for the system.
read isVaultTrusted(address)
True when the Bridge trusts a vault contract to receive minted balance. Check it for the TBTCVault address before using a custom vault.