-
Notifications
You must be signed in to change notification settings - Fork 12
Zcash Eth Atomic Trade protocol description
arcalinea edited this page Jul 13, 2017
·
4 revisions
Zcash-Eth-Atomic-Trade protocol description
See here: https://en.bitcoin.it/wiki/Atomic_cross-chain_trading
Say Alice agrees to trade 5 ETH with Bob for 7 ZEC.
On Ethereum: Alice creates ethereum contract:
- chooses random x, computes H(x)
- publishes on ETH blockchain: "If in 48 hours x is revealed by tx sender, 5 ETH goes to Bob"
- Otherwise, after 48 hours, Alice is refunded.
On Zcash:
- Bob creates p2sh on Zcash blockchain that he funds with 7 ZEC.
- The p2sh code specifies, "If in 24 hours x for H(x) is revealed, signed by alice, 7 ZEC goes to Alice.
- Otherwise, after 24 hours, Bob can refund himself the 7 ZEC"