How it works
A developer writes code (most commonly in Solidity for Ethereum-compatible chains) that defines inputs, conditions, and outputs. The code is deployed to the blockchain as a contract address. Anyone can interact with it by sending a transaction that calls one of its functions. The contract executes deterministically, and the blockchain records the new state.
Example
A decentralised exchange smart contract holds a pool of ETH and USDC. When you send 1 ETH at a current rate of $3,000, the contract calculates the output (about 2,985 USDC after fees and slippage), debits the pool, and sends the USDC to your address. The trade settles in one transaction without an order book, broker, or settlement clearinghouse.
Why it matters
Smart contracts underpin DeFi, NFTs, on-chain governance, and tokenised assets. They remove counterparty risk for the execution step but introduce code risk: a bug in the contract is irreversible once exploited. Audits, formal verification, and battle-tested code matter more than feature breadth. Treat any new contract address as untrusted until proven otherwise.