Creating equitable options based on Hash Time Locked Contracts.

Photo by Darke Lv on Unsplash
  1. Alice creates a secret key called a “preimage” and stores it locally
  2. Alice creates an instruction on the ACME chain with Bob’s address and the hash of the preimage
  3. Bob creates a transaction with Alice’s address and a copy of hash of the preimage sent by Alice on the Ethereum chain
  4. Alice then claims Bob’s ETH by revealing the preimage
  5. Bob claims Alice’s ACME tokens as the preimage is revealed
Photo by Djim Loic on Unsplash
Photo by Maxwell Young on Unsplash
  1. Alice creates an instruction to pay Bob 0.1 ETH as an agreed premium and this is held in escrow until Bob creates the counter offer to the atomic swap. In this transaction Alice creates a template of the agreement on the Ethereum chain of the heads of terms to validate Bob’s payment, such as her address, and quantity. This is used to validate Bob’s transaction.
  2. Alice creates an instruction on the ACME chain to send Bob 520 tokens with Bob’s ETH address, a hash of a preimage and an expiry of 90 days.
  3. Bob creates a transaction to pay Alice 1 ETH with Alice’s ACME address and preimage hash on the Ethereum chain and an expiry of 90 days. The transaction is validated that it contains the agreed offer and then releases the premium held in escrow to Bob.
  4. Alice sees that the rate of ACME/ETH is favourable and decides to then claims Bob’s ETH using the preimage
  5. Bob claims Alice’s ACME tokens as the preimage is revealed

--

--

Growing Tgrade, a business focussed, public blockchain, which solves real world issues.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Martin Worner

Growing Tgrade, a business focussed, public blockchain, which solves real world issues.