A smart contract is a self-executing program on a blockchain that automatically enforces agreed-upon rules once certain conditions are met.
Unlike a traditional contract, a smart contract needs no third party for enforcement: the code itself checks the agreed conditions (e.g. "payment received") and then automatically carries out the agreed action (e.g. "release goods/tokens").
Once published on the blockchain, a smart contract's code generally cannot be changed, which builds trust but also means programming errors are very hard to fix after the fact.
Smart contracts are the technical foundation of almost all DeFi applications, decentralized exchanges, NFT platforms, and many DAO governance systems.



