What is a Smart Contract? How Does It Work?

“Never invest in a business you cannot understand.” – Warren Buffet

Cryptocurrency, one of the most enigmatic yet intriguing commodities to many adventurous investors, remains as volatile yet potentially lucrative as ever before. Unlike mature assets like gold, oil, or fiat currencies, cryptocurrency is purely a product of the digital age, something that could only ever exist in the here and now.

Many know that fortunes can be made — and indeed have been — on currencies like Bitcoin and Ethereum, but are yet unsure of how the currency works. How can you trust your money in something intangible? If cryptocurrency is truly nothing but a sequence of ones and zeros, what makes it any different from a YouTube video or Photoshop, or Minesweeper? How can it possibly derive value and more importantly how can it protect that value when in some real sense it doesn’t even exist?

Well, it all really hinges on blockchain technology. By blending cryptography, peer-to-peer networking, and proof of work mechanics, the blockchain was created, providing security and accountability to digital transactions.

Bitcoin is the most famous and prominent utilizer of this technology, without which the currency could not possibly exist nor Act as a reliable measure of value. But the blockchain can be used for other things, as Ethereum aims to do. More than just a currency, Ethereum’s chief aim is to provide something like a decentralized Internet that promotes transparency and reliability.

One of the foundational aspects of Ethereum is the smart contract. But what exactly is the smart contract? How does it change the way Blockchain can be used and why is it so important to Ethereum?

Related: Why is Ethereum Dropping Today?

What is a Smart Contract?

What is a smart contract? Handshake

A smart contract is similar to a real-world contract between two parties in that they, in a practical sense, stipulate the execution of certain duties on behalf of either party and constitute an agreement between them. In reality, a smart contract is simply a program stored inside the blockchain that executes certain functions when certain pre-conditions are met.

They are essentially just if/then statements that inherit a few key features from the blockchain they inhabit that make them especially useful to the parties involved.

Related: What Is Ethereum?

How Smart Contracts Work

What is a smart contract? Code

The smart contract is quite literally just a set of coded instructions that execute automatically when they’re specified pre-conditions are fulfilled. This could be anything, from paying rent to providing deliverables or services to any other verifiable action.

As soon as the pre-condition is fulfilled, the secondary function is immediately carried out, automatically and without input from any third-party. This latter feature of the smart contract is part of what defines it, and programs like Ethereum that depend on it as a whole. 

They Eliminate Third Parties

What Is A Smart Contract? Laptops

What makes a smart contract especially attractive to many users is the fact that they completely eradicate the necessity of a third-party when trying to make a deal between another individual and yourself.

For example, if you are a landlord renting out an apartment on an app like Airbnb, rather than establishing terms in a real-world contract you can make a deal on an Ethereum based decentralized app, known as a dApp, that encodes a smart contract into the Blockchain stipulating that If the renting party pays you $1000 by a set date, they will Then be granted access to the property for 30 days. As soon as the If statement’s conditions are met, the Then statement is immediately fulfilled and vice versa.

This has numerous advantages, the first being that neither party need trust a third-party to mediate the exchange fairly. In the case of something like Airbnb, both parties have to trust Airbnb to deliver the funds that they pay to their designated recipient. A smart contract is simply a set of coded instructions and therefore does not pose the risk that accompanies a third-party who is ethics or handling of important data or valuables can be questioned.

They Cannot Be Tampered With

What is a smart contract? Blockchain

In the above example, we illustrated how a smart contract illuminates the middleman between two parties – erasing any fee they would be levied by the middleman as well as the structural vulnerability posed by a third-party. But what keeps the smart contract secure?

If it’s just coded instructions, and code can be altered, what protects it from serving as a vector of attack by cybercriminals?? This is where the blockchain comes in. Blockchains, no matter their individual differences and variations, essentially rely on a decentralized network of computers to distribute its data across a wide swath of machines, rather than any one place.

They also serve as a public ledger that is verified by the network and a place where once items are added to the blockchain they become completely immutable. Smart contracts are encoded into a block on the blockchain, and once they’ve been successfully added cannot be altered. No matter what. Because of this, the terms of a smart contract, once it’s set in place, cannot be reneged. Not by the parties involved, nor any outside actor looking to tamper with it for malicious purposes.

They Protect Users From Each Other

What is a smart contract? Security

Because of the immutable nature of the smart contract, users are also incapable of failing to uphold their end of the Bargain. For example, it can be written into the contract that if the prospective renter fails to make their rate rent payment two times, then they lose access to the apartment – enforceable by an automated digital lock system. Likewise, as long as the renter has made their payment successfully, the landlord cannot use the digital lock system to deny the renter access; everything is adjudicated by the terms of the smart contract.


And that’s pretty much everything you need to know about smart contracts without going into the technical gibberish that accompanies a deeper more programming-oriented understanding. For any other Bitcoin, Ethereum or Blockchain-related questions, feel free to Reach out to us down below — we’d love to get back to you.

Posted by
Will

Will Heydecker is a writer, screenwriter and illustrator who still likes dragons. As part of his bitter war against adulthood, he likes to distill art, gaming, technology, and entertainment info into digestible topics people actually enjoy reading.