A smart contract is a program stored on a blockchain that holds or moves digital assets by fixed rules whenever someone sends it a valid request. It enforces what it can see on the blockchain: payments, dates, signatures. It cannot see the outside world, and it is a legal contract only when contract law's ordinary rules are met.
What is a smart contract?
A smart contract is a computer program kept on a blockchain that controls digital assets according to fixed rules. When someone sends it a request, the computers that run the network all carry out the same steps and record the same result, so no single party can change the outcome afterwards.
The idea is older than blockchains. In 1997 the computer scientist Nick Szabo called the vending machine "the primitive ancestor of smart contracts": it takes coins and hands over the product at the displayed price, with no shopkeeper involved (Szabo, First Monday, September 1997, checked 3 October 2026). A smart contract does the same for digital assets: it accepts what its rules ask for and hands over what they specify.
The Law Commission of England and Wales describes smart contracts as "computer programs which run automatically, in whole or in part, without the need for human intervention" (Law Commission, Smart contracts project, checked 3 October 2026). Its own examples are trades on decentralised exchanges, games in which players swap collectibles, and online gambling. Several of those involve no legal contract at all. The word "contract" in the name describes the idea, and the legal position is a separate question, covered in the section on whether a smart contract is a legal contract.

Every smart contract follows the same cycle: request, rule check, recorded result.
On Algorand, the blockchain Trusty Digital builds on (see Why Trusty Digital uses Algorand), each smart contract has its own account that can hold coins and tokens. The developer documentation calls this account "useful as an on-chain escrow" (Algorand Developer Portal, Smart contracts overview, checked 3 October 2026). The same page lists what a contract can read: account balances, asset settings and the latest block time. Anything outside it, such as a delivery or a bank payment, is invisible to the contract unless someone records it on the blockchain.
Smart contracts are one of several tools used in asset tokenisation. Plenty of tokens are issued without one, because the blockchain itself already handles issue, transfer and basic controls.
Three everyday examples of a smart contract
Smart contracts are easiest to understand in small arrangements where two people would otherwise need a trusted middleman to hold money or watch a date.
Paying a stranger for goods. The buyer pays into the contract instead of paying the seller directly. The contract holds the money and releases it to the seller when the buyer confirms receipt. If the buyer neither confirms nor raises a dispute before a deadline, the contract pays the seller anyway, so a silent buyer cannot hold the money for ever. A dispute stops the clock and passes the decision to a named person.

An escrow smart contract for a sale of goods, from payment to release.
A booking deposit tied to a date. A customer books a venue and pays a deposit into a contract. After the event date the venue can collect it. If the venue cancels before that date, its signed cancellation sends the deposit back to the customer. Nobody has to chase anyone, and neither side can take the money early.
Splitting a payment at the moment of sale. Two designers sell a digital pattern together and agree a 70/30 split. Each sale is paid to a contract that forwards both shares in the same step. On Algorand a simple split like this can also be done without custom code, by grouping the payments so that they all happen or none does, as Atomic transfers on Algorand explained shows.
An illustrative example. Anna sells a used camera lens to Ben for the equivalent of £400 in a digital currency. Ben pays into an escrow contract with a ten-day deadline. On day four he confirms the lens has arrived, and the contract pays Anna at once. Had Ben stayed silent, Anna would have been paid on day ten. Had Ben raised a dispute, the money would have waited for the named person to decide. The code handled the money in all three cases. Whether the lens arrived, and whether it worked, was a fact the people supplied. These figures are illustrative.
What code can enforce and what it cannot
A smart contract can enforce anything that happens on the blockchain itself, and nothing that happens off it unless someone reports it.

What a smart contract can check for itself, and what it has to be told.
What code enforces well. Who may move the assets the contract holds. Amounts, shares and limits. Deadlines, measured against the blockchain's own clock. How many signatures a step needs, for example two directors out of three. The order of steps, so that payment and delivery of a token happen together.
What code cannot check. Whether a parcel arrived or the goods matched the description. Who a person really is, unless an identity check has been recorded on the blockchain by someone who did it. Events in the world, such as a match result, a delivery or the weather. Whether a term is fair or lawful. Anything that happens after the assets leave the blockchain, such as a bank transfer.
When a contract does need an outside fact, someone has to put it on the blockchain. The person or service that does this is often called an oracle, and the contract acts on whatever it is told. A contract that pays out on a match result is as reliable as the party reporting the result. Asking who that party is, and what happens if they report wrongly, belongs at the start of any design.
Is a smart contract a legal contract?
A smart contract is legally binding in England and Wales when the ordinary requirements of contract law are met, and the Law Commission found in 2021 that existing law can deal with smart contracts without new legislation.
The Law Commission uses a narrower term, "smart legal contract", for a smart contract used "to define and perform the obligations of a legally binding contract". It notes that these come in a variety of forms with different degrees of automation: from a written agreement where code carries out some steps, to an agreement that exists only as code. The more an agreement lives in code alone, the more likely new questions become about how it was formed, what its terms mean and which remedies apply. Further questions arise where the other party is a consumer, and where it is unclear which country's courts decide a dispute (Law Commission, checked 3 October 2026).
Its advice to Government, published on 25 November 2021, concluded that the current legal framework is "clearly able to facilitate and support" smart legal contracts without statutory reform. It identified two areas for further work: deeds, and private international law, which decides the governing law and the courts for cross-border disputes. Before that, in November 2019, the UK Jurisdiction Taskforce had concluded that smart contracts are in principle capable of creating binding obligations (same source).
Two practical consequences follow. A smart contract that moves money between people can still be a contract even if nobody signed a paper version, so the parties may be bound by more than they think. And where a written agreement and the code both exist, the agreement can say which of them prevails if they differ. Do you need a smart contract? covers how to keep the two in step. The Law Commission's work covers England and Wales; Scotland and the EU member states apply their own contract law.
Where smart contracts go wrong
Smart contracts fail in three ordinary ways: the code contains a mistake, the information fed to it is wrong, or someone holds a power to change it that others did not expect.
A mistake in the code. The contract runs as written, including its errors. If a mistake sends assets to the wrong account, getting them back may depend on the recipient's cooperation or on legal action. Independent review of the code before it holds anything of value reduces this risk without removing it.
Wrong information. A contract that relies on an oracle inherits the oracle's mistakes. If the reported fact is wrong, the contract carries out the wrong outcome correctly.
A hidden power to change it. On Algorand, a request to update or delete a smart contract is handled by the contract's own approval program, so the code decides whether it can ever be changed and by whom (Algorand Developer Portal, Applications, checked 3 October 2026). A contract that one person can update depends on that person's honesty and care. A contract that nobody can update cannot be repaired, so a mistake found later stays in place. Either choice is legitimate. A user can ask which one was made.
A fourth risk sits outside the code: the written terms and the program say different things. The parties may then disagree about which of the two reflects their deal, and that dispute is settled by people and, if needed, by a court.
Do you need one?
You need a smart contract only when an arrangement has to hold assets, wait for a date or a condition, or apply rules the blockchain does not already provide.
Many token projects need no custom code. On Algorand, tokens are created by the protocol itself, with built-in settings for supply and for accounts that can freeze or recover holdings (Algorand Developer Portal, Algorand Standard Assets, checked 3 October 2026). Paying several people at once, or swapping a token for payment, can be done with grouped transactions. Custom code adds cost, review and risk, and is worth it when an arrangement runs over time: escrow, deadlines, refunds, or votes. The decision test, with the questions to settle first, is in Do you need a smart contract?.
Questions people also ask
Are smart contracts legally binding in the UK? They can be. In England and Wales a smart contract binds the parties when the usual requirements of a contract are met, and the Law Commission concluded in 2021 that existing law can support smart legal contracts. Scotland has its own contract law.
Can a smart contract be changed or cancelled? Only if its own code allows it. On Algorand the contract's approval program decides whether an update or deletion succeeds, so the answer depends on how it was written and who holds the right keys.
What is an example of a smart contract in real life? An escrow that holds a buyer's payment until delivery is confirmed or a deadline passes. Others include a deposit released on a date and a payment split automatically between several people.
The short version
A smart contract is a program on a blockchain that holds and moves digital assets by fixed rules. It is reliable for what it can see: payments, dates and signatures. Everything else, from whether goods arrived to whether a term is fair, still depends on people and on the law. It can be a binding contract in England and Wales, so treat its code with the same care as the written terms.
To decide whether your own project needs custom code at all, read Do you need a smart contract?.
This article is general information, not legal, tax or investment advice.