Skip to content

Instantly share code, notes, and snippets.



View GitHub Profile
MikeD123 / Atomic Swap Example
Created Dec 11, 2018
Atomic Swap Example from MakerDAO chat for BTC used as collateral.
View Atomic Swap Example
**Hopefully this example might help conceptualize it!**
This can be done and it's done typically from utilizing atomic swaps. An algorithm for doing a commit/reveal of `x`.
Example of Mike with BTC and you have ETH. You would like to swap your 30 ETH for 1 BTC.
You setup a smart contract on ETH. It is going to be send 30 ETH to my address (*0x12345*) if I fill in the blanks on the following equation.
You have a secret password, and you SHA256 hash of that password. E.g. `password = maker` (but you don't tell me that)

Keybase proof

I hereby claim:

  • I am MikeD123 on github.
  • I am michaeldunworth ( on keybase.
  • I have a public key whose fingerprint is C626 2C28 646F 5257 BF1B E189 4A92 D4D9 FEE0 128F

To claim this, I am signing this object: