<!-- Source: https://wealtii.com/learn/smart-contracts-explained (Markdown version for AI agents; the HTML page is canonical) -->

4.15[Blockchain Technology](https://wealtii.com/learn)

# Smart Contracts Explained: How They Work, Uses & Risks

By [Zayd Ahmed](https://wealtii.com/editorial-policy#zayd-ahmed), Founder & CEO, Wealtii · Published 11 August 2026 · Last reviewed 21 October 2026

A **smart contract** is a program stored on a blockchain that runs exactly as written whenever a transaction calls it, with no company or court needed to enforce the result. Smart contracts hold and move tokens under fixed rules, powering decentralised exchanges, lending markets, stablecoins and multi-signature wallets. The code is public, but bugs can be costly.

## How does a smart contract work?

Computer scientist Nick Szabo coined the term "smart contract" and wrote an introduction to the concept in 1994. Ethereum, launched in 2015, made the idea practical on a public blockchain. NIST defines a smart contract as "a collection of code and data (sometimes referred to as functions and state) that is deployed using cryptographically signed transactions on the blockchain network."

1. A developer writes the contract, usually in Solidity, and compiles it to bytecode.
2. A deployment transaction stores the bytecode at a new address on the chain.
3. Users call the contract's functions by sending signed transactions and paying gas.
4. Every node runs the code in the [Ethereum Virtual Machine](https://wealtii.com/learn/ethereum-virtual-machine-evm) and must reach the same result, and the outcome, such as a token transfer, is recorded on-chain.

Ethereum.org's analogy is a vending machine: put in the right inputs and you always get the predetermined output, with no shop assistant involved.

## What is a simple example of a smart contract?

Consider an escrow between a buyer and a seller who do not know each other:

1. The contract's rule says: pay the seller when the buyer confirms delivery, or refund the buyer if nothing happens by a deadline.
2. The buyer deposits funds into the contract, where neither party can take them out alone.
3. When the buyer confirms, or the deadline passes, the contract pays out exactly as the rule says.

No escrow company holds the money. The weak point is the input: if "delivery" happens in the physical world, someone still has to report it on-chain. Getting trustworthy outside data into a contract is known as the oracle problem.

## What are smart contracts used for?

| Use | What the contract does | Example |
| --- | --- | --- |
| Tokens and stablecoins | Tracks balances and transfers of a token | USDT exists as a BEP-20 token on BNB Smart Chain and an ERC-20 token on Ethereum |
| Decentralised exchanges | Swaps one token for another from pooled liquidity | Automated market makers |
| Lending | Holds collateral and liquidates loans that fall below a threshold | Over-collateralised lending markets |
| Multi-signature wallets | Moves funds only when a set number of owners approve | Safe (formerly Gnosis Safe) wallets |
| DAOs | Executes decisions approved by token-holder votes | On-chain treasuries |
| Tokenised assets | Represents claims on off-chain assets and can restrict transfers to approved holders | Tokenised funds and gold |

Together these building blocks make up much of [decentralised finance (DeFi)](https://wealtii.com/learn/defi-basics) and the wider [Web3 ecosystem](https://wealtii.com/learn/what-is-web3).

## Can a smart contract be changed or stopped?

By default, no. Ethereum.org says smart contracts execute according to rules "which cannot be changed once created." In practice many projects build in escape hatches: upgradeable "proxy" contracts that point to new code, admin keys that can pause transfers, or governance votes that can change settings. These make bugs fixable but reintroduce trust in whoever holds the keys.

Before using a contract, check whether it is upgradeable, who controls any admin keys, and whether changes are subject to a timelock, a built-in delay that gives users time to exit before an update takes effect.

## What are the risks of smart contracts?

- **Code bugs:** in 2016 a flaw in The DAO let an attacker drain more than 3.6 million ETH, and the Ethereum community adopted a hard fork to return the funds.
- **Bridge exploits:** contracts that move assets between blockchains have been behind some of the largest hacks in crypto.
- **Bad data:** a contract that relies on a single oracle will act on whatever price or event that oracle reports.
- **Malicious approvals:** signing an unlimited token approval can let a contract spend your tokens later.
- **Legal uncertainty:** a smart contract is code, not necessarily a legally binding agreement, and how courts treat one varies by country.

Ethereum.org's security guidance recommends testing, independent code reviews, bug bounties and formal verification before deployment, plus timelocks and emergency-stop plans afterwards. Our guide to [blockchain limitations](https://wealtii.com/learn/blockchain-limitations) covers the wider risks.

**Smart contracts at Wealtii:** Wealtii's fund vault is itself a smart contract: a Gnosis Safe 3-of-3 multi-signature wallet on BNB Smart Chain, which moves funds only when all three signatures approve. Fund purchases and sales are executed on-chain through DEX aggregators at the best available quote. Wealtii has not yet had a third-party security audit. Read [what a multi-signature wallet is](https://wealtii.com/learn/what-is-multi-sig-wallet), or check the vault on [Wealtii's transparency page](https://wealtii.com/transparency).

## Frequently Asked Questions

### What is a smart contract in simple terms?

A smart contract is a program on a blockchain that automatically carries out its rules when someone sends it a transaction, such as releasing a payment once conditions are met. Every node runs it and records the same result.

### Who invented smart contracts?

Computer scientist Nick Szabo coined the term smart contract and described the idea in 1994. Ethereum, launched in 2015, made general-purpose smart contracts widely usable.

### Can a smart contract be changed after deployment?

Not by default: deployed code is fixed. Many projects add upgradeable proxies or admin keys so they can fix bugs, which means users must trust whoever controls those keys.

### What are smart contracts used for?

Smart contracts power tokens and stablecoins, decentralised exchanges, lending markets, multi-signature wallets, DAOs and tokenised real-world assets.

## Sources & References

1. [ethereum.org — Introduction to smart contracts](https://ethereum.org/en/smart-contracts/) (accessed 21 Oct 2026)
2. [NIST IR 8202 — Blockchain Technology Overview, section 6: Smart Contracts (2018)](https://doi.org/10.6028/NIST.IR.8202) (accessed 21 Oct 2026)
3. [ethereum.org — Smart contract security](https://ethereum.org/en/developers/docs/smart-contracts/security/) (accessed 21 Oct 2026)
4. [ethereum.org — Ethereum history (The DAO fork, 2016)](https://ethereum.org/en/history/) (accessed 21 Oct 2026)
5. [Solidity documentation](https://docs.soliditylang.org/) (accessed 21 Oct 2026)

Disclaimer: This content is for educational purposes only and does not constitute financial, tax, or legal advice. Digital assets are volatile and carry risk of loss. Wealtii is early-stage and is not regulated by any financial authority.

## Further reading from official sources

- [NIST: Blockchain Technology Overview](https://csrc.nist.gov/pubs/ir/8202/final)
- [Bitcoin white paper](https://bitcoin.org/bitcoin.pdf)

[Zayd Ahmed](https://wealtii.com/editorial-policy#zayd-ahmed)

Founder & CEO, Wealtii

Computer Science Engineer | 5+ Years in DeFi & Digital Assets
