Home / Markets News & Opinions / BTC Relay Bridges BTC With Ethereum, Allowing BTC Verification For Smart Contracts

BTC Relay Bridges BTC With Ethereum, Allowing BTC Verification For Smart Contracts

Last Updated April 10, 2023 4:27 AM
Lester Coleman
Last Updated April 10, 2023 4:27 AM

ConsenSys, a blockchain technology company, and Ethereum have developed BTC Relay , an Ethereum contract that allows Ethereum users to pay with bitcoin. Servicing as a bridge between Ethereum and bitcoin, BTC Relay is a tool for developers who want to verify bitcoin transactions for Ethereum and smart contract applications.

BTC Relay image

Community members, called Relayers, provide BTC Relay with new bitcoin block headers generated by bitcoin miners. Ethereum app developers can make API calls to BTC Relay from smart contracts to verify bitcoin network activities.

Anyone can join the Ethereum network and become a Relayer. There is no hardware or electricity cost.

How It Works

BTC Relay uses the block headers to build a small version of the bitcoin blockchain. The method is also used by Bitcoin Simplified Payment Verification (SPV), a scheme described in section 8 of the original bitcoin white paper .

Relayers send the block headers to BTC Relay. When a transaction is verified in the block, or the header is retrieved, Relayers are rewarded a fee. The fees are sent when transactions are verified in the block or the header is retrieved. The Relayer of the header earns a fee that is usually specified when the Relayer submits the header.

The cycle of Relayers submitting headers – then applications processing bitcoin payments and rewarding Relayers with fees – enable the system to be self-sustaining and autonomous.

Details are available on GitHub (https://github.com/ethereum/btcrelay/tree/master#incentives-for-relayers ).

An Open Source Project

ConsenSys launched BTC Relay in May, describing it as an open source project allowing Ethereum-based networks to interoperate programmatically with the bitcoin network, and eventually integrating with other Ethereum and bitcoin-based systems.

BTC Relay does not grant special privileges to any party, ConsenSys noted in a press release. Ethereum developers can use BTC Relay to implement a “pay with bitcoin” button in Ethereum-based decentralized applications, enabling bitcoin holders to interact with decentralized applications and smart contracts on the Ethereum platform.

EtherEx, a decentralized exchange, has added BTC Relay as a mechanism for exchanging bitcoin with Ether without any counterparty risk.

Another use is issuing an Ethereum-based BTC token (ETHBTC) based on locking BTC tokens in a multisig on the bitcoin protocol, a bidirectional bridge between ETHBTC and BTC.

BTC Relay was funded and conceived under the Ethereum Foundation. ConsenSys adopted and supported it when Joseph Chow, the developer of BTC Relay, joined ConsenSys. Wanxiang Blockchain Labs funded an independent security audit and rewards for a bug bounty program.

More Innovation Expected

“BTC Relay is a building block and I look forward to the infrastructure, applications, and innovations that BTC Relay helps enable on and off the Ethereum platform,” Chow said. “The possibilities are exciting.”

Vitalik Buterin, the inventor of Ethereum, said he was excited to see BTC Relay provide the first-ever production release of such cross-blockchain communication of this kind. He said he hopes to see it set an example for interoperating cross-blockchain applications, whether between Ethereum and bitcoin, other blockchains and Ethereum and public and private or consortium chains.

Joseph Lubin, founder and CEO of ConsenSys, called BTC Relay a powerful tool enabling Ethereum smart contracts to serve as SPV wallets for other Ethereum-based networks or blockchain-based systems in permissioned, or open permissionless implementations.

With this capability, Ethereum, on account of the stateful, computational power of its smart contract and EVM capabilities, can serve as a substrate for many “glue” protocols that will join blockchain networks and other decentralized services into an Internet of decentralized systems.

Lubin said:

We envision a world of many purpose-built private enterprise and consortium blockchain systems, in addition to public blockchain networks, and BTC Relay and its extensions can enable them all to easily interoperate.

Featured image from Shutterstock. Story image from BTC Relay.