Once deployed, a contract sits at an address like any other account, except that it has code attached. Anyone can call its functions by sending a transaction and paying the network fee, and every node runs the same code and reaches the same result. That determinism is the whole point, because the outcome does not depend on who is administering the system or what mood they are in.
A vending machine is the standard analogy and it holds up well. Put in the right input, get the defined output, with no clerk deciding whether you deserve it. Real deployments range from token standards such as <a href="/glossary/erc-20/">ERC-20</a> through exchanges, lending markets, escrow and governance, right down to the back end of most <a href="/glossary/dapp/">dapps</a> you are likely to meet.
The caveats matter more than the enthusiasm. Contracts execute what was written rather than what was meant, and a live contract can hold an enormous amount of value while somebody studies it for flaws. Many are upgradable or retain admin keys, which means a person or a multisig can change the rules. That is useful for fixing bugs and dangerous if those keys are compromised. An audit narrows the odds; it does not certify safety.
Contracts also cannot see beyond their own chain. Anything about the outside world, such as a price or a delivery, has to be supplied by an oracle, and the contract will trust whatever that feed reports. For everyday users the practical exposure is simpler: signing a transaction can grant a contract lasting permission to move your tokens, which is why <a href="/toolkit/how-to-spot-crypto-scams/">recognising a fake site</a> matters more than reading code.
DeFi Basics and Risks
Key takeaways
- Smart contracts are ordinary programs with unusual consequences, because the code runs as written and mistakes are executed faithfully.
- Check whether a contract is upgradable and who holds the admin keys, since that answers who can change the rules on you.
- The practical risk for most users is what a signature authorises, not the elegance of the underlying code.
Smart Contract — frequently asked questions
Is a smart contract legally binding?
Not by itself. It is software that enforces a rule automatically, whereas whether an agreement between people is enforceable depends on the law where they live rather than on the code. Some jurisdictions now recognise agreements formed or executed on-chain and others do not, and code cannot summon a bailiff. Treat it as automation, not as a substitute for legal drafting.
Can a smart contract be changed after it is deployed?
The deployed code usually cannot be edited, but many projects build in an upgrade path, such as a proxy pointing at a replaceable implementation or admin functions guarded by a key or multisig. That is how bugs get fixed, and also how a stolen key can rewrite the rules. Whether a contract is upgradable, and who controls it, is worth checking before depositing anything.
New to crypto, or filling in the gaps? Work through the essentials in Learn, browse every term A–Z, or see live prices for the coins these concepts power.