Escrow Service as a Smart Contract: The Business Logic

Jackson Ng
Coinmonks
Published in
5 min readMay 20, 2018

--

Background

Photo by rawpixel on Unsplash

An area of Smart Contract development that has consistently intrigued me is its real world usage to disintermediate the middleman. There’s one gem of a Smart Contract that achieves this in the Solidity documentation called Safe Remote Purchase. This is the first blog post of a 2-parter where I will document how to execute Safe Remote Purchase using a combination of Remix and MetaMask.

New to trading? Try crypto trading bots or copy trading

This series will be particularly useful for folks who:

  1. Want to know what a Smart Contract is.
  2. Want to code Smart Contact but do not wish to go through the hassle of running Geth nor syncing to the Blockchain.

In this blog post, I will describe how Safe Remote Purchase works and discuss the mechanism that makes it impossible to cheat.

The Business of Escrow Services

My other hobby is flipping watches. I often buy my watches on the Internet, wear them for a few months, get bored and attempt to sell them to buy another one. It becomes a challenge to do this if I don’t get to deal face-to-face because I do not trust the buyer and the buyer does not trust me. The buyer may take my watch and not pay me. For this reason, Escrow Agent services such as Chrono24 exist. Chrono24 takes the buyer’s money, hold on to it and only releases it to the seller when the buyer confirms that he has received and accepted the watch. For this service, Chrono24 takes a 4.5% service fee on the listing price of the watch.

Many similar example of escrow services like this exist. The stock exchange and banks are other examples.

Now image if an escrow service is replaced with a Smart Contract on the Ethereum Blockchain. Safe Remote Purchase does just this.

Safe Remote Purchase Logic

--

--