An introduction to smart contracts

by

You’re probably familiar with the basic idea of a contract. Let’s say, for example, that you’d like to buy a house. In the simplest case, you’d need a seller (someone who is willing to sell their house) and a lump sum of money; you and the seller could then create and execute a contract stating that you agree to exchange the money for ownership of the house. 

Of course, if you’ve bought a house, you know that it’s not really that simple. The contract is created and executed with significant help from intermediaries — realtors, title agencies, banks, etc. The intermediaries play an important role in ensuring that the transaction is fair, and they’re equipped to objectively resolve any disputes that come up. However, they also add a lot of cost and friction to the process. What if there was a way to keep that trust and security, but eliminate the need for human middlemen?

In fact, there is. It’s called a smart contract. 

What is a smart contract?

A smart contract is a computer program that plays the role of an intermediary in a transaction. It’s capable of gathering and synthesizing information (e.g., estimating home prices and verifying identities), and of alerting buyers and sellers to any problems that come up. Most importantly, it systematically checks to ensure that the conditions for an exchange are met; if they are, the smart contract will automatically release assets and funds to the buyer and seller. 

Smart contracts have a number of advantages. As mentioned above, they eliminate the need for human intermediaries, and thus reduce friction and bureaucracy in the buying and selling process. They’re also transparent; while you may not know exactly what’s going on in a realtor’s head, everyone can review a computer algorithm and check that the logic is sound. Finally, they’re extremely secure. Every smart contract is encrypted with a unique hash and stored on multiple nodes in a global network, so there’s much less risk of forgery or loss than with a traditional contract. 

However, there are some downsides. Specifically, smart contracts are inflexible — where you can reason with a human intermediary, or request accommodation if your conditions change, it’s much harder to challenge a computer algorithm. If you execute a smart contract accidentally, there’s usually no way to reverse the transaction. 

Smart contracts and blockchain

Smart contracts use blockchain technology to verify and execute transactions. A blockchain is a series of time-stamped immutable transaction records (blocks) stored on a decentralized network of computers. New blocks are validated by every node in the network, and once validated, are secured to the series using a cryptographic hash function. The combination of decentralized verification, transparency (anyone can view the series of hashed records), and advanced cryptography makes blockchain transactions extremely resistant to fraud. 

The best-known applications of blockchain-based smart contracts involve sending and receiving money (think bitcoin), but there are many other ways to use a series of secure transaction records. In fact, Ethereum has built a thriving community of programmers who use their open-source blockchain to build games, digital marketplaces, and more — Golem, for example, allows anyone to rent processing time on an idle computer in exchange for cryptocurrency. And as blockchain and smart contracts become more widely used and understood, we’ll likely see more and more innovative use cases. 

Leave a Reply

Your email address will not be published. Required fields are marked