Start typing to search this publication.
crypto.news logo crypto.news
Open menu
crypto.news logo

Subscribe to crypto.news

Get new posts delivered straight to your inbox.

How Does TeleSwap Verify Bitcoin Transactions Before Minting?

crypto.news avatar crypto.news
5 min read

A Bitcoin deposit headed for an EVM chain is verified by TeleSwap when its light-client contract checks relayed Bitcoin headers for proof of work, waits for enough later headers, matches the deposit’s transaction ID to an accepted block’s Merkle root, and uses the verified transaction to mint teleBTC.

  • The deposit needs a payment to a Locker and a request identifying the EVM recipient.

  • The proof needs Bitcoin block headers, a Merkle branch, and the raw transaction bytes.

  • The result is teleBTC for the recipient after the bridge checks the payment and deducts applicable fees.

How Does TeleSwap Check a Bitcoin Deposit?

TeleSwap checks a Bitcoin deposit by connecting a specific Locker payment to a sufficiently confirmed Bitcoin block, then reading the payment request from that same transaction. Take an illustrative deposit: you send 0.1 BTC to a Locker, a participant that holds BTC against collateral, and include an OP_RETURN output naming a recipient on Polygon. OP_RETURN carries request data in the Bitcoin transaction; the payment output carries the BTC amount.

The Bitcoin transaction first exists on Bitcoin. It has a transaction ID, or txid, and, once mined, a place in a block. The Polygon recipient has no teleBTC yet. The Bitcoin-EVM bridge contracts need evidence of both the block and the transaction before they can act on the request.

The TeleSwap bridge lets a reader follow how BTC value becomes usable on an EVM chain. For more on its Bitcoin bridge and cross-chain swaps, visit teleswap.net.

That division of work matters. A Locker holds the deposited BTC, while the contracts decide whether the claimed deposit qualifies for a mint. The recipient named in OP_RETURN is part of the transaction being checked, so a proof for someone else’s deposit cannot supply a new recipient or amount.

How Do Bitcoin Headers Become an Accepted Block?

The Bitcoin relay contract accepts a deposit block only after relayed headers form a valid proof-of-work chain and enough later headers have been added. Relayers submit Bitcoin block headers to the EVM contract. Each header contains the previous header’s hash, a difficulty target, and a Merkle root that commits to the block’s transactions.

The contract checks that the headers link in order and that each header’s hash meets its target. Bitcoin adjusts that target every 2016 blocks, so a relay must handle the change at a retarget boundary. A relayer supplies the data, but the contract checks the work represented by the headers. That is how the EVM chain can evaluate Bitcoin evidence without relying on a signer set to attest that a deposit happened.

A newly relayed deposit block remains pending for the bridge’s required number of later headers. Those added headers put more proof of work on top of the block. The wait matters because Bitcoin can briefly have competing branches: accepting the first header seen would make a mint depend on a block that might soon lose its place in the chain.

This is the header-and-Merkle-branch method described in Section 8 of the Bitcoin whitepaper. The section explains how later blocks strengthen confidence that a transaction’s block has been accepted. The relay applies that idea on an EVM chain, with its confirmation threshold set by the bridge rather than by the illustrative 0.1 BTC amount.

How Does a Merkle Proof Lead to teleBTC?

A Merkle proof leads to teleBTC only when the bridge ties the proven txid to raw transaction bytes and finds the required Locker payment and request in those bytes. Bitcoin hashes the txids in a block into a Merkle tree; its root sits in the block header. A Merkle proof supplies the neighboring hashes needed to recompute that root from one txid.

For the illustrative deposit, the proof starts with its txid and ends at the Merkle root in the accepted header. The contract recomputes the path and compares the result with the stored root. A match places that txid in that block. The proof carries hashes, though, while the mint needs an amount, a Locker payment, and a Polygon recipient.

The raw Bitcoin transaction supplies those details. The bridge hashes the submitted bytes according to Bitcoin’s txid rules and compares the result with the txid in the Merkle proof. It then parses the transaction outputs: one output pays the Locker, and the OP_RETURN output carries the cross-chain request. Because the bytes must hash to the proven txid, the amount and recipient come from the transaction committed to by the accepted Bitcoin block.

That is the crucial handoff. The Merkle proof establishes which transaction Bitcoin included; hashing the raw bytes binds readable outputs to that inclusion proof. Without that binding, a caller could present valid proof material while making an unrelated claim about what the transaction paid or requested.

After the checks pass, the bridge mints teleBTC for the named recipient, less applicable fees. In the illustrative case, the 0.1 BTC payment remains a Bitcoin payment held by the Locker; it has not moved onto Polygon. What changes is that the recipient receives a corresponding EVM token balance backed by the bridge’s BTC arrangement. The original txid, outputs, and OP_RETURN request remain the evidence for why that balance was created.

The relay’s role, who supplies its data, and how it handles competing blocks explain the remaining parts of this verification path.

What Is a Bitcoin Relay Contract?

A Bitcoin relay contract is an on-chain light client that stores and checks Bitcoin headers so another contract can test whether a txid belongs to an accepted block. In TeleportDAO’s Bitcoin-EVM bridge contracts, that header record gives the minting logic a Bitcoin reference it can verify on the EVM chain.

Who Submits Bitcoin Block Headers to TeleSwap?

Relayers submit headers to the Bitcoin relay contract. Their job is to bring Bitcoin data on-chain; the contract checks header links and proof of work. A separate transaction proof supplies the Merkle branch and raw deposit transaction when the bridge processes the mint.

What Happens If a Bitcoin Block Is Reorganized?

A Bitcoin reorganization can replace a recent deposit block with a competing branch. Before the relay’s confirmation threshold is met, the deposit must wait; a proof against a block that loses its place cannot establish inclusion in the accepted branch. Waiting for later headers reduces that risk, though a sufficiently deep reorganization remains a risk of SPV-style verification.

To trace a real deposit, start with its Bitcoin txid and identify the Locker output and OP_RETURN request. Then follow its block header, later headers, Merkle proof, and EVM mint transaction in order; each item answers a different part of why the recipient received teleBTC.

Subscribe to crypto.news