What Is A Smart Contract?

The rise of blockchain technology is already changing the world, but it wouldn't be possible without a few crucial innovations that came first. One of these is the invention of a smart contract, a type of automated program that has revolutionized the world of decentralised finance (DeFi).

While they may sound complicated at first, smart contracts are a simple but effective tool used by most blockchain platforms today.

Smart Contract Defined

A smart contract is a program that automatically executes a transaction once a certain set of criteria has been met.[1]

What makes them "smart" is that they are self-executing. Rather than needing to go to a lawyer, smart contracts are able to automatically execute an arrangement without needing a third party or intermediary to facilitate it.

The first smart contracts were invented in 1994 by Nick Szabo, an American computer scientist and cryptographer. However, they remained largely theoretical until the introduction of Ethereum, which fully opened the doors for smart contract development.[1]

How Do Smart Contracts Work?

Smart contracts follow simple conditional statements written into the code on a blockchain. The smart contract automatically executes its pre-programmed response if certain pre-written conditions are met.[1] These actions may include releasing funds, receiving a document or a license, registering a vehicle, or anything else that could be transactional in nature.

Trade the News: View our Economic Calendar

Once a smart contract is executed, the blockchain network it's built from is updated to register this transaction. Once this is done, the transaction cannot be changed, and only parties who have been given permission can see the results.[1]

When explaining smart contracts, a popular metaphor is that of a digital vending machine. This is because unlike buying something at a store in the real world, using a vending machine is automatic and doesn't require anyone else.[2]

Why Are Smart Contracts Important?

Smart contracts are important because they can enforce an agreement without requiring the threat of going to court. In a normal contract, if one party refuses to live up to their end of their deal, the other party can sue.[1]

However, a smart contract bypasses the need for this altogether. Instead, smart contracts automatically enforce the contract's rules without the need to involve a third party.
For example, in a traditional contract, one party could receive payment but refuse to transfer over their goods or services. With smart contracts, that's impossible, as the smart contract automatically facilitates the exchange as designed by its code.

Without smart contracts, blockchain technology and decentralised finance would be much more limited in terms of their scope. Decentralised applications (Dapps) wouldn't function without them, either.

Smart Contract Use Cases

There are many different use cases for smart contracts, but currently, they are mainly used in DeFi and Dapps. These decentralised platforms rely on smart contracts to execute trades, especially on decentralised exchanges (DEXs) like Uniswap.[3]

Smart contracts can also be used to transfer ownership of fungible assets. This could include legal rights, documents, and certifications. One example could be someone who wants to buy a house with Bitcoin. Both parties can use a smart contract that automatically transfers the legal deed once a certain number of bitcoins are deposited into an escrow account.[3]

Most smart contracts are run on the Ethereum (ETH) blockchain, but many other blockchain networks, like Cardano or IOT, use them, too.[4]

Before Ethereum emerged, smart contracts were very limited in what they could do. Although the world's first cryptocurrency, Bitcoin, has basic smart contract support, it paled in comparison to the developer tools that the Ethereum blockchain offers.[1]

More specifically, Ethereum's programming language uses solidity, which means it supports a wider set of computational instructions than other developer tools. This gives developers more freedom to create whatever type of smart contracts they want. The downside is that many of these newer smart contracts are more at risk of getting hacked because they aren't as well tested.[2]

Smart Contracts And Crypto NFTs

Just as smart contracts are used to transfer ownership of a deed or legal ownership of a digital asset, they can also be used for other purposes. Non-fungible tokens (NFTs), such as a piece of crypto art or a digital collectible, are traded amongst buyers and sellers thanks to smart contracts.

In the case of NFTs, a smart contract would distribute the NFT once a set of conditions are met based on the contract's code. In the case of most NFT marketplaces, that involves the buyer putting up a certain amount of Ether or other crypto as payment.

Can Smart Contracts Be Legally Enforced?

Smart contracts are designed to function without a third party or intermediary, and there's no contract law regarding smart contracts in most jurisdictions.[5]

However, several organisations are trying to figure out how to make smart contracts more enforceable. Usually this involves a hybrid approach, using both a smart contract and a written legal agreement simultaneously. One approach is that a smart contract could include a piece of code that would simultaneously create a legal document defining the terms of the contract.[5]

This makes sense when paying for an ongoing service, which is beyond the scope of a smart contract's ability to execute. The hope is that legally enforceable smart contracts could help incentivise and make mainstream the use of smart contracts throughout the regular, non-crypto world.

Benefits Of Smart Contracts

Smart contracts have some benefits for all parties involved in a transaction, and they include the following.

No Intermediaries And No Fees

Instead of hiring a lawyer to draft up a contract with witnesses, smart contracts allow both parties to save on transaction fees. This also removes the need for financial institutions.[6] The only expense that's required is a small gas fee (usually Ether) to process the smart contract on the blockchain.

Authenticity And Security

Smart contracts are encoded onto the blockchain, so they can't be manipulated by third parties. Even in the 21st century, forgeries and fake legal documents are still an issue. However, smart contracts are also encrypted, so any documents attached to the contract remain safe from infiltration, as long as the smart contract's code is well-designed.[6]

There's also less room for clerical errors. Processing a traditional contract has the possibility of clerical errors, especially when someone is manually filling in numerous forms. This isn't an issue for programs like smart contracts.

Faster To Process

Traditional transactions using normal contracts can take hours, if not days, to fully process. For example, both sides of a big investment or purchase would need to bring proof, whether from a bank or an institution, that they possess that asset required for a transaction ahead of time.[6]

Smart contracts sidestep these lengthy delays and can be processed almost instantaneously. The only limitation would be congestion on a blockchain network, as sometimes is the case with Ethereum. However, more modern blockchain technology and consensus algorithms have the potential to make the networks exponentially faster.

Disadvantages Of Smart Contracts

Smart contracts are generally more advantageous than their traditional counterparts, but there are a few ways in which smart contracts aren't perfect.

Threat Of Hacks

There's the possibility of a smart contract being hacked. In this case, any digital currency or documents encoded within the smart contract could be stolen.[6] This can occur if there are bugs within the smart contract's code. Poorly designed contracts that haven't been thoroughly tested are the most at risk, while those that have stood the test of time are more reliable.

The most recent example is the MonoX Finance hack, where a bug in the company's software that drafted smart contracts resulted in a hacker stealing more than US$31 million in cryptocurrencies.[7]

Enforceability

While smart contracts are useful for transacting in specific goods, like cryptocurrencies, legal documents, or NFTs, they aren't as useful for certain arrangements, like ongoing services. As of this writing (March 2022), there's a weak legal regulation for enforcing smart contracts if the need arises to go to court.[5]

Summary

Smart contracts are one the most important innovations in the blockchain world. Without smart contracts, decentralised applications would be impossible and would-be users would need third parties and intermediaries to facilitate transactions.

Smart contracts open the path to a much more decentralised world, which is the core vision behind blockchain technologies. While smart contracts have some limitations, their potential remains massive.

FXCM Research Team

FXCM Research Team consists of a number of FXCM's Market and Product Specialists.

Articles published by FXCM Research Team generally have numerous contributors and aim to provide general Educational and Informative content on Market News and Products.

References

1

Retrieved 07 Apr 2022 https://www.coindesk.com/learn/how-do-ethereum-smart-contracts-work/

2

Retrieved 07 Apr 2022 https://ethereum.org/en/developers/docs/smart-contracts/

3

Retrieved 07 Apr 2022 https://www.gemini.com/cryptopedia/smart-contract-examples-smart-contract-use-cases

4

Retrieved 07 Apr 2022 https://www.coindesk.com/learn/cardano-vs-ethereum-can-ada-solve-ethers-problems/

5

Retrieved 07 Apr 2022 https://corpgov.law.harvard.edu/2018/05/26/an-introduction-to-smart-contracts-and-their-potential-and-inherent-limitations/

6

Retrieved 07 Apr 2022 https://corporatefinanceinstitute.com/resources/knowledge/deals/smart-contracts/

7

Retrieved 06 May 2024 https://arstechnica.com/information-technology/2021/12/hackers-drain-31-million-from-cryptocurrency-service-monox-finance/

${getInstrumentData.name} / ${getInstrumentData.ticker} /

Exchange: ${getInstrumentData.exchange}

${getInstrumentData.bid} ${getInstrumentData.divCcy} ${getInstrumentData.priceChange} (${getInstrumentData.percentChange}%) ${getInstrumentData.priceChange} (${getInstrumentData.percentChange}%)

${getInstrumentData.oneYearLow} 52/wk Range ${getInstrumentData.oneYearHigh}
Disclosure

Any opinions, news, research, analyses, prices, other information, or links to third-party sites contained on this website are provided on an "as-is" basis, as general market commentary and do not constitute investment advice. The market commentary has not been prepared in accordance with legal requirements designed to promote the independence of investment research, and it is therefore not subject to any prohibition on dealing ahead of dissemination. Although this commentary is not produced by an independent source, FXCM takes all sufficient steps to eliminate or prevent any conflicts of interests arising out of the production and dissemination of this communication. The employees of FXCM commit to acting in the clients' best interests and represent their views without misleading, deceiving, or otherwise impairing the clients' ability to make informed investment decisions. For more information about the FXCM's internal organizational and administrative arrangements for the prevention of conflicts, please refer to the Firms' Managing Conflicts Policy. Please ensure that you read and understand our Full Disclaimer and Liability provision concerning the foregoing Information, which can be accessed here.

Past Performance: Past Performance is not an indicator of future results.

Spreads Widget: When static spreads are displayed, the figures reflect a time-stamped snapshot as of when the market closes. Spreads are variable and are subject to delay. Single Share prices are subject to a 15 minute delay. The spread figures are for informational purposes only. FXCM is not liable for errors, omissions or delays, or for actions relying on this information.