The difference between XCAT and Drivechain

In response to a series of tweets about the Zcash XCAT (cross-chain atomic transaction) project and Drivechain, mineZcash asks on Twitter:

Genuinely curious how drivechains differ from cross chain atomic swaps. ELI5 anywhere?

This is not an ELI5, more like “ELI am familiar with blockchains and cryptocurrencies but not familiar enough with the specifics of XCAT or Drivechain to be able to compare the two.”

I’ll try to break it down here at that level.

The Zcash XCAT project can be used to atomically swap ZEC for BTC. This means that if two traders, one holding ZEC on the Zcash blockchain and the other holding BTC on the bitcoin blockchain, commit to a swap of BTC and ZEC, the swap of the two assets will either complete successfully or not at all; a trader cannot get stuck without either the BTC or ZEC.

A BTC holder might perform this cross-chain atomic swap for ZEC if they want to store, send, and receive value in a fully shielded form on the Zcash blockchain, where currently ZEC is the only asset supported and the only asset that miners accept as payment for transaction fees.

A Zcash-like Drivechain is a type of sidechain that is merge-mined with bitcoin. It has the main features of the Zcash blockchain that make it special vs bitcoin (namely, shielded transactions), and features a two-way peg mechanism linked to the bitcoin blockchain (the “mainchain”).

The two-way peg works like this: someone who wants to peg-in from the mainchain to the Drivechain will send their BTC to a deposit address on the mainchain along with a message specifying their Drivechain address. Drivechain full nodes will see that transaction on the mainchain and mint an equal amount of pegged tokens on the Drivechain (let’s call this token “DC-BTC”) and assign the DC-BTC to the specified Drivechain address.

When someone wants to redeem their DC-BTC and “peg-out” BTC back to the mainchain, they perform a similar process in reverse. They will send a “withdrawal transaction” that destroys DC-BTC and specifies a mainchain withdrawal address to which the BTC should be redeemed. After some period of time, a transaction that transfers the specified amount of BTC from the Drivechain deposit address to the withdrawal address is confirmed on the mainchain, and the redemption is complete.

Now that we know what XCAT and Drivechain are we can see how they are different:

  • XCAT is a method for atomically swapping tokens that exist on different blockchains. Blockchains do not need to know anything about each other for the cross-chain atomic swap mechanism to work.
  • Drivechain is a way to lock tokens on a mainchain (e.g. bitcoin) in a special address, mint a pegged amount of tokens on a second “sidechain” that is merge-mined with the mainchain, and destroy the pegged tokens in exchange for a specific amount of the corresponding mainchain token. The mainchain and the Drivechain do need to know some information about each other in order for the two-way peg mechanism to work.

The cross-chain atomic swap mechanism implemented in XCAT can in theory be used to swap Drivechain and mainchain tokens, or tokens on different Drivechains, or any other tokens that exist on different XCAT-compatible blockchains. In short, cross-chain atomic swaps are complimentary to Drivechain, rather than a replacement for it.

I hope this explanation helps folks understand the differences between these technologies and why each are important.

More about Drivechain: https://www.truthcoin.info/blog/drivechain/

More about XCAT: https://github.com/zcash/zips/blob/1d970f4d2c1a59f4efe89b0145b83e08431f565a/drafts/arcalinea-xcat/draft.rst



Email is probably the most popular decentralized messaging protocol, and I expect it to be around for a while. Add yourself to my email contacts if you would like to stay in touch!