Blockchain technology enables us to create automated smart contracts. Here we explain how they work and why they’re seen as ground-breaking.
Smart contracts are computer programs that run automatically as the parties to an agreement fulfil its terms. Based on blockchain technology, they're set to transform the way we do business by removing the need to interpret contractual performance.
To understand smart contracts, we must first learn about blockchain. Blockchain is a shared ledger and vast database that is replicated in several places called "nodes". It's impossible to be tampered with and enables us to save and share data securely, even between parties that usually treat each other with caution.
Each block of data is transferred to, and stored on, the replicated blockchains, creating a distributed ledger. Users validate the blocks of information, which link together via crypto stamps that are created with the information from the last block and the stamp from the immediately preceding block (a “chain of blocks”). Once transactions are validated, they cannot be modified or erased without users finding out and the crypto stamp of every block being altered. That guarantees their security and authenticity.
Because it’s a decentralized and shared database, blockchain is a new way of transferring assets without middlemen. It also uses cryptography to ensure that information cannot be altered.
How do smart contracts work?
With the security of blockchain, smart contracts can run automatically, which removes the need for supervisory oversight. All it takes is a computer program configured to recognize an event that triggers execution (i.e. if X happens, run Y).
Because the programmed rules cannot be amended once the smart contract enters into force, each party must understand and agree to them. Each agreed action or clause is then registered in the blockchain.
How to use smart contracts
Smart contracts can also function in traditional financial ecosystems outside the blockchain network. Contracting parties can add an “oracle”, an external source of information they designate to update the key information in the blockchain, verify fulfilment of the agreement and trigger the appropriate actions.
Smart contracts can help transform traditional business transactions. Imagine a frozen food company wants to sell its products to a supermarket chain. They’re not in the same country and it’s the first time they’re doing business. They use a smart contract to guarantee they each hold up their end of the bargain.
The oracle could be the transport company, which records the delivery in the blockchain through a smart contract. Once the products arrive, the payment order will issue automatically. A device connected to the Internet of Things (IoT) could monitor the temperature of the container and notify a break in the cold chain, which would trigger the penalty clause.