Smart Contracts: An Overview
By: Xiangan He
Tags: Blockchain, Smart Contract Blockchain, Smart Contracts, Transactions

If you’ve ever shopped online, chances are you’ve gotten scammed before. Especially with the holiday sales season, having to file a dispute on your latest purchase can really ruin your hard-earned break. However, you’re not alone in your struggle. Approximately 200,000 Americans have lost a total of $150,000,000 due to scams just this year. Every half a minute, a new scam occurs. Especially when shopping on a platform like eBay, what’s there to stop the seller from simply running off with your money?

Not even all these hundred dollar bills can account for the amount lost due to scams.

It’s not just shopping online that can put you in danger. If you want to host the best Christmas party ever, you’ll need a party planner. The planner takes your money to hire the people necessary to make your party a blast. In the end, they keep an unknown chunk of your money as profit while dishing out some payments to the DJs, caterers, and others. Who knows how much is even going to support the people who actually served you at your party?

Smart contracts can change all of that.

What are smart contracts?

Smart contracts function similar to a contract in real life. An agreement is made between two parties, and the conditions are set. When one party fulfills the conditions of services or goods, the other pays them money. However, the process of verifying money transfer is completely handled by the computer. Both sides are guaranteed to get what they want out of the system, since one side can’t just pull out after getting something from the other side.

The key components of a smart contract in order of occurrence in a transaction.

What problem do smart contracts solve?

When two parties want to make an exchange of goods, it is practically impossible for both to receive their end of the bargain at the same time. If one receives what they were bargaining for before the other, there is nothing stopping them from simply not giving anything up.

Currently, escrow services help process important monetary transactions like a home mortgage. Escrows are non-partial, third-party members of a transaction that ensures both the buyer and seller get what they want. They first hold onto money that the money gives to them. Then, after the buyer receives the goods or services from the seller, they would give the seller the money they need. For example, online shopping platforms like Amazon acts as escrows to uphold the deal on both ends.

A cartoon that illustrates how escrowing works

The problem is: escrow services often take some of the money you gave them as a fee for their services.

The escrow contract holds onto the money from the buyer to be transferred to the seller after the buyer receives their goods and services. Cryptocurrency, instead of money, is also used as the medium of exchange. There would be no need for trusting another party when you can have a payment method completely verified by the computer.

So how does it work?

The 4 Steps of an Escrow Smart Contract Transaction

The payment addresses of both the buyer and the seller

For any cryptocurrency transaction to take place, the public keys of both parties are required. The smart contract requires an account to withdraw savings from, and another to deposit money into.

The escrow contract requires the public key of the contract creator to withdraw funds and initiate the contract. Then, it holds the funds until the

Withdrawing money from the buyer’s account

The smart contract takes money from the buyer’s account and stores the money until the buyer receives the good or service. This money would then be transferred to the seller after the buyer receives the goods upon the buyer’s confirmation. The money deposited into the escrow smart contract cannot be retrieved by the buyer in order to prevent the buyer from running off with the seller’s goods.

The buyer confirms reception of a good or service

When the buyer receives the good or service, they can then choose to allow the escrow contract to deposit money into the seller’s account. The seller is not allowed to withdraw money from the smart contract by themselves, for the same reason that the buyer cannot.

Rinse and Repeat

The smart contract can be reused over and over again between the same two individuals in the same direction of transfer. The buyer can continue buying more products easily from their favorite store while the seller builds brand loyalty to their products.

Why continue to rely on a third party industry, when you can keep fast, repeatable transaction pathways between just you and your service and good providers?

Key points: