What is a smart contract?

On a cool fall night in 2019, Jack was having a drink with his son, Brad, in the backyard of their house. They were talking about Brad’s relationship with his girlfriend, Jessica. On that night, Jack promised his son to pay him an amount of money on their wedding day, and they wrote the terms into a special kind of contract. Unfortunately, Jack did not live enough to see his son’s wedding. But to everyone’s surprise, as soon as Brad and Jessica’s marriage was registered at the city hall, that amount was transferred to Brad’s account. How did this happen? Remember that special kind of contract? It was a smart contract!

The smart contract that they signed had access to Jack’s account. As soon as the contract saw that Brad had a marriage registered, it transferred the money to him directly. Jack could not see this happy moment, but he fulfilled his promise without requiring a banker, a registry office, a notary, and a will. Jack did not need to be alive to check anything. Everything worked itself out because, after all, it’s a smart contract, right?!

The term “smart contract” belongs to computer scientist Nick Szabo. He came up with this concept in 1993, ahead of his time by a decade or two. Szabo believed developing smart contracts through digital security mechanisms could significantly improve traditional legal contracts. As an example of a smart contract, he cited vending machines (the ones that make coffee, pour soda, or sell chips and bars). If the contract terms suit the buyer, he puts the money into the machine, and the machine automatically complies with the terms of the unwritten agreement and issues the purchase.

How does a smart contract work?

Smart contracts can be analogized to a vending machine of contracts. Traditionally, you would need to go to a lawyer or notary and then wait for them to issue a document while paying for their mediation. But with the advent of smart contracts, you can throw a crypto coin into the machine (that is, into the distributed ledger), and your certificate or document will come out of the machine. Also, smart contracts not only establish rules and prescribe penalties but also oblige them to be fulfilled unconditionally.

Smart contracts are essentially computer protocols that allow transactions and control their execution through mathematical algorithms. When concluding a smart contract, the parties prescribe in it the terms of the transaction and penalties for non-compliance and put their digital signatures. The smart contract determines whether the conditions, based on which it makes decisions to complete the transaction, impose a fine on the participants or even restrict access to assets.

A smart contract automatically executes all or part of an agreement and is stored on a platform based on blockchain technology. The automatic execution of a smart contract is carried out by a computer running a code converted from a legal text into an executable program. A smart contract is an event-driven computer program running on a distributed, decentralized ledger that can manage the transfer of assets and provide a record of it in the ledger. From a technical point of view, a smart contract is a program code in which “if-then” rules apply.

Before drafting a smart contract, the parties must develop a legal architecture for automating proceedings and determine what the smart contract will regulate. In creating a smart contract, programmers and lawyers must closely interact with each other. Lawyers alone cannot translate complex legal agreements into the form of a smart contract. Since a smart contract is a program, it can only be implemented by specialists in the field of technology. As a result, it is joint work between lawyers and programmers.

Pros and cons of smart contracts

The advantages of smart contracts include the absence of the need for an intermediary, cost reduction (due to the absence of a third party), speed of execution (much faster than manually), and security (contracts in the blockchain cannot be lost, and the decentralized control process eliminates the risk of manipulation). With the help of a smart contract, you can automate royalties and other payments in favour of the right holder. For example, income distribution among the stakeholders can be done automatically, eliminating numerous disputes.

The advantages of smart contracts can be described as follows:

  1. Independence. There is no need for intermediaries for the conclusion of transactions. 
  2. Safety. The contract is stored in the distributed ledger in encrypted form. 
  3. Automatic. After the implementation of the terms of the agreement, the parties immediately exchange assets. 

A smart contract allows you to reduce costs when concluding contracts, as they replace the work of intermediaries with paid services. The advantage of a smart contract is the impossibility of change by hackers. It is practically impossible to influence or force to remove the smart contract code or change it since the program, after being introduced into the blockchain, is replicated across many network nodes and cannot be changed.

But there are also disadvantages. For the full use of smart contracts, “oracles” will be needed – services that connect the blockchain with the real world. Indeed, in the real world, the execution of a smart contract is tied to external events, about which incorrect or unreliable information may be received, which negates all the advantages of the technology.

In addition, there are no clear mechanisms in the blockchain to eliminate possible errors in the contract code. If an error is discovered after the conclusion of a smart contract, then due to the peculiarities of the logic of the distributed ledger, there are significant difficulties in correcting it, which can lead to financial losses for the parties.

Smart contract platforms

Smart contracts were implemented in the cryptocurrency world by Ethereum, which led to the creation of decentralized applications (dApps). As a result of successful adoption, several leading cryptocurrencies have turned to develop smart contract platforms.

Smart contracts are manifestations of the power of blockchain technology. At the same time, their full potential is still yet to reveal. In order for them to be widely used in our day-to-day affairs, we are going to need faster, more cost-effective ones. They are the key to the emergence of a decentralized finance (DeFi) industry (Read more about DeFi here). Below are some of the best smart contract platforms to watch.

  • Ethereum (ETH). Ethereum, which describes itself as a “programmable blockchain,” is the first cryptocurrency to feature smart contracts. It powers the majority of decentralized applications, approximately 80% of DeFi applications in the world. 
  • Solana (SOL). Solana is currently one of the fastest cryptocurrencies in the blockchain ecosystem, processing 50,000 transactions per second (TPS). For comparison, the speed of Ethereum ranges from 15 to 45 TPS. 
  • Polkadot (DOT). Polkadot uses so-called parachains, like mini blockchains that run parallel to the main blockchain and can process transactions faster. Smart contracts run on parachains, not on the main blockchain.
  • Algorand (ALGO). Algorand promises low cost, scalability, and speed without sacrificing security. One of the advantages of smart contracts on Algorand is that they can be written by developers in various programming languages.

Final words

Smart contracts are currently in high demand because of being able to implement DeFi projects on a large scale in the first place. However, these potentials are only the tip of the iceberg, and in the future, we can expect to see more applications. In fact, we are still just beginning to understand what smart contracts and decentralized applications can be used for. But there are companies and even countries that are already experimenting with this potential. They are now being used for a number of tasks, like digital identity, supply-chain management, insurance, data storage, and more.

Leave a Comment

Your email address will not be published. Required fields are marked *