Coindaro

Crypto news, markets and guides

Market cap $2.81 T −2.96 % over 24 hours24h volume $74.95 BBTC dominance 59.9 %ETH 10.9 %Fear & Greed 62 GreedCoins 22,254

Glossary

Smart contract

A smart contract is a program stored on a blockchain that runs exactly as written when it is called, holding and moving funds according to its code, without an intermediary able to change the outcome.

Also called Self-executing contract, Onchain program, Dapp contract, Program (Solana)

See also

A smart contract is a piece of code deployed on a blockchain that executes automatically when someone interacts with it. It can hold funds, follow rules and send tokens without a bank, notary or platform in the middle. Despite the name, it is neither smart nor necessarily a legal contract: it is a program whose behaviour everyone can inspect and no one can quietly change.

The idea was described by computer scientist Nick Szabo in the 1990s, using the vending machine as an analogy: insert the right amount, get the product, no clerk required. It became practical at scale with Ethereum, whose network went live on 30 July 2015.

How a smart contract works

Developers write the contract in a language such as Solidity (Ethereum) or Rust (Solana), then deploy it to the blockchain, where it gets its own address. Users call its functions by sending transactions. Every node runs the same code and reaches the same result, so the outcome is enforced by the network. Each operation costs computation, paid in gas fees.

Once deployed, the code is usually immutable. Some projects use upgradeable designs controlled by an admin key or a governance vote, which brings flexibility but also trust in whoever holds that power.

A concrete example

A lending protocol is a set of smart contracts. Alice deposits ETH as collateral and borrows USDC. The contract records her position, checks the ETH price through an oracle, and, if her collateral falls below the required ratio, lets anyone liquidate it automatically. No loan officer is involved, and the rules are the same for everyone.

Why it matters for users

Smart contracts are the foundation of DeFi, stablecoins, NFTs, DAOs and token launches. They make financial services open around the clock and transparent: anyone can read the code and check the balances on-chain.

Risks and limits

  • Bugs are permanent and costly: in 2016, a flaw in The DAO, a fund built on Ethereum, let an attacker drain millions of ETH and led to a contested hard fork.
  • Audits reduce risk but do not remove it.
  • Admin keys can be misused or stolen.
  • Contracts depend on external data (oracles) that can be manipulated.
  • Signing a transaction for a malicious contract can empty your wallet.

Read our guide What is Ethereum? to see how smart contracts fit into the network.

Read also

Back to the glossary