eth

Ever since Ethereum went live about a year ago there have been critics who questioned the need to launch another blockchain with its own cryptographic token to secure the network. But it doesn't mean that both blockchains can't succeed or interoperate, states Joseph Chow, creator of BTC Relay.

Progress has been made combining the two recently by RSK for instance, and Bitcoin's own Sidechains project has lots of intellectual horsepower driving it on.

BTC Relay is a bridge between Bitcoin and Ethereum. In simple terms, it allows a user to pay with Bitcoin to use Ethereum.

BTC Relay is an Ethereum contract, that other Ethereum contracts and decentralised applications (DApps) can use, that is a trust-free way of verifying a Bitcoin payment; there are no intermediaries that need to be trusted with certifying that a Bitcoin transaction took place.

Chow explains how Ethereum and Bitcoin are the innovations that make this freedom from trust possible. He told IBTimes UK: "Ethereum's statefulness and programming language allows applications to be built, and this power, combined with the innovation of Bitcoin SPV (simplified payment verification), allows BTC Relay to be trustless: from the static code itself you are ensured that BTC Relay outputs are not cheating, and BTC Relay does not need to trust whoever provides it with inputs."

BTC Relay is also a foundation for a trust-free oracle for the Bitcoin blockchain. Using BTC Relay, Ethereum smart contracts can set predictions and get answers to a range of questions from what is the Bitcoin difficulty, to whether the Bitcoin blocksize has increased, said Chow.

"BTC Relay is a building block that Ethereum smart contracts can use to verify Bitcoin transactions. A simple example is an application for a trust-free exchange of BTC and ETH. An ETH seller would put ETH in a contract. The contract's terms could be to only release the ETH when a BTC payment to a certain BTC address is made. So the ETH buyer pays the BTC and uses BTC Relay to pass along the Bitcoin transaction to the contract.

"BTC Relay will only do this if the payment transaction is valid and then the contract can check that the transaction sent the correct number of BTC to the correct BTC address, and then pay out the ETH. There is no need for the buyer or seller to trust each other, or trust that an escrow will not steal their funds."

As a free-trust oracle, BTC Relay can contribute to current applications, as well as emergent behaviour, said Chow. BTC Relay has been used as a random number generator (RNG). "Since it is more costly to produce a Bitcoin block than an Ethereum block, an RNG using Bitcoin blockhashes is more costly to manipulate and so can be used to secure more funds."

One of the early uses of BTC Relay has been a lottery, while an example of BTC Relay's role in an emergent use case is a prediction market on whether the Bitcoin blocksize has been increased with the adoption of a particular fork of Bitcoin.

Chow said in the future issues of scalability and the problem of flooding blockchains with small transactions would be mitigated by off-chain state networks like Raiden and the Lightning Network.

Regarding question surrounding fees, Chow said BTC Relay stores the Bitcoin "header" chain; instead of storing the Bitcoin blockchain, where blocks are currently up to 1 million bytes, BTC Relay stores block headers, which are each 80 bytes.

He said: "In Bitcoin, new blocks are produced every 10 minutes on average, so the corresponding block headers need to be fed to BTC Relay.

"Thus, BTC Relay needs the help of the community to keep it updated, similar to how blockchains need miners to build blocks. These community members can be called relayers (of Bitcoin block headers)."

Storing a header on BTC Relay consumes gas so instead of relying solely on the altruism of relayers, BTC Relay provides an incentive for anyone to become a relayer.

"The basic incentive is that a relayer of a header, say block 420000, can set a fee. Then, if there's a payment in block 420000 that needs to be verified, the fee must be paid and it is transferred directly to the relayer," he added.

"As usage of BTC Relay increases, there are more fees and the incentive to become a relayer increases. BTC Relay is already fully decentralised, and with relayers BTC Relay becomes autonomous just like a Blockchain."