back to lessons
$ ~/learn/smart-contracts cat
5 min read
// 19 · fundamentals

Smart contracts explained

Programs that run exactly as written, on a computer nobody owns. That's the entire idea — and why it matters.

> What they are

A smart contract is code deployed to a blockchain that anyone can call. Once deployed, its rules execute automatically whenever the conditions are met — no human operator, no ability to change the terms retroactively. Ethereum popularized them; today most L1s and L2s support some form.

> Why they matter

Smart contracts make agreements enforceable by math instead of by courts. A lending market, a token swap, or an insurance payout can happen without a company in the middle taking a cut or refusing to honor the deal.

> The trade-offs

Code is law — literally. Bugs are permanent unless the contract was built with an upgrade path (which itself introduces trust). Billions have been lost to exploits. Always check whether a contract is audited and battle-tested before depositing funds.