In the evolving digital economy, the phrase “code is law” is taking on real world significance. Smart contracts have emerged as a revolutionary technology that is transforming the way we understand agreements, trust, and legal enforcement in the era of blockchain.
What Are Smart Contracts?
“Smart contracts” is a term used to describe computer code that automatically executes all or parts of an agreement and is stored on a blockchain-based platform.[1] Smart contracts are self-executing agreements with terms directly written into software. They automatically enforce and carry out these terms once predefined conditions are met. This automation brings several advantages, including improved efficiency, lower costs, and the removal of third party involvement.[2]
Generally, smart contracts are simple, and function on an “if-this-then-that” basis. This means that if a certain condition is met, then a specific action will take place automatically.
A good example is how smart contracts can be used to buy goods from a vending machine. Imagine a vending machine that uses cryptocurrency instead of cash. When a person makes a payment using cryptocurrency, the smart contract gets a signal through the blockchain that the payment has been made. Once this condition is confirmed, the smart contract automatically instructs the vending machine to release the item to the buyer. In this situation, the smart contract is working on the rule: “If payment is received, then release the goods.” Everything happens digitally without needing a cashier, seller, or third party.[3]
The same logic can be applied to bigger transactions, such as buying a house. For instance, if a buyer deposits the agreed purchase price into the blockchain system, the smart contract can automatically trigger the transfer of the property title to the buyer. The process is automatic, accurate, and cannot be changed once it starts. As soon as the agreed-upon condition is met, the smart contract carries out the agreement on its own, without requiring any further intervention. Once the contract has been performed and executed, it is considered concluded and completed, with no remaining obligations on either party. Think of a smart contract like a vending machine: if you insert the correct amount of cryptocurrency (the input), the machine dispenses the snack (the output). The whole process is automatic, predictable, and free of human intervention.
Why Blockchain Matters
Smart contracts cannot function without blockchain technology. This is because the unique features of blockchain, such as decentralization, transparency and immutability, allow contracts to be created and executed without the involvement of a third party. At present, there is no other technology that can support smart contracts on a scale the way blockchain can.[4]
Blockchain is a decentralized and distributed public digital ledger that records transactions across a network of computers. This structure ensures that once a record is added, it cannot be changed without modifying all later records and obtaining agreement from the entire network.[5]
When the preset conditions in a smart contract are met and verified, a network of computers automatically performs the required actions. Once the transaction is completed, the blockchain is updated to reflect the result. Each term of the smart contract is encrypted and securely stored, reducing the risk of misinterpretation. All parties involved can test the contract with different scenarios to see the possible outcomes, making the process fair, accurate and transparent. Because the contract is recorded on a shared blockchain, the parties can carry out the agreement on their own without needing help from any third party.[6]
How Smart Contracts Work – A Simple Breakdown
The process of a smart contract generally follows four key steps.[7]
1. Contract Creation
The process begins with drafting the terms of the agreement in the form of computer code. This code outlines the rules, functions, and parties involved in the contract. Once completed, the code is uploaded to the blockchain, where it becomes part of the network.
2. Contract Trigger
After being uploaded, the smart contract remains dormant until triggered by one of the parties. The trigger can vary based on the type of contract. For instance, in a sales agreement, the trigger could be the buyer making a payment.
3. Contract Execution
When triggered, the contract automatically carries out the agreed terms as written in its code. This may include actions like transferring funds or recording transactions. The blockchain manages the execution, ensuring that it is done accurately and transparently.
4. Contract Completion
Once all conditions have been fulfilled and the necessary actions are completed, the contract is considered complete. The final outcome is then recorded permanently on the blockchain, creating a secure and unalterable record of the transaction.
Comparison of Smart Contracts and Traditional Contracts
Smart contracts and traditional contracts differ significantly in their formation, execution, and enforceability. Traditional contracts are typically drafted in natural language, signed by at least two parties, and may require verification by a lawyer, notary, or other third party. In contrast, smart contracts are written in computer code and operate automatically on a blockchain once the specified conditions are met without a third party involved.
Another key distinction lies in authenticity and alteration. Traditional contracts exist in physical or digital form and, if not properly safeguarded, can be forged or altered, sometimes without immediate detection. Smart contracts, on the other hand, are stored on a blockchain, where the terms become immutable once entered, with each transaction timestamped and distributed across multiple nodes in the network.[8]
The mode of execution also differs. Traditional contracts can sometimes be manipulated, for example, if one party signs on behalf of the other without their knowledge. Smart contracts rely on digital key signatures unique to each participant, meaning only the holder of the private key can authorize the transaction.
However, smart contracts introduce challenges not typically present in traditional contracts. They are pseudonymous, as blockchain transactions use wallet addresses rather than verified legal identities. This creates difficulty in resolving disputes, since courts may face obstacles in linking a blockchain address to a real-world party. While mechanisms such as Know Your Customer (KYC) procedures may mitigate this issue, they are not universally applied, leaving gaps in legal enforceability.[9]
Are Smart Contracts Legally Recognized?
Common Law
Under common law, a contract is considered legally binding if it contains four essential elements: offer, acceptance, consideration, and an intention to create legal relations. The Statement is clear that the common law rules on contract (offer, acceptance, consideration, and intention to create legal relations) are, in principle, entirely applicable to smart contracts. As long as these elements are present and there are no factors that weaken the agreement, such as misrepresentation, fraud, illegality or duress, the law will generally uphold and enforce the agreement between the parties.[10]
The existence of offer and acceptance is usually evident from the natural language used to frame a smart contract. However, when a smart contract is written entirely in computer code, extrinsic evidence, such as the conduct of the parties, may be sufficient to prove that an agreement was reached.[11]
Malaysian Law
Following the principles of common law, the Contracts Act 1950 in Malaysia sets out the essential elements required for a contract to be valid. These elements include offer, acceptance, consideration, and an intention to create legal relations. If a smart contract satisfies these elements, it may be considered legally enforceable under the Act.
To begin with, Section 2(a) defines a proposal as a situation where one person signifies to another his willingness to do, or to abstain from doing, something with the intention of obtaining the other’s assent.[12] Under Section 2(b), when the person to whom the proposal is made signifies his assent, the proposal is said to be accepted, thus forming a promise.[13]
Furthermore, Section 10(1) of the Act states that all agreements are contracts if they are made with the free consent of parties who are competent to contract, for a lawful consideration and lawful object, and are not expressly declared void.[14] In addition, Section 14 clarifies that consent is considered free when it is not caused by coercion, undue influence, fraud, misrepresentation, or mistake.[15]
Therefore, the approach to contract formation under Malaysian law is flexible, and may accommodate emerging forms of agreements such as smart contracts, making them potentially valid and enforceable in Malaysia.[16] Nonetheless, there have not yet been any reported cases in Malaysia specifically concerning smart contracts.
UK Perspective
In November 2019, the UK Jurisdiction Taskforce (UKJT) released a legal statement addressing cryptoassets and smart contracts. The statement concluded that, in principle, smart contracts have the capacity to create binding legal obligations that are enforceable according to their terms. English law does not normally require contracts to be in any particular form. It will enforce any promise (or at least award damages for breach) provided that the common law requirements for formation of a contract are met, and provided that there are no vitiating factors (such as duress, misrepresentation or illegality).[17]
According to the UKJT, the essential requirements for the formation of a contract are the same for both conventional contracts and smart contracts.[18] These include:
(a) agreement has, objectively, been reached between the parties as to terms that are sufficiently certain;
(b) the parties intended, objectively, that they would be legally bound by their agreement; and
(c) unless the contract is made by deed, each party to it must give something of benefit (i.e. consideration) because a gratuitous promise in return for nothing is not generally enforceable.
On 25 November 2021, the UKJT published its formal advice to the Government concerning smart legal contracts. This guidance was informed by extensive feedback received through a call for evidence launched in December 2020.
The conclusion reached was that the existing legal framework in England and Wales is well equipped to accommodate and support the use of smart legal contracts, with no immediate need for statutory reform. The adaptability of the common law system provides a strong foundation for innovation and commercial activity. While smart legal contracts may introduce new legal and factual challenges, the current body of legal principles is sufficiently robust to address them, with any necessary developments occurring incrementally and within established legal reasoning.[19]
USA Perspective
In the United States, there is no single federal contract law. Instead, the enforceability and interpretation of contracts are governed at the state level.[20] While certain fundamental principles are generally consistent across states, and efforts have been made by the National Conference of Commissioners on Uniform State Laws to harmonise state legislation, the fact remains that individual states may adopt differing views. This variation must be taken into account when evaluating the enforceability of smart contracts.
To assess enforceability, state courts traditionally examine whether the common law requirements of offer, acceptance, and consideration are met. These core elements can certainly be satisfied through the use of ancillary smart contracts, depending on how they are structured.
At the federal level, the Electronic Signatures in Global and National Commerce Act (E-Sign Act) recognises the validity of electronic signatures and electronic records in interstate commerce. Importantly, it also states that a contract or other record relating to a transaction “may not be denied legal effect, validity, or enforceability solely because its formation, creation, or delivery involved the action of one or more electronic agents so long as the action of any such electronic agent is legally attributable to the person to be bound.”[21] The Act further defines an “electronic agent” as “a computer program or an electronic or other automated means used independently to initiate an action or respond to electronic records or performances in whole or in part without review or action by an individual at the time of the action or response.”[22]
While it is essential to understand the current legal framework in evaluating the enforceability of smart contracts today, future reliance on laws enacted before the development of blockchain technology may not be necessary. For instance, Arizona and Nevada have amended their respective versions of the Uniform Electronic Transactions Act (UETA) to explicitly address blockchain and smart contracts. However, the fact that these two states have adopted different definitions for key terms like “blockchain” and “smart contract” highlights a growing need for uniform definitions as more states consider similar legal updates.[23]
Potential Challenges in Smart Contract Implementation and Enforcement
While smart legal contracts may raise new legal and factual challenges, existing legal principles remain robust enough to address them with incremental developments. However, their effective implementation and enforcement still face practical hurdles that must be resolved for broader adoption.
One key issue is the lack of standardization. Since different blockchains operate on varying protocols and programming languages, interoperability remains a major concern. Without common standards, businesses face uncertainty as to whether their smart contracts will function effectively across different platforms. This challenge can be addressed by adopting interoperable standards, such as blockchain protocols that enable cross-chain communication (e.g., Polkadot or Cosmos), or by deploying smart contracts on platforms that support standardized APIs.[24]
Another concern is the technical complexity involved in developing and deploying smart contracts. Expertise in blockchain technology, cryptography, and coding languages like Solidity is often required, yet many businesses lack in-house capabilities. This can make implementation expensive and reliant on external specialists. The way forward lies in investing in talent and training, whether by upskilling existing staff, hiring skilled developers, or collaborating with educational institutions to create blockchain certification programs.
Finally, there are legal ambiguities surrounding the enforceability of smart contracts, particularly given their pseudonymous nature and reliance on code. For instance, it will likely be difficult for the court to intervene in commercial disputes performed on a public permissionless blockchain if the parties remain unknown to each other.[25] To address this, clarifying legal frameworks is essential. Governments and regulators should establish clear guidelines on the validity and limitations of smart contracts, building upon existing contract law principles. Some jurisdictions have already taken steps in this direction, offering a model for Malaysia and others to follow.
Conclusion
Smart contracts mark a significant shift in how agreements are formed, executed, and enforced in the digital era. Powered by blockchain, they offer an automated, transparent, and tamper proof alternative to traditional contracts, eliminating the need for third party intermediaries. With a simple “if this, then that” logic, smart contracts are already transforming sectors such as finance, supply chain, and intellectual property.
Legally, smart contracts are not outside the scope of existing frameworks. As explored in this article, jurisdictions such as Malaysia, the United Kingdom, and the United States have shown that traditional contract elements — offer, acceptance, consideration, and intention to create legal relations can apply to smart contracts. The UK has taken a proactive stance, and select US states like Arizona and Nevada have incorporated blockchain into their legal definitions. Malaysia, though still in its early stages, has shown potential to embrace these developments under its current legal structure.
That said, their widespread adoption will depend on addressing certain practical challenges. These include the lack of standardization across blockchains, the technical complexity of coding and deploying contracts, and the legal ambiguities arising from pseudonymous transactions. Overcoming these issues requires interoperable standards, greater investment in blockchain expertise, and clearer legal frameworks to guide enforceability and dispute resolution.
From my perspective, smart contracts are more than just a technological advancement. They represent a new frontier in law, challenge conventional ideas of trust and enforceability, and highlight the need for the legal sector to evolve alongside emerging technologies. While the foundation of contract law remains relevant, targeted reforms and standardized definitions will be essential to address new complexities, especially in cross border use. For smart contracts to succeed, legal practitioners must engage with technology, and technologists must understand legal consequences. As both worlds continue to converge, smart contracts could pave the way for a more efficient, secure, and inclusive legal ecosystem, one where code and law work together to build a future of trust without borders.
For further information, please contact:
Mohamad Redzuan Idrus, Partner, Azmi & Associates
redzuan@azmilaw.com
- Levi, Stuart D., et al. “An Introduction to Smart Contracts and Their Potential and Inherent Limitations.” Harvard Law School Forum on Corporate Governance, 26 May 2018, corpgov.law.harvard.edu/2018/05/26/an-introduction-to-smart-contracts-and-their-potential-and-inherent-limitations/.
- Crook, Wesley. “Why Digital Assets Need Smart Contract Security and Governance.” Forbes, 3 Sept. 2024, www.forbes.com/councils/forbestechcouncil/2024/09/03/why-digital-assets-need-smart-contract-security-and-governance/.
- Enforceability of Smart Contracts in Malaysia. Shin Associates.
- “Can Smart Contracts Exist without Blockchain?” Paris Block Chain Week, www.parisblockchainweek.com/post/can-smart-contracts-exist-without-blockchain.
- “Blockchain.” Black Duck, www.blackduck.com/glossary/what-is-blockchain.html.
- “Can Smart Contracts Exist without Blockchain?” Paris Block Chain Week, www.parisblockchainweek.com/post/can-smart-contracts-exist-without-blockchain.
- Mosaia. “How Smart Contracts Work: The Process Explained.” Linkedin, 27 July 2023, www.linkedin.com/pulse/how-smart-contracts-work-process-explained-mosaia-web3/.
- “Smart Contract vs. Traditional Contract.” Hedera, hedera.com/learning/smart-contracts/smart-contract-vs-traditional-contract.
- Allmang, Amandine. “Smart Contracts vs Traditional Contracts | Linedata.” www.linedata.com, www.linedata.com/smart-contracts-vs-traditional-contracts.
- Enforceability of Smart Contracts in Malaysia. Shin Associates.
- “What Is the Legal Status of Cryptoassets and Smart Contracts?” Simmons & Simmons, 10 Dec. 2019, www.simmons-simmons.com/en/publications/ck400ievr65o00b44el9cfb4p/what-is-the-legal-status-of-cryptoassets-and-smart-contracts-.
- Contracts Act 1950, Section 2(a).
- Contracts Act 1950, Section 2(b).
- Contracts Act 1950, Section 10(1).
- Contracts Act 1950, Section 14.
- Foo, Jia Yi, and Harminderjit Kaur a/p Harban Singh. “Enforceability of Smart Contracts in Malaysia.” Lexology, www.lexology.com/library/detail.aspx?g=2f54dde8-5980-4aed-9159-86d6ac20eca6.
- Lawrence Akka QC, et al. Legal Statement on Cryptoassets and Smart Contracts. UK Jurisdiction Taskforce, Nov. 2019.
- “UK Jurisdiction Taskforce Publishes Legal Statement on Status of Cryptoassets and Smart Contracts: Observations from Ireland.” Arthur Cox LLP, 18 Dec. 2019, www.arthurcox.com/knowledge/uk-jurisdiction-taskforce-publishes-legal-statement-on-status-of-cryptoassets-and-smart-contracts-observations-from-ireland/.
- “Smart Contracts.” Law Commission, 25 Nov. 2021, lawcom.gov.uk/project/smart-contracts/.
- Cornell Law School. “Contract.” Legal Information Institute, July 2022, www.law.cornell.edu/wex/contract.
- U.S.Code § 7001(h).
- U.S.Code § 7006(3).
- Levi, Stuart D., et al. “An Introduction to Smart Contracts and Their Potential and Inherent Limitations.” Harvard Law School Forum on Corporate Governance, 26 May 2018, corpgov.law.harvard.edu/2018/05/26/an-introduction-to-smart-contracts-and-their-potential-and-inherent-limitations/.
- DK Junas. “Smart Contract Implementation: Challenges and How to Overcome Them.” Antier, Marketing Team, www.antiersolutions.com/blogs/smart-contract-implementation-challenges-and-how-to-overcome-them/.
- Cadogan, Marsha Simone. “Enforcing Smart Legal Contracts Prospects and Challenges.” CIGI Papers, no. 271, Feb. 2023, p. 32, www.cigionline.org/static/documents/no.271_UN5GG6q.pdf.