Skip to content
Glossary

Smart Contract

A smart contract is a program stored on a blockchain that executes automatically when its predefined conditions are met. Because the code and its results live on the chain, the outcome is enforced by the network rather than by a bank, broker or court.

How it works

A developer writes the contract’s logic — for example, “release these funds when both parties have deposited” — and deploys it to a smart-contract platform such as Ethereum. Once deployed, anyone can call its functions. Every node runs the same code and must reach the same result, so the contract behaves identically for everyone and cannot be quietly changed.

Why it matters

Smart contracts are the building blocks of decentralized finance, NFTs and DAOs. They remove the need to trust a middleman, but they also mean that bugs are public and exploitable: a flaw in the code can be drained by anyone before it is fixed, which is why audits matter.

Example

A decentralized exchange is a set of smart contracts that swap one token for another and pay liquidity providers automatically, with no company holding the funds.

Smart Contract: Frequently Asked Questions

How is a smart contract different from a normal contract?
A normal contract relies on people and institutions like courts to enforce it. A smart contract is a program stored on a blockchain that executes automatically when its predefined conditions are met. Because the code and its results live on-chain, the outcome is enforced by the network itself rather than by a middleman.
Can a smart contract be changed after it is deployed?
Once deployed, a smart contract runs exactly as written and cannot be quietly altered, since every node enforces the same code. This makes outcomes predictable, but it also means flaws are permanent unless special upgrade mechanisms were built in. A bug can be exploited by anyone before it is fixed, which is why audits are important.
What can smart contracts actually be used for?
Smart contracts are the building blocks of decentralized finance, NFTs, and DAOs. They can hold and release funds, swap tokens, or pay participants automatically without a company in the middle. For example, a decentralized exchange is a set of smart contracts that swap one token for another and reward liquidity providers, with no firm holding the funds.