The Zcash team has announced that they have been working on a command-line tool that executes atomic trades between Zcash t-addrs and Bitcoin addresses. A recent demo of the tool is still available to check out.
Several people have come up with XCAT (Zcash acronym for cross-chain atomic trade) protocols. More or less, they all rely on a method where for one side to obtain their coins, a secret must be revealed that will enable the second party to also redeem their coins.
There are many variants of this basic idea; see the XCAT ZIP for a detailed description of the specific protocol Zcash used.
Developers are encouraged to try the experimental version of the tool, ZBXCAT, and report problems or ask questions on the Zcash alchemy channel of the community chat. The current version requires the user to run Bitcoin and Zcash full nodes, but a light-client version is in progress.
The way that funds are locked up on the blockchain to execute atomic trades relies on hash-time lock contracts (HTLC). As such, Zcash engineer Sean Bowe recently submitted a BIP and pull request to make HTLCs a part of the standard RPC interface within the Bitcoin core client.
However, the team said it is not necessary to wait for this PR to be merged, as raw HTLC transactions can be constructed by compiling non-standard pay-to-script-hash transactions. Zcash used python-bitcoinlib and a variant of it modified for Zcash to construct the following scripts: https://github.com/arcalinea/python-zcashlib
To see an example of the redeem scripts used, view the scriptsig of the bitcoin transaction below.
This was one of the four transactions in the first atomic trade performed on testnet using the script, with the participation of Zcash community volunteer Jason Davies.
“Decentralization is a key characteristic of cryptocurrencies because it removes dependence on trusting third parties in order to transact between individuals.”
“However, exchanges between different cryptocurrencies typically still require trust in a centralized exchange or counterparty. Cross-chain atomic trades (Zcash has coined the acronym “XCATs”) remove the need for a single point of trust for trades between different cryptocurrencies.”
“They rely on clever protocols that automatically exchange funds across two chains only if both participants hold up their end of the deal, and refund both participants otherwise.”
“To support the decentralization of cryptocurrency, one of our near-term goals is to develop tools that will help carry out atomic trades across blockchains.”