A smart contract is a program stored on a blockchain that automatically executes a set of predefined rules once certain conditions are met, without requiring a third party to manually enforce the agreement. The term "contract" reflects that it encodes an agreement, while "smart" refers to its ability to execute that agreement automatically.
For example, a simple smart contract might be programmed to release funds to a seller only once a buyer confirms receipt of an item, removing the need for a separate escrow service to hold and release the funds manually. More complex smart contracts power entire DeFi lending platforms, decentralized exchanges, and NFT marketplaces.
Because smart contracts run exactly as written, any errors or vulnerabilities in their code can potentially be exploited, sometimes resulting in significant financial losses. This is why thorough auditing of smart contract code before deployment has become an important practice in the industry.