DEV Community

Earlene Feil
Earlene Feil

Posted on

TeleSwap Architecture: How Do Lockers, Relayers and SPV Work?

TeleSwap bridges BTC by having relayers post Bitcoin headers to an EVM contract, Lockers hold deposited BTC, and SPV proofs authorize teleBTC minting once a deposit appears in the verified chain. For someone moving BTC into DeFi, TeleSwap turns that deposit into an EVM asset and provides a route back to native BTC. Burning teleBTC obliges a Locker to pay BTC; on-chain verification checks the Bitcoin transactions, while collateral and slashing enforce the Locker’s obligation.

How Does TeleSwap Verify Bitcoin Headers on EVM?

TeleSwap uses relayers to bring Bitcoin block headers to an EVM relay contract. A header contains a block’s Merkle root, its previous block hash, and the data needed to check proof-of-work. The contract checks that submitted headers link into a chain and meet the required proof-of-work before other contracts use them to verify transactions.

Relayers supply data; they do not get to declare a deposit valid. That distinction matters when a relayer stops submitting headers: the relay falls behind Bitcoin, so a real deposit cannot yet be proved against it, but the stalled relayer cannot turn an invented deposit into a mint. A fabricated header would need valid proof-of-work at the required difficulty and a valid place in the header chain.

Difficulty matters here. Bitcoin retargets it every 2,016 blocks, so a verifier must account for the applicable target rather than accept a hash that merely looks small. A practitioner watches the relay’s latest accepted Bitcoin height and whether it has passed any retarget boundary. Those details tell them whether the contract has the header data needed for the next proof.

Section 8 of Satoshi Nakamoto’s Bitcoin: A Peer-to-Peer Electronic Cash System explains why headers plus a Merkle branch can establish that a transaction was included in a block with subsequent work behind it. That finding assumes an honest Bitcoin mining majority. SPV checks inclusion and accumulated work; it is not a full Bitcoin node’s validation of every transaction rule, and its use here also depends on correct relay contracts and an appropriate confirmation threshold.

How Does a BTC Deposit Become teleBTC?

A BTC deposit becomes teleBTC after the user sends BTC to a Locker with the request data, Bitcoin confirms the transaction, and an SPV proof passes verification on the EVM chain. The request data identifies how the bridge should handle the deposit, including its intended destination. TeleportDAO’s bridge then mints teleBTC against BTC held by the Locker on EVM chains such as Polygon and BNB Smart Chain.

Take a user wrapping BTC for an EVM wallet. First, their Bitcoin transaction pays the selected Locker and carries the request data. At this point the BTC has moved, but teleBTC has not been minted. Next, Bitcoin miners include the transaction in a block and more blocks add confirmations. The relay must then contain the relevant headers, including enough later headers for the required confirmation depth.

Only after those prerequisites are available can a proof submitter provide the Bitcoin transaction and its Merkle branch. The branch connects the transaction hash to the Merkle root in the accepted block header. The EVM contract also checks the deposit’s amount, destination and request against the bridge rules before minting. The reader can recognize readiness by seeing the deposit confirmed on Bitcoin and the relay advanced beyond its block by the required depth.

This dependency explains a common wait: a confirmed Bitcoin payment alone is insufficient for minting if its header has not reached the EVM relay. Conversely, a current relay cannot prove a transaction that is still unconfirmed. Once the proof is accepted, the user has teleBTC, an EVM token representing a claim on the BTC under the Locker and redemption rules.

How Does Burning teleBTC Release BTC?

Burning teleBTC starts a redemption request that requires a Locker to pay native BTC to the specified Bitcoin address within the protocol’s deadline. The burn removes the EVM claim from circulation. It does not itself move a Bitcoin coin, because the Locker controls the BTC that backs the claim.

Follow the same user on the way out. They burn teleBTC on the EVM chain and name a Bitcoin receiving address. The Locker now has an outstanding payment obligation. It broadcasts a Bitcoin transaction paying that address, waits for the required confirmations, and supplies an SPV proof of payment through the relay. When the proof is accepted, the on-chain obligation can be marked fulfilled.

A confirmed burn and a completed redemption are therefore different states. The detail to watch is the Locker’s Bitcoin payment and the deadline measured under the protocol’s rules. A Bitcoin transaction may be visible before its proof is ready, while a missed deadline calls for the collateral remedy rather than another mint or burn.

What Happens When a Relayer or Locker Fails?

A failed relayer primarily delays proof acceptance; a failed Locker can delay or withhold the BTC it owes. Relayers cannot mint teleBTC simply by submitting false claims, because minting requires a deposit proof against accepted Bitcoin headers. If headers stop arriving, the deposit remains unproved on the EVM side until relaying resumes. That is a liveness problem for minting, not permission for a relayer to create unbacked teleBTC.

A Locker’s failure has a different remedy. If it misses its BTC payment deadline, the protocol can slash its posted collateral and compensate the user under its rules. TST, TeleportDAO’s token, can form part of Locker collateral. The practical protection depends on sufficient collateral value and a working slashing process; it is an economic guarantee tied to assets and contract execution, rather than a Bitcoin payment that appears automatically after a burn.

This split defines the security model. The bridge verifies Bitcoin events on-chain, while Lockers hold the BTC and face penalties for failing to return it. THORChain and Chainflip use validator sets for their cross-chain systems; the useful comparison is which actors attest to an event, which actors hold assets, and what enforces repayment. Apply those criteria to a route instead of treating all bridges as having the same trust assumptions.

What Should You Watch While a Transfer Is Pending?

A pending transfer is easiest to diagnose by locating its last completed state. On a wrap, look for the Bitcoin deposit first, then its confirmations, then the relay height, and finally the accepted SPV proof and teleBTC mint. A delay before confirmation belongs to Bitcoin settlement. A confirmed deposit whose header is absent from the relay points to relaying. A current relay with no mint points to proof submission or verification.

On an unwrap, start with the EVM burn, then look for the Locker’s Bitcoin payment and its proof before the deadline. EVM confirmation establishes that the request exists; Bitcoin payment establishes that the BTC was sent. Keeping the Bitcoin transaction ID, burn transaction and requested receiving address together makes each stage easier to distinguish.

  • Identify whether you are wrapping BTC or redeeming teleBTC, and record the relevant transaction and destination address.
  • Trace Bitcoin confirmations, relay progress and SPV proof acceptance in that order for a wrap.
  • For an unwrap, trace the burn, Locker payment, payment proof and deadline; use the collateral remedy if the Locker misses its obligation.

Top comments (0)