What are smart contracts?

Bitstamp
Bitstamp
Oct 22 · 3 min read
Image for post
Image for post

The Ethereum blockchain exists on computers all across the world. Besides being the ledger for its own cryptocurrency, ether, one of the greatest perks of the Ethereum platform is its ability to run smart contracts.

Smart contracts are applications the functions of which can be executed only when their requirements are met. They help you exchange money, property, shares, assets, or anything else that is digitally representable. Since they’re based on the blockchain, smart contracts offer a completely transparent way of making transactions. At the same time, they cut the costs and services of a middleman.

SMART CONTRACT ESSENTIALS

  • Applications that can be called upon to be executed when certain conditions are met.
  • They remove the middleman from contract-making, thus eliminating the need for trust in third parties.
  • They’re written in code, meaning that they strictly follow formal logic → “if this, then that.”

What are the benefits of smart contracts?

Smart contracts offer many benefits that contracts, as we know them now, simply cannot.

Smart contracts grant complete autonomy within the domain of the blockchain, which means that you do not have to rely on third parties, like lawyers, brokers, or notaries, in order to make a smart contract. Of course, if you cannot write code yourself, you have to place your trust in the one who writes it for you.

Removing the middleman also reduces the cost of doing business, for example, because you do not have to pay a notary to witness your transaction. Moreover, smart contracts save you time, as well. There is no paperwork or manual processing of the documents. The network manages the execution automatically once the contract is called upon.

Smart contracts are written on a shared ledger on the blockchain. The blockchain is then duplicated many times across the web. This makes it virtually impossible to hack and prevents any manipulation of the contract.

Blockchains are often called “trustless.” That’s because they are distributed on a shared ledger, and there is no way that someone can change the contract without your knowledge, nor can they claim that they lost it. This eliminates the need for trust in third parties.

How do smart contracts work?

To explain how smart contracts work, let us compare the technology to a vending machine.

The conditions of a vending machine are simple — you put 2 USD in, a water bottle comes out. You do not put 2 USD in, a water bottle does not come out. The same principle applies to smart contracts.

Smart contracts define the rules and penalties around an agreement as does a traditional contract. The difference is that they automatically enforce those obligations and agreements if someone activates them.

To put it in other terms, smart contracts run on “if this, then that” logic. If certain conditions are met, then the smart contract executes the agreement. If the conditions are not met, then the smart contract does not execute the agreement. The Ethereum network validates legitimate transactions, but a constraint within the contract can still prevent funds from being wired.

What are smart contracts used for?

Smart contracts can be used as an application to store and process all manner of information on the Ethereum blockchain.

You can store information about an application, such as membership records. You can make agreements between users, like leases, trades or bets. Smart contracts can also store insurance policies, assets, personal information, medical records, etc. But perhaps most importantly, smart contracts can be entire computer programs stored and executed on distributed networks. The applications of smart contract technology are virtually endless.

To execute smart contract code on the Ethereum network, you need to pay a transaction fee. The amount of computational work required for the execution is denominated in gas, and gas is bought with ether (ETH).

Bitstamp Blog

World’s longest-standing bitcoin exchange.

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

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