PickACrypto

What Is a Smart Contract?

By the PickACrypto Team · Updated Jul 19, 2026

A smart contract is a program deployed to a blockchain. Its code is public, it can hold funds of its own, and it executes exactly as written when anyone triggers it. No company runs it, no admin can take it down (unless the code grants someone that power, which is its own topic), and no interpretation layer sits between the rules and their enforcement. "Smart contract" is honestly a poor name; these are neither smart nor contracts in the legal sense. They're vending machines: put the right input in, the programmed output comes out, and the machine has no opinion about whether you meant to press that button.

Ethereum made smart contracts practical in 2015, and everything people call "web3" is smart contracts wearing different costumes: DeFi, NFTs, DEXs, stablecoins, on-chain games. When you swap on Uniswap, you're calling a contract's function. When you deposit into a lending protocol, a contract holds your funds and enforces the collateral rules. The entire pitch of DeFi reduces to one sentence: the rules are enforced by code you can read rather than a company you must trust.

What they can and can't do

A contract can hold and move funds, keep state (balances, ownership records, votes), and call other contracts, which is how simple pieces compose into complex financial machinery. The composability is the superpower: a protocol can plug into another protocol's liquidity the way software plugs into libraries, permission-free. It's also the systemic risk, since a failure at the bottom of the stack propagates upward through everything built on it.

A contract cannot see the outside world. It doesn't know the price of ETH, the weather, or whether your flight landed. Data has to be delivered by oracles, outside services that publish real-world facts on-chain. Manipulated or lagging oracle feeds have caused a healthy share of DeFi's losses, and "where does this protocol get its prices?" remains one of the highest-value questions you can ask about anything holding your money.

Contracts also don't run themselves. Every execution is triggered by a transaction and paid for in gas. And once deployed, code is typically immutable, which is the guarantee and the trap in one feature.

"Code is law", and the bodies attached to that principle

If the code has a bug, the bug is the behaviour. The canonical case is The DAO in 2016: an investment contract on early Ethereum was drained through a perfectly "legal" exploit of its own logic, and the fallout was severe enough that Ethereum's community reversed it with a hard fork. The minority who refused kept the original chain running as Ethereum Classic. Every year since has added entries to the ledger: reentrancy bugs, flash-loan-assisted oracle manipulation, bridge contracts drained for nine figures, admin keys stolen or abused. None of these required breaking cryptography. The contracts did what they said; what they said just wasn't what anyone hoped.

Audits help and are a fair thing to check for, but hold them at their true weight: an audit is a paid review that catches known classes of bugs, not a warranty. Plenty of audited contracts have been drained. Stronger signals, in our experience: how long the code has run unchanged with real value inside (survivorship is the cheapest audit there is), whether admin powers are limited or timelocked, and whether the team publishes honestly about incidents. A protocol that's held billions through two ugly markets has passed a test no auditor can administer.

The practical takeaway

You'll interact with smart contracts constantly and mostly invisibly. Every token approval, swap, and stake is a contract call. Two habits cover most of the risk: know what you're approving (wallet prompts spell out which contract and what powers, and our DEX guide walks through reading them), and treat deposits into any contract as exposure to its code, not just to the asset inside. The contract doesn't care about your intentions. That indifference is the product; make sure it's pointed in a direction you've read.

Frequently asked questions

Can a smart contract be changed after deployment?

By default, no: deployed code is immutable. In practice many projects deploy upgradeable contracts where an admin key or governance vote can swap the logic. That flexibility is also a risk, so check who holds upgrade power and whether it's timelocked before trusting a contract with size.

Are smart contracts legally binding?

Generally no, not in themselves. They're self-executing software, and courts treat them case by case; a few jurisdictions have started recognising them in specific contexts. The practical reality is blunter: the code executes whether or not any court would approve, which is precisely the risk and the appeal.

How do you know if a smart contract is safe?

You never know fully, but the checklist stacks the odds: audited by named firms, source code verified and public, years of operation with real value inside, limited or timelocked admin powers, and a team that discloses incidents. Missing several of those, treat deposits as venture risk.