I think atomic swaps between eth and bitcoin should be straightforward given Ethereum’s contracting capabilities. I am curious why this has not been done. For example:
Bob and Alice agree to trade 32 eth for 1 btc. Alice gives Bob her BTC address, and tells Bob where their Ethereum Atomic Swap Contract is. Bob tells Alice his Ethereum address.
- Alice posts 32 ETH into EthereumAtomic Swap Contract, and a hash of her private message m, h. It will pay out to Bob if Bob can supply the private message m so that sha256(m)=h. After 24 hours, Alice can withdraw the ETH back to her account.
- Bob gets onto the bitcoin blockchain and sends 1 BTC in a Hash Time Locked Bitcoin Contract to Alice’s bitcoin address. Alice can receive the 1 BTC if she provides m such that sha256(m)=h. If Alice does not retrieve the BTC within 6 hours, Bob can claim it.
- Alice withdraws the 1 BTC in time, revealing m.
- Bob uses m to withdraw 32 ETH from the Ethereum Atomic Swap Contract.
This seems completely secure. If Bob does not show up, Alice cannot show her private message to Bob, and she can get her ETH back. If Alice does not show up to retrieve Bob’s BTC and reveal her private message, Bob can get his BTC back.
Has anyone created something like that? It would seem useful.