Definition
Smart contracts are programs stored on a blockchain that execute automatically when predetermined conditions are met. They eliminate the need for intermediaries by encoding contract logic directly into code. Ethereum popularized smart contracts, enabling decentralized finance (DeFi), NFTs, and DAOs. Once deployed, smart contracts are immutable—bugs cannot be patched without deploying a new contract.
lightbulb Example
A DeFi lending smart contract: when a user deposits $10K in ETH as collateral, the contract automatically allows borrowing up to $7.5K in stablecoins. If collateral value drops below 120%, the contract automatically liquidates to protect lenders.
verified_user Key Points
- Self-executing code on blockchain
- Eliminates need for intermediaries
- Immutable once deployed—bugs cannot be patched
- Foundation of DeFi, NFTs, and DAOs