Bitcoin deposit recipient routing through OP_RETURN
How TeleSwap knows which EVM address gets teleBTC: OP_RETURN carries the 20-byte recipient; a verified Bitcoin deposit tells the contract where to mint.
The Blocktape Editors 2 min read 164b51

TeleSwap routes teleBTC to the EVM address encoded in the Bitcoin deposit’s OP_RETURN output, which the bridge contract reads after the transaction is verified.
Take a deposit of 0.01 BTC to a Locker, with an OP_RETURN output carrying a chain ID and the recipient address 0xAb…12. The chain ID points to Polygon, and the 20-byte address tells the contract where to mint teleBTC.
How TeleSwap reads the recipient from a Bitcoin deposit
The Bitcoin transaction carries the recipient because Bitcoin itself has no EVM accounts. Its OP_RETURN output holds data and is provably unspendable; in this case, that data includes the destination chain and recipient.
- Bitcoin payment: 0.01 BTC to a Locker.
- OP_RETURN data: chain ID and 20-byte EVM recipient.
- Bridge result: teleBTC minted to that recipient on Polygon.
Relayers post Bitcoin block headers to the Bitcoin relay contract. They submit a Merkle proof showing that the deposit transaction belongs to a relayed block; the bridge contract verifies the proof, parses the request, and uses the encoded address as the mint destination.
The sender’s Bitcoin address does not choose the recipient. The bytes in OP_RETURN do: if they encode 0xAb…12, the contract mints to 0xAb…12, regardless of which Bitcoin address sent the BTC. For more on this recipient path, TeleSwap covers how the Bitcoin bridge reads OP_RETURN data and uses it to mint teleBTC at the encoded EVM address.
Check the address before the Bitcoin transaction is sent
The 20-byte recipient field does not preserve an EIP-55 checksum. EIP-55 uses mixed letter case to help catch typing errors in an EVM address, but raw address bytes contain no case information for that check.
That makes the address check before encoding the key guard. A one-character typo can still decode as a valid address, and once the Bitcoin transaction is broadcast, the bridge can mint teleBTC to that address even if nobody controls it.
For a new bridge user, the path is direct: the deposit requests a destination, Bitcoin records it as data, and the verified request supplies the mint address.
- The OP_RETURN bytes choose the EVM recipient.
- The Bitcoin sender address does not affect that choice.
- Validate the address before encoding; the checksum is not carried in the 20 bytes.