FEBRUARY 11, 2021
What are smart contracts and how do they work?
Many people interested in cryptocurrencies hear about smart contracts. Although not all smart contracts relate to those digital currencies, they run on the blockchain — the decentralised ledger that records cryptocurrency transactions and other events. Here’s a detailed look at smart contracts and the roles they could and do play in modern society.
What is a smart contract?
A smart contract is a type of computer code that can automatically enforce the terms of an agreement and monitor for changes in it. It can also execute designated actions without ongoing input.
How do smart contracts work?
Developers typically build contracts to operate according to conditional, if-then scenarios. For example, if goods arrive at a destination by a given date, that event could trigger an automatic payment from the recipient in the amount of whatever the contract specifies.
A smart contract’s foundational code can also handle payments either in conventional funds or cryptocurrencies. Smart contract actions don’t only relate to the transfer of money, however. Some of them also generate receipts so all involved parties have proof of what occurred.
The blockchain also maintains such records. It keeps track of all events associated with a smart contract and its current status. For example, perhaps only two of the three parties mentioned in the document have signed it so far. If so, the blockchain’s information would reflect that fact.
Why do the definitions of coins and tokens matter for smart contracts?
It’s also worth noting the difference between cryptocurrency coins and tokens here. Although some people use the terms interchangeably, there is a primary difference. Coins have purpose-built, native blockchains associated with them, whereas tokens are built on blockchains not solely associated with that token’s cryptocurrency.
For example, bitcoin was the first cryptocurrency, and it had a blockchain built for it. However, tokens operate on blockchains used for other purposes beyond the token itself.
Ethereum is well-known as both a cryptocurrency and a blockchain, and it also has tokens called ERC-20. It is not the only Ethereum token but widely accepted as the most significant one. Moreover, ERC-20 is the technical standard used for smart contracts that use tokens and operate via Ethereum. There is also a list of rules associated with ERC-20 tokens. It specifies things such as how transactions are approved and the available methods to transfer tokens. ERC-731 is another Ethereum token.
ERC-20 and ERC-731 are two examples of tokens that double as smart contracts. However, that does not mean all smart contracts must involve either of them. As Forrester Research principal analyst Martha Bennett explains, “...Tokens don’t have to be about economic value; a token can simply be something you hold that gives you the right to vote on a decision; casting your token means you’ve voted and can’t vote on this decision again — no economic value associated.”
What is the history of smart contracts?
Nick Szabo, an American computer scientist, first proposed the smart contracts concept in the 1990s. He wrote about them in an academic paper and envisioned them as facilitating contractual terms with computer code. Moreover, he intended to use them to extend electronic transaction methods to the digital world. Szabo’s paper also contained details about using smart contracts for derivative assets, such as bonds.
However, a significant amount of time passed before people deemed smart contacts feasible enough to consider using in the real world. Szabo provided fascinating food for thought, but his ideas never progressed from the conceptual stage. It was not until around 2018 that people began warming up to smart contracts and thinking about how they might apply to actual needs.
They’re more mainstream now. However, the consensus remains that smart contracts may never completely replace conventional ones. In 2018, Vitalik Buterin, one of Ethereum’s founders, made a Twitter reply that suggested he believed some people have the wrong idea about what smart contracts can do.
Buterin admitted, “To be clear, at this point, I quite regret adopting the term ‘smart contracts.’ I should have called them something more boring and technical, perhaps something like ‘persistent scripts.’”
What are the benefits of smart contracts?
Smart contracts offer various advantages. For example, increased accuracy is one aspect that smart contracts provide. Manual versions are often passed between multiple parties, and the chance for human error goes up along with the number of parties handling the documents. The automated aspects of smart contracts reduce the possibility of mistakes.
As mentioned earlier, smart contracts reside on the blockchain, a decentralised ledger that creates an immutable and secure environment for data storage. It’s easy to see how it’s almost certainly more reliable than the traditional paper-based system where a crucial contract could become lost, accidentally destroyed or tampered with.
Smart contracts can bring about greater efficiency, too. The main reason for that is that they can eliminate intermediaries that could otherwise slow down the process. Besides increasing speed, the lack of outside parties could also lead to cost-savings for everyone involved.
The potential to save could also occur through lower litigation costs. For example, all parties can access and see a smart contract’s details throughout the process. When they all understand how the blockchain stores data in an immutable form, that detail could make people take more time to ensure they agree to and can fulfil their obligations.
What limitations do smart contracts have?
The immutability aspect mentioned earlier as stopping tampering could also introduce frustrating difficulties. For example, a smart contract will not accept unilateral changes. That shortcoming could bring challenges in instances of single misspelt words or missing decimal points.
Relatedly, updating a smart contract for any reason is not straightforward. Various methods exist — such as using so-called contract proxies to perform updates without compromising the data. However, it’s arguably much easier to open a word-processing program or another type of software to work with a physical contract and add or delete material as needed.
Some people still baulk at the idea of smart contracts. Even after learning of the benefits, they ask whether such a technological option is essential. For example, as of early 2020, the position of a Gartner analyst was that businesspeople should question whether their use cases require smart contracts or if conventional ones would suffice.
Another limitation is that smart contracts can have bugs or get hacked, creating issues such as accounts swiftly drained of funds. One tech analyst made a detailed list of smart contract issues spanning four years. Academics have also shed light on the lack of a structured way to analyse and classify such flaws.
How do and could industries use smart contracts?
Many smart contract use cases are still in the early stages. Even so, there are opportunities to see what’s possible with the technology. Here are some examples.
One area of opportunity for smart contracts relates to structuring them to minimise the legal and business risks posed by unavoidable disruptions. Many firms use artificial intelligence and smart search features to gauge risks and reduce them before contracts are signed.
In cases where a company already knows of a business risk but is not certain how it will play out, smart contracts' conditional nature could provide a useful framework. For example, the blockchain-based document may stipulate that if a business must cease work for more than three months due to mandated COVID-19 lockdowns, any affected party has the legal right to end the contract.
Some legal professionals also think smart contracts will spur a move away from risk-based thinking in the law sector. The alternative is outcome-based approaches, which provide performance frameworks. For example, if a smart contract collected data from connected sensors, it could verify that an entity meets its output obligations.
Privacy is a hot topic in the health care sector, and that’s not likely to change anytime soon. Researchers proposed tightening the security of patient data through a smart-contract system that remotely measures vital signs. This approach is an example of how smart contracts do not always involve the exchange of funds. The team responsible built a proof-of-concept setup that gathers and records data but does not trigger monetary transactions.
A startup called Civic Technologies is also working on a system that uses smart contracts to verify someone’s vaccination or COVID-19 test status. The company also has an app that will let people choose which parties can access certain types of health data. Perhaps an airline or immigration official requires vaccination proof while an employer wants to see someone’s negative test results before letting them come back to work.
Smart contracts could also expedite the processes human resources teams go through to hire new people. For example, they could stipulate the conditions under which a temporary team member could be let go for poor performance or promoted to a full-time position for excellent work.
One recent example of what’s possible came from a company called Autsorz. That brand teamed with a blockchain and smart contract technology company to create an app that generates invoices and payroll documents for businesses that rely on outsourced workers. Besides creating smart contracts for those circumstances, the solution reportedly monitors the compiled data for signs of fraud.
Smart contracts may soon play a role in helping retail brands stock up and settle invoices. News broke in 2019 of an Icelandic retailer purchasing goods from IKEA, which operates in Iceland and elsewhere. They then took care of the invoicing with a digital cash platform that runs on the blockchain and allows issuing payment in Iceland’s krona. Representatives clarified that smart contracts used in that situation could issue tokens that define which party gets paid and how much.
Similarly, smart contracts could smooth and expedite the process of reordering supplies, preventing retailers from running too low. The if-then conditions of a contract could trigger placing a replacement order with a supplier whenever the total number drops below a defined amount. Then, once the supplier delivers the goods, the smart contract could automatically release the funds to that entity.
Media professionals have various tech tools they can use to streamline the workflow. Unfortunately, technological advancements have also perpetuated the rise of fake media. For example, it’s much easier than many people think for someone to fabricate an image of a married celebrity kissing someone other than their spouse or create a video of a world leader saying things they never uttered.
Researchers proposed using smart contracts to verify the authenticity of digital media. They focused solely on videos for the scope of their work but said the approach could apply to any electronic media. It would use the blockchain and smart contracts to show proof of authenticity, even with content copied multiple times,
What Does the Future Look Like for Smart Contracts?
People who have known about smart contracts for a while will continue to explore their use cases moving forward. For example, many blockchain and cryptocurrency conferences scheduled for 2021 have smart contracts as a primary topic, often hosting workshops that expose attendees to the possibilities.
An ongoing research project at Stanford also seeks to determine the viability of a system that uses drones, artificial intelligence, the blockchain and smart contracts to verify progress at a construction site. Depending on its reception, the project could encourage other parties to ponder similar possibilities.
As national leaders work on COVID-19 recovery plans, many may realise that smart contracts factor into them — especially for making supply chains more resilient. Brands had already been exploring the blockchain for that purpose, so it is not a major leap for them to pursue what smart contracts offer, too.
In any case, people should not expect smart contracts to replace traditional ones anytime soon. They represent a technology that is still unfamiliar to many people. Thus, they may not have the trust to use smart contracts in their biggest business arrangements yet. As more entities try them successfully, the slower adopters should feel more encouraged to follow suit.
A useful smart contracts summary
Even people who cannot envision a time in the next few years when they may need or want to use smart contracts should find the above information valuable. No one knows whether smart contracts will eventually become dominant in modern society. However, people are becoming more interested in at least considering applying them to various use cases.
Thus, knowing the basics of smart contracts as described here will help people stay in the loop. For example, they could read a related news headline and find it easier to discern how it could impact the future.
Smart contracts are not perfect. However, they’re at least intriguing and seem sure to continue impacting the world for the foreseeable future.
Download the SwissBorg app today to start earning
You may also like