A smart contract is a piece of code that runs on a blockchain and automatically executes actions when certain conditions are met. It is one of the basic building blocks of decentralized applications.
How It Works
Smart contracts can hold assets, enforce rules, and interact with other contracts. Once deployed, their logic can often be inspected publicly, and in many cases it cannot be changed easily.
For example, a DeFi lending smart contract can accept collateral, issue a loan, calculate interest, and liquidate collateral if the borrower fails to maintain enough margin.
Why It Matters In Crypto
Smart contracts matter because they let financial and digital services operate without a traditional middleman. They can power exchanges, lending apps, games, token launches, and governance systems.
They also introduce risk. A bug in smart contract code can lead to permanent losses, which is why audits and careful design matter.