What Is a Smart Contract? | Explanation for Beginners
You may not realize it, but whenever you sign a traditional contract, you’re still taking a risk. The other party may not deliver. They may breach a non-disclosure agreement. Maybe you don’t receive your paycheck. Regardless, you have to huff your way to the courthouse and pay thousands in lawyer fees, just for the possibility of getting justice.
Sound paranoid? It’s more common than you think. At least 47% of all civil cases are contract-related, according to a study on 26 US states.
Blockchain, thankfully, has not just revolutionized our financial transactions. It’s made a breakthrough in law as well.
So How Do Smart Contracts Work?
A smart contract isn’t unlike its paper predecessor. It helps you exchange property, services, and currency. But unlike that hardly-enforceable paper stack just barely stapled together, this contract is a self-executing document.
In actuality, smart contracts aren’t exactly “new.” The term was invented by Nick Szabo in 1994. A scholar of both law and computer science, the reclusive Szabo has been involved in cryptocurrency since day one (check out his Bit Gold contribution). With smart contracts, he desired to remove the middleman, who traditionally played the role of the contract enforcer. Instead, he envisioned smart contracts to be like a vending machine.
Think about the procedure of a vending machine – it’s the simplest transaction you can make. You decide what you want and insert money into the machine. Once you click on the button or insert the code for the item of the same value, the machine automatically releases it. Smart contracts essentially work in the same way. These contracts automatically enforce themselves once certain conditions are met.
This way, the only individuals concerned would be those directly involved in the contract. There is no need for a lawyer, a notary, or any other go-between.
Smart contracts are encoded into blockchains, so they’re also decentralized. This aspect is what simplifies the process and throws out the middleman. Because the enforcer is now the code, you don’t need a lawyer to ensure the contract is executed correctly. Some people even add on a multi-signature (multi-sig, for short) component, which asks each party to sign before transferring funds or work. Even with the multi-sig component, you can ax the waiting time as the contract goes back and forth between all the parties involved. So not only do you save the headache and risk of being scammed by the third party, but the process becomes quicker.
After the contract is written and signed by both parties, it’s monitored by computers on the blockchain system. In most cases, the contract itself is public, and the parties involved are pseudo-anonymous (more on that later). In addition, there are certain triggers in the code. For example, when a service provider delivers the final product, the employer should pay in cryptocurrency. When the first condition is triggered, the funds are released automatically.
Ethereum: The Pen and Paper
So what technology do you even use to make or sign a smart contract?
Most contracts are built using Ethereum, a blockchain-based platform. Ethereum was first proposed by Russian-Canadian programmer Vitalik Buterin in 2013 and released in 2015. Each contract is executed using a Turing-complete Ethereum Virtual Machine. Yeah, we know that’s a mouth-full. This basically means that this program can simulate a computer. It doesn’t think per say, but it is expressive. It can “decide” things in an if/then fashion. This logic makes it perfect for smart contracts, which need to be able to function and execute commands with many variables.
This makes Ethereum fundamentally different from Bitcoin, which uses simple mechanisms to distribute money. Ethereum tends to be better suited to any transaction which requires multiple steps.
The Smart Contract: The Future of Everything?
From the outset, we can already see four primary benefits of the smart contract:
- Independence – You don’t have to depend on intermediaries. This cuts costs, increases efficiency, and prevents fraud from a third party. Because smart contracts are decentralized, you don’t have to worry about bias from any governmental body, either.
- Trust – There’s no need to trust a person, all you have to trust is the system. And if you know anything about blockchain, you know the system generally holds true.
- Security – This ties in with trust. Think about it this way: If a thief wants to take your money, he’ll hack into your bank account. But because blockchain is decentralized – there is no one place to attack. A thief can’t just hack into your bank account. They would have to take over 51% of the network in order to control anything. Smart contracts, which are encoded into blockchain, are just as secure.
- Speed – These contracts aren’t just secure or accurate – they’re fast. And it’s not just because it removes wait times for lawyers and notaries. Since the contract is monitored by the blockchain, the results are almost instant. It’s a completely automated process.
All of these things increase the cost-efficiency of smart contracts over traditional ones. But that’s not all.
As you can imagine, smart contracts aren’t just limited to the financial sphere. You can use them in government dealings, healthcare management, higher education course management, insurance, and real estate. Any situation that requires the trade of goods for services could technically make good use of smart contracts.
And developed nations like the US and Europe aren’t the only ones who benefit. Citizens in countries like India, where getting a passport or visa could take months instead of weeks, benefit immensely. International business deals are suddenly simplified – making trade easier and more lucrative for everyone involved.
It’s likely that, in the future, any and all business will have a smart contract attached. On a global scale.
Smart Contracts in Action
Still not sure what smart contracts look like out in the wild? Here’s a glimpse:
You start your Saturday with a fender bender. We never said this was a glamorous journey, did we? Your bumper is dented. You call your insurance company and take a photo of the damage. You weren’t the offender – but you do have their details. The insurance agent logs your information and crash data into their blockchain-based system, which triggers a clause in your contract. You receive an alert. It’s estimated your repair costs and given you a supported service provider. Head there, and the bill will be taken care of.
So you go to the car shop. A new bumper has actually just arrived at the shop, and the ownership of the piece was transferred to the shop through – you guessed it – a smart contract. Unfortunately, their shipment of air filter replacements was delayed, but not to worry. The money won’t be transferred to their supplier until the shop receives it. Smart contracts and supply chain in action.
We could go on, but we think you get the gist.
What Could Go Wrong?
“Smart contracts can’t be perfect! What if someone is penalized for a small mistake? It surely can’t be hack-proof!”
While human error is a valid critique of the system, a smart contract won’t necessarily take you to court over it. Funds may not be released, or an employer might be automatically refunded. Human errors will happen, on the blockchain or not.
Mistakes in code or human error with security (giving away your private keys) can also lead to hacking or theft. The code is so complex, that sometimes contracts become vulnerable to hackers.
For example, the ICO KICKICO lost $8 million after a smart contract breach in July. But the most notable hack occurred on the DAO (Decentralized Autonomous Organization) in June 2016, in which the hackers made off with $50 million. This led to a split, or hard fork, of Ethereum Classic (ETC) to Ethereum (ETH) in an attempt to make the platform more secure.
Those sound like pretty hefty sums – but are they really? In 2017, consumers in the US lost almost $17 billion from identity theft alone. (Of course, you can soon protect your identity with blockchain tech, too.)
It’s probable that blockchain and smart contracts – despite human weakness – are the answers to our traditional system woes. Blockchain technologies still offer more protection. It’s the difference between a regular padlock and a Schlage deadbolt…or having no lock at all.
“Fine, but aren’t there limitations? If it’s all public, there’s no way to store sensitive data.”
That’s true – but not for long.
There are at least two major projects tackling privacy and “secret contracts” – Enigma and Wanchain. A secret contract is a smart contract that allows for sensitive data to be stored securely, even as it is validated using blockchain technology. In order to preserve user privacy, Wanchain uses ring signatures and one-time address generations for their smart contract transactions. This keeps identities anonymous.
As problems pop up with smart contracts, so do solutions. Whether talking about Bitcoin or smart contracts, Szabo, Satoshi, and Buterin were all interested in upgrading an inefficient financial system. Regardless of whether the solution lies in Ethereum smart contracts, or another platform, the core blockchain technology is essential to the future of FinTech.
For the Time Being
In fact, the biggest problem with smart contracts isn’t really about smart contracts at all. The problem is many governments don’t understand them – and don’t know how to regulate them. But that’s changing. The US state of Tennessee passed a bill this year to recognize smart contracts as legally binding. Canada’s in on it, too. In early 2018, they began trials to use smart government contracts. As the benefits become more evident, it won’t be long until the rest of the world jumps on board.
But why wait for them to catch up? You can start using smart contracts today – or you can learn to code your own.
What is Monero? In this guide, you’ll learn what it is, how it works, and how it...
An analysis of Bytecoin, PIVX, Verge, and Dash to determine which privacy coin offers you the most...
In this Changelly vs. ShapeShift review, we examine which is better. Let’s compare interfaces, security, fees, and...
An analysis of Bytecoin, PIVX, Verge, and Dash to determine which privacy coin offers you the most anonymity. Read on for a breakdown of each one.
ABOUT THE AUTHOR
ABOUT THE AUTHOR
Kelsey Ray Banerjee is a professional content writer and digital marketer specializing in blockchain, forex trading, and sustainability. When not writing, you can find her traveling, reading, or on Twitter.