What are Smart Contracts?
At their most simple, a smart contract is exactly the same as any other type of contract you may have to sign, e.g. employment, loan, insurance etc. However, a smart contract exists on a blockchain, not on a desk or in a filing cabinet of a third party.
Remember, the whole point of decentralisation is to remove the “middle-man”. Smart contracts enable trustless*, secure agreements to be made between two parties. They run as code on a smart contract blockchain and can be used to fulfil almost limitless possible applications.
*trustless: Not needing trust. If something is trustless, the parties involved do not have to trust anyone, the smart contract, being code running on a blockchain, ensures the desired outcomes come to fruition.
What are Smart Contracts Important?
In the era of decentralisation, smart contracts are king! Once a user executes a smart contract, it can’t be changed or reversed.
Whilst this may seem draconian and final, it’s actually the main benefit; no one can tamper with it, the code will run and the outcome of the contract will be exactly what the users involved agreed upon in the first place.
With the ever-increasing number of smart contract-based blockchains and the associated exponential growth of decentralised apps (dApps) providing financial, legal and a host of other use cases all running on smart contracts, they are not important, they are essential to decentralisation.
Want to take a loan and not have to pay the bank a fee for doing so, no problem. Want to save for your future without a middle man taking a cut of your interest, easy.
Smart contracts make this a reality.
How do Smart Contracts Work?
Nick Szabo, a computer scientist and lawyer, first proposed the idea of smart contracts in the 1990s. To describe how they would work, he compared them to a vending machine purchase. You make your choice, knowing in advance what the cost is.
The machine is preprogrammed for one of two outcomes.
- Supply you with your choice (e.g. a can of soda) and any change you are owed, or
- Ask you to choose again or refund all of your cash.
It is a simple, automated program that takes place without the need for a third party. This basic concept can be expanded to include any kind of transaction or exchange.
Immutable and Distributed Contracts
Being deployed on a blockchain, their code is transparent and publicly verifiable. The very nature of smart contract blockchain technology means that a smart contract must be recorded on all nodes that run that blockchain.
This is why we say that smart contracts are immutable (cannot be changed). In order for a smart contract to be executed, the transaction or flow of value must be verified by all nodes (computers that run the blockchain), this is what is known as reaching consensus.
As a large number of nodes is required to reach consensus, smart contracts are incredibly secure; anyone trying to alter the contract would have to do it on all nodes individually at the time of execution. If one node recorded a different result than all the rest it would be noticed immediately and the transaction not processed.
What are the Benefits of Smart Contracts?
- Speed and accuracy
- As smart contracts are automated and digital, there isn’t any human interference to mess things up; no papers can be lost and no data can be recorded incorrectly. Waiting times are a thing of the past too, once the conditions of the smart contract are met, it is executed immediately.
- Trustless transparency
- As there is no third-party involved and transaction records are encrypted and shared across participants, there’s no question as to whether information has been falsified.
- All blockchain transaction records are encrypted, this makes them very secure. Also, because each record is connected to the previous and subsequent records on the blockchain, hackers would have to alter the entire chain to change a single record.
- Time and Financial Savings
- With the absence of third parties and administrative tasks comes a saving in time and fees.
What can Smart Contracts be used for?
- Financial Services: Loans, (Lending and Borrowing), Insurance and Mortgages can all be taken care of by smart contracts.
- Proof of Ownership: From NFTs to bricks and mortar property and everything in between. Ownership is recorded securely on a blockchain.
- Secure and trustless voting systems. Anything from blockchain governance to entire countries' political voting can be done without question of vote tampering.
- Peer to peer (P2P) transactions. No third party need to be involved when any kind of P2P action is performed using smart contracts.
As you can see, the use cases are vast. As long as the smart contracts are written properly, they are a secure, fast and trustless alternative to what we have had to rely on up to now.
Smart contracts will continue to spread out, with many legacy systems taking note and releasing their full potential.