Crypto · Crypto Basics

What is a smart contract?

Written by an ex-institutional trader. What a smart contract is, how it runs automatically on a blockchain (shown with a diagram), a plain-English example, what they power across crypto, and the real risks.

Direct answer

A smart contract is a program stored on a blockchain that runs automatically when its conditions are met, with no middleman needed to enforce it. Think of it as an "if this, then that" agreement written in code: if the payment arrives, then the asset is released, automatically and exactly as written. Because it lives on a blockchain, no single party can alter it or stop it once deployed.

Smart contracts are the engine behind most of what crypto can do beyond simple payments: decentralised finance, NFTs, stablecoins and tokens all rely on them. The benefit is automation without trusting a central operator. The risk is that code can contain bugs, and a flawed or malicious contract can lose user funds with no one to reverse the transaction. The phrase is most associated with Ethereum, which made smart contracts its core feature.

What a smart contract is

A smart contract is a program stored on a blockchain that runs automatically when its conditions are met, with no middleman needed to enforce it. The simplest way to picture it is an "if this, then that" agreement written in code: if the payment arrives, then the asset is released, exactly as written and without anyone having to step in.

Because it lives on a blockchain, a smart contract has two unusual properties: it runs exactly as programmed every time, and no single party can alter or stop it once it is deployed. The term is most associated with Ethereum, which made smart contracts its core feature.

Disclosure: SatoshiMacro may earn a commission if you sign up to an exchange through links on this page, at no extra cost to you. See our full affiliate disclosure.

How it works

A developer writes the rules as code and deploys it to a blockchain. The code then waits for its trigger, and when the condition is met, it executes automatically and records the result on the blockchain. The diagram shows the flow:

IF: condition mete.g. payment receivedContract runsautomatically on-chainTHEN: outcomee.g. asset released
A smart contract waits for its condition, runs automatically when triggered, and records the outcome on the blockchain, with no middleman in between.

Thousands of computers in the network run and verify the same code, so the result is identical for everyone and cannot be quietly changed.

A plain-English example

Picture an escrow for an online sale. Normally a trusted third party holds the buyer's money until the goods arrive. A smart contract can do this job in code: the money is locked in the contract, and it is released to the seller only when the agreed condition is met, with no lawyer or bank in the middle.

A vending machine is the everyday analogy: put in the right money, and the machine releases the item automatically, no shopkeeper required. A smart contract is that idea applied to digital value and agreements.

What they power

Smart contracts are the engine behind most of what crypto does beyond simple payments:

  • Decentralised finance (DeFi). Lending, borrowing and automated trading without a bank.
  • NFTs. Ownership records and creator royalties enforced in code.
  • Stablecoins and tokens. Most are issued and managed by smart contracts.
  • Automated swaps. Decentralised exchanges use contracts to swap one token for another instantly.

In short, they turn a blockchain from a ledger of payments into a platform that can run applications.

The risks

The blockchain a smart contract runs on is very secure, but the contract code itself is only as safe as how well it was written:

  • Bugs. A flaw in the code can be exploited to drain funds, and because transactions are irreversible there is usually no way to recover them.
  • Malicious contracts. Some contracts are written deliberately to trap or steal funds. Approving one can give it access to your wallet.
  • No support desk. There is no central operator to call if something goes wrong.

Reputable projects have their contracts independently audited, which reduces risk but does not remove it. Be cautious with new or unaudited apps, never approve a contract you do not understand, and keep most of your funds in a secure wallet. To get started with crypto safely, use a reputable AUSTRAC-registered exchange.

Popular Australian crypto exchanges

Sign up to BinanceSign up to CoinSpotSign up to Independent Reserve

All three are AUSTRAC-registered Australian exchanges. Crypto is volatile; only invest what you can afford to lose.

This is general information, not financial advice. Last reviewed: 2026-06-02.

Test your knowledge

A quick 3-question check on the key ideas above. Choose an answer for each, then check your score. Every answer is explained, and nothing is sent anywhere; it all runs in your browser.

1. What is a smart contract?

A smart contract is self-executing code stored on a blockchain that runs exactly as written when its conditions are met, with no middleman.

2. Which blockchain is most associated with smart contracts?

Ethereum made smart contracts its core feature and popularised them, which is why most DeFi apps, NFTs and tokens are built on it.

3. What is the main risk of a smart contract?

The blockchain is secure, but the contract code is only as safe as how it was written. A bug or malicious contract can drain funds, and transactions are irreversible.

Frequently asked questions

What is a smart contract in simple terms?

A smart contract is a small program stored on a blockchain that runs by itself when its conditions are met. It is like an automatic if-this-then-that agreement: if the payment arrives, then the goods are released, with no person or company needed to enforce it. Because it lives on a blockchain, it always runs exactly as written and no single party can change or stop it once it is deployed.

How does a smart contract work?

A developer writes the rules as code and deploys it to a blockchain like Ethereum. The code sits there waiting for its conditions, and when a trigger happens, such as a payment being received, the contract executes automatically and records the outcome on the blockchain. Thousands of computers in the network run and verify the same code, so the result is the same for everyone and cannot be quietly altered.

What is an example of a smart contract?

A simple example is an escrow: money is locked in the contract and only released to the seller once the buyer confirms delivery, with the rules enforced by code rather than a lawyer or bank. Real-world crypto examples include decentralised exchanges that swap one token for another automatically, lending apps that pay interest, and NFT sales that pay the original creator a royalty on every resale, all without a central operator.

Are smart contracts safe?

The blockchain they run on is very secure, but the contract code itself is only as safe as how well it was written. A bug or a deliberate backdoor in a contract can let attackers drain funds, and because transactions are irreversible there is usually no way to get the money back. Reputable projects have their contracts independently audited, but audits reduce risk rather than remove it. Be cautious with new or unaudited apps and never approve a contract you do not understand.

Are smart contracts the same as Ethereum?

No, but they are closely linked. Smart contracts are a general concept that several blockchains support, but Ethereum was the network that made them its core feature and popularised them, so the two are often mentioned together. Other blockchains such as Solana also run smart contracts. Ethereum remains the largest platform for them, which is why most stablecoins, DeFi apps and NFTs are built there.

Do smart contracts have any legal standing in Australia?

A smart contract is code that executes automatically; whether it also forms a legally binding contract depends on ordinary contract law, not the code itself. In some cases the code may sit alongside or implement a legal agreement, but the term smart contract refers to the self-executing software, not a guarantee of legal enforceability. This is general information, not legal advice, and the legal treatment of crypto arrangements in Australia is still developing.

Govind Satoshi
Former Institutional Trader. Founder, SatoshiMacro.
Traded allocated institutional capital at a Sydney proprietary trading firm.