BTC-Relay is the key component of the BTC Parachain on Polkadot, announced earlier in March. It’s main task is to allow the BTC Parachain to verify the state of Bitcoin and react to transactions and events. Specifically, BTC-Relay acts as a stateful Bitcoin SPV/light client on Polkadot, storing Bitcoin block headers and allowing users to verify transaction inclusion proofs. Further, it is able to handle forks and follows the chain with the most accumulated Proof-of-Work — the Bitcoin main chain.

BTC-Relay is the first piece to the BTC Parachain implementation in Rust using Parity’s Substrate framework and follows the previously released specification. The code is hosted on Gitlab and mirrored to Github:

BTC-Relay Functionality

Interlay’s BTC-Relay is a stateful SPV client for Bitcoin, implemented as part of the BTC Parachain’s runtime environment.

Verify and store Bitcoin block headers,

Handle Bitcoin forks / blockchain reorganizations,

Verify transaction inclusion proofs,

Validate Bitcoin’s transaction format, as accepted by XCLAIM (P2PKH/P2WPKH/P2SH + OP_RETURN).

We also provide a Rust Bitcoin library for handling Bitcoin data types, parsing block headers and transactions, and verifying Merkle tree proofs.

BTC-Relay is an integral component of the BTC Parachain, allowing the Polkadot ecosystem to reliably verify the state of Bitcoin.

BTC-Parachain

The BTC-Parachain uses XCLAIM to enable issuing and redeeming of tokens 1:1 backed by Bitcoin: PolkaBTC. On a high level, XCLAIM follows three main phases:

Issue : Create Bitcoin-backed tokens, so-called PolkaBTC on the BTC-Parachain.

: Create Bitcoin-backed tokens, so-called PolkaBTC on the BTC-Parachain. Transfer : Transfer PolkaBTC to other users or migrate to other Parachains within the Polkadot ecosystem.

: Transfer PolkaBTC to other users or migrate to other Parachains within the Polkadot ecosystem. Redeem: Burn Bitcoin-backed tokens on the BTC-Parachain and receive 1:1 of the amount of Bitcoin in return.

XCLAIM guarantees that Bitcoin-backed tokens can be redeemed for the corresponding amount of Bitcoin, or the equivalent economic value in DOT. XCLAIM is:

Financially Secure : intermediaries pledge collateral and cryptographically prove correct behavior. Any attempt of theft is automatically punished, while users are reimbursed.

: intermediaries pledge collateral and cryptographically prove correct behavior. Any attempt of theft is automatically punished, while users are reimbursed. Dynamic and Permissionless : any user can become their own intermediary — simply, anytime, and without asking for permission. No need to rely on someone else, or any special hardware.

: any user can become their own intermediary — simply, anytime, and without asking for permission. No need to rely on someone else, or any special hardware. Fast and Efficient: XCLAIM is on average 95% faster and 65% cheaper than using HTLC atomic swaps with Bitcoin (measured for 1000 BTC-ETH swaps).

This open-source R&D project, based on top-tier academic research, is funded by a Web3 Foundation grant.

What’s next?

With BTC-Relay in place, we are moving on to implement XCLAIM(BTC,DOT), which handles issuing and redeeming of Bitcoin-backed assets on Polkadot — to be released as open source in mid May.

We are also actively seeking to integrate XCLAIM with other blockchain projects. If you want to bridge your system to existing cryptocurrencies such as Bitcoin, ZCash, or Ethereum, or the BTC Parachain itself — reach out to us (contact@interlay.io) or join our Telegram channel.

Last but not least, we are hiring!

Helpful Links