What is Smart Contract?
Last reviewed 2026-05-03
First defined in: Ethereum: A Next-Generation Smart Contract and Decentralized Application Platform (Buterin, 2013) and Ethereum: A Secure Decentralised Generalised Transaction Ledger (Wood, 2014) (2014) by Vitalik Buterin et al.
A smart contract is autonomous code deployed to a blockchain that executes deterministically when called. Solidity, Vyper, and Yul target EVM; Rust targets Solana and NEAR; Move targets Aptos and Sui. Code is law — bugs are exploitable.
How it works
A developer writes the contract in a language such as Solidity or Rust, compiles it to bytecode for the target virtual machine, and deploys it in a transaction. The network assigns the contract its own address and persistent storage, and from that point the code is publicly inspectable and — unless it was built behind an upgrade mechanism like a proxy — immutable.
To use it, a person or another contract sends a signed transaction calling one of its functions with arguments and, where needed, attached value. Every validating node runs the same bytecode with the same inputs, so all nodes reach an identical result. Execution is metered in gas paid by the caller; if gas runs out or a require-check fails, the entire call reverts and every state change is rolled back — there are no half-finished executions.
Once the transaction lands in a block, the storage updates and emitted event logs become part of consensus history. Reading public state, by contrast, costs nothing and needs no transaction at all.
Why it matters
Smart contracts are the substrate of all DeFi, NFT, and DAO activity. Without them, blockchains would only support payments.
Real-world examples
Uniswap V3 Pool, Aave LendingPool, MakerDAO Vat, Safe multisig, Chainlink Aggregator.
Related terms
Go deeper
Browse the complete crypto glossary to explore related terms and concepts.
Browse GlossaryFrequently asked questions
What programming languages are used to write smart contracts for different blockchains?
Solidity, Vyper, and Yul target EVM; Rust targets Solana and NEAR; Move targets Aptos and Sui.
What happens if a smart contract runs out of gas during execution?
If gas runs out or a require-check fails, the entire call reverts and every state change is rolled back — there are no half-finished executions.
What are some real-world examples of smart contracts mentioned?
Real-world examples include Uniswap V3 Pool, Aave LendingPool, MakerDAO Vat, Safe multisig, and Chainlink Aggregator.