Counterparty

This is another service that can be used to create custom tokens that act as a cryptocurrency and can be used for various purposes such as issuing digital assets on top of bitcoin blockchain. This is quite a robust platform and runs on bitcoin blockchains at their core but has developed its client and other components to support issuing digital assets. The architecture consists of a counterparty server, counter block, counter wallet, and armory_utxsvr. Counterparty works based on the same idea as colored coins by embedding data into regular bitcoin transactions but provides a much more productive library and set of powerful tools to support the handling of digital assets. This embedding is also called embedded consensus because the counterparty transactions are embedded within bitcoin transactions. The method of embedding the data is by using OP_RETURN opcode in bitcoin.

The currency produced and used by Counterparty is known as XCP and is used by smart contracts as the fee for running the contract. At the time of writing its price is 2.78 USD. XCPs were created by using the PoB method discussed previously.

Counterparty allows the development of smart contracts on Ethereum using solidity language and allows interaction with bitcoin blockchain. To achieve this, BTC Relay is used as a means to provide interoperability between Ethereum and Bitcoin. This is a clever concept where Ethereum contracts can talk to bitcoin blockchain and transactions through BTC Relay. The relayers (nodes that are running BTC Relay) fetch the bitcoin block headers and relay them to a smart contract on the Ethereum network that verifies the PoW. This process verifies that a transaction has occurred on the bitcoin network.

This is available at http://btcrelay.org/.

Technically, this is an Ethereum contract that is capable of storing and verifying bitcoin block headers just like bitcoin simple payment verification lightweight clients do by using bloom filters. SPV clients were discussed in detail in the previous chapters. The idea can be visualized with the following diagram:

BTC relay concept
Counterparty is available at http://counterparty.io/.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset