We’re all familiar with apps and app stores. You browse, download the app you want and away you go.
Behind the lovely UX and UI interfaces, these apps are performing a specific set of instructions as laid out by their creator. It could be a game, a calendar, or a way to buy goods and services.
Smart contracts perform a very similar function.
It’s a contract - expressed as a piece of code - that’s designed to carry out a set of instructions.
The only difference is, there’s no middle-man. There’s no person or company holding your information or verifying it. The blockchain verifies and holds a record for you.
Vitalik Buterin, and the Ethereum community, believe this is the future of the blockchain. If Bitcoin is the gold of the business world, smart contracts are the oil the business world runs on.
Digging into Smart Contracts
So, you want to buy a car online without a smart contract. In order to do so you need:
- 📇A listing site to hold the information on all the cars you’d like to see
- 📯A way of communicating with sellers
- 🤑A payment system to allow you to exchange money once you’ve found your car
- 💳Some capacity to get a refund if the car turns out to be a dud
- 👨⚖️You'll also need to register the exchange of car ownership with the authorities
Each of these points requires you to trust the site or service you’re accessing - and a lot of the time, each part of that process is controlled by a different company or individual.
It wouldn’t take much for a sneaky person or organisation to change any of the above, making the whole process void.
A smart contract removes the need to trust so many people in the process of buying something.
Why? Smart contracts are:
- 🔒Secure - it uses cryptography to stop people altering records.
- 🔍Transparent - everyone can see on the blockchain what the smart contract is and what it’s being used for.
- 🙏No more middlemen - smart contracts don’t need a third party to verify. The blockchain does that for you.
- 🤖Autonomous - they work automatically, so you’re not having to wait for someone to push a button.
- ✅Accurate - because smart contracts are written in code, they don’t rely on the grey areas of a language and what words mean.
If this happens, do this
At the heart of a smart contract tends to be a mechanism that says (in computer code) “if this happens, then do this”.
These already exist today. Let’s say you want to pay for something using a debit or credit card. The software your bank runs on will use the “if this happens, then do this” in the following way:
- 💸If the amount in the bank account is larger than the sum requested, release the funds
- 🙅♀️ 💵If the amount in the bank account is smaller than the sum requested, don’t release the funds
The difference with smart contracts is, instead of a bank (or any third party) being the controller of that decision, it falls to the blockchain.
So taking the above example and applying it to a smart contract built on a blockchain you’d see the following:
- 💸If the amount in the digital wallet is larger and has not been spent already, release the funds.
- 🙅♀️ 💵If the amount in the digital wallet is smaller, or has been spent already, do not the release the funds.
The exciting bit about smart contracts is it means anyone can enter into an agreement with anyone else with the blockchain keeping a record of the whole thing.
What about Dapps?
Dapps, or Decentralized Apps can be best thought of as a bunch of smart contracts tied together.
A smart contract on its own can only be used for one type of transaction. A Dapp however can bundle multiple smart contracts together to do more sophisticated things.
A Dapp can also put a friendly interface on top of the contracts - just like apps do today.
🖥️Golem - Golem is a Dapp that allows people to borrow other people’s computing power when they’re not using them.
📉Augur - A tool that allows anyone to speculate on derivatives
🤑Melonport - lets you manage and invest in other digital assets
🙀Cryptokitties - cat top trumps.
Read more about how these cute little critters showed the world what was possible with smart contracts.
We’re still in the early days of what smart contracts and Dapps can be used for. But there are companies and even governments experimenting with its potential already.
🇪🇪Government - Countries like Estonia have already started using Blockchain to run the state.
🔗Supply chains - Startups like Provenance are helping manufacturing companies use blockchain to buy and ship goods
📓Insurance - Startups like Etherisc are helping create insurance platforms for the aviation and farming industry.