Skip to content
Crypto Blog

Crypto guides and market analysis

Bitcoin Header Relays Let EVM Contracts Check Deposits

A Bitcoin header relay sends block headers to an EVM contract, which checks links and proof of work so bridge contracts can verify deposits with Merkle proofs.

Crypto Blog Newsroom4 min read

Bitcoin Header Relays Let EVM Contracts Check Deposits

A Bitcoin header relay sends block headers to an EVM contract, which checks their links and proof of work so bridge contracts can verify transaction inclusion; EVM contracts need the relay because they cannot read Bitcoin directly.

  • Header size: 80 bytes.
  • Key fields: previous-block hash and Merkle root.
  • Proof: a transaction’s Merkle proof connects it to an accepted header.

Bitcoin headers let an EVM contract check the chain

A Bitcoin header is a compact summary of a block that links it to the prior block and commits to its transactions. Its 80 bytes contain the previous-block hash, Merkle root, and fields used to identify and validate the block, including its version, timestamp, target and nonce. The header does not contain the full transaction list.

Relayers submit headers to an EVM light-client contract, which checks that each header extends a known parent and that its hash meets the required proof-of-work target. For background on the light-client layer behind this approach, see how TeleportDAO verifies Bitcoin on EVM; TeleSwap uses accepted Bitcoin data to support its deposit checks.

Proof of work means the header hash, interpreted as a number, must be at or below the target encoded in the header. But checking a hash against a target supplied with that same header is not enough. A low-difficulty chain could otherwise present linked headers whose hashes meet easy targets.

The contract must also check that the target is the one Bitcoin’s rules require at that point in the chain. Bitcoin adjusts difficulty at retarget boundaries based on the preceding period. A relay therefore needs enough verified history to calculate the expected target, apply the retarget rules, and reject headers that claim an easier target. Hash links show ancestry; target checks establish that the claimed proof of work meets Bitcoin’s rules.

When competing branches appear, the light client also needs a rule for tracking the chain with the most accumulated work and handling reorganizations. The precise checks and any confirmation policy depend on the relay implementation. Later headers add evidence that a transaction’s block remains on the followed chain, but they do not make a deposit irreversible.

A Merkle proof connects a Bitcoin deposit to an accepted header

A Merkle proof shows that a transaction belongs to the block named by an accepted header. The proof supplies the transaction identifier and the relevant sibling hashes in the block’s Merkle tree. The EVM contract combines those values according to the tree’s hashing rules and checks whether the result matches the Merkle root in the header.

Picture a user sending BTC to a bridge address. Once the deposit transaction is included in a Bitcoin block, someone can submit its Merkle proof to the EVM bridge contract along with a reference to that block’s accepted header. If the calculated root matches the header’s Merkle root, the contract can check transaction inclusion. Later headers can provide confirmation that the block sits within the chain the relay follows.

For a constructed use case, imagine a Bitcoin holder wants to receive a corresponding asset on an EVM chain. The bridge needs evidence that the BTC deposit reached its designated address. The relay makes Bitcoin headers available to the EVM contract; the Merkle proof ties the deposit transaction to one of those headers. Together, they let the bridge check inclusion without asking the EVM chain to store or scan full Bitcoin blocks.

That check has a defined scope: a Merkle proof establishes inclusion in a block, while the light client’s header and proof-of-work checks establish how that block relates to the Bitcoin chain it tracks. Bridge contracts can use both pieces when applying their own deposit rules. The exact flow, including which contract verifies each piece, varies by bridge.

TeleportDAO implements a Bitcoin light client as a smart contract, making accepted Bitcoin data available to bridge contracts. This gives TeleSwap a way to use on-chain verification when checking a Bitcoin deposit. For a user, the practical result is that deposit verification can rely on evidence tied to Bitcoin’s headers rather than a claim alone.

Related

What information does a Bitcoin block header contain?

A Bitcoin block header contains an 80-byte summary with a previous-block hash, a Merkle root and fields used to validate the block, including the target-related bits and nonce. The Merkle root commits to the block’s transactions.

Can an EVM contract verify Bitcoin data without storing full blocks?

An EVM contract can check Bitcoin transaction inclusion using an accepted header and a Merkle proof. It needs the relay to provide and validate Bitcoin header data, since the contract cannot read Bitcoin directly.

When assessing a bridge deposit, look for how its contracts validate header targets and transaction inclusion. That is the path from a Bitcoin payment to evidence an EVM contract can check.