In a blockchain ecosystem, there are user accounts owned by individuals. Those accounts have addresses to receive payments and keep balances to show how much is in there – no different than any bank account. Smart contracts are just another account, but instead are governed by code.
Although smart contracts are written by people, they are not owned by the people that wrote them and should be treated simply as a separate account. Smart contracts can hold balances and interact with other smart contracts, and once a smart contract is written, the code is immutable – meaning it cannot be changed. If a mistake was made in the code of a smart contract, a new one would have to be made from scratch.
So what can I do with smart contracts?
Smart contracts are designed to execute a task exactly the way it was written to do. This makes it a great tool for automating processes that are subject to human error, biases, or emotion that can be processed and verified in a secure environment (the blockchain). Here are some use cases:
Unbiased Distribution: Smart contracts can be designed to distribute payment evenly among certain accounts. This removes the chance of error and possibility that a person could cheat the system, favoring one account over the other.
Protection against uncertainty: Many people working today that pay into pensions are uncertain they will ever see any of it when they retire. That is because the money paid today into pensions is being used elsewhere in government. If pension payments were to be paid into a smart contract instead, people could be certain they would receive their payments later on as the contract would simply ‘execute’, paying the individual his pension once he retires. Since no one owns or can alter the code, it would be immune to sudden decision changes and would be guaranteed to perform the task it was created to do.
Example: Government funds, centralized funds
Conditional Events: Smart contracts can be coded so they are executed if certain preconditions are met. Insurance is the easiest example: If X happens, pay out ‘$’ amount to person A.
Taking that same mentality, this can be applied to almost any kind of contract. In essence, the smart contract would work as an escrow account; ‘Pay the contractor X amount upon completion of the job. If not, return amount to owner.’
Ex: insurance, gambling/betting, contractual work, supply chain, escrow
IoT Device Integration: Being functional scripts of code also enables smart contracts to be utilized with IoT devices – essentially allowing you to connect an IoT device to the blockchain. This creates transparency in processes like the supply chain, where IoT sensors and barcodes can be used throughout the logistics process, recording the state of the products onto the blockchain. This concept can also be used with the above conditional events example, automating payouts based on data obtained through IoT sensors.