Skip to main content
Updated

Glossary

Smart contract

Self-executing code deployed on a blockchain that runs when predefined conditions are met.

A smart contract is a program deployed on a blockchain. Once deployed, its code is immutable and its execution is deterministic: given the same inputs, every node in the network computes the same output.

Smart contracts enable applications to exist without a central operator. A decentralized exchange is a smart contract that holds pooled liquidity and matches traders. A lending protocol is a smart contract that holds collateral and issues loans algorithmically. A multi-sig wallet is a smart contract that requires M-of-N signatures to move funds.

The canonical smart-contract platform is Ethereum (2015). Solana, Aptos, Sui, and many others have followed with different execution models. Contracts are written in high-level languages — Solidity (EVM chains), Rust (Solana, Near), Move (Aptos, Sui) — and compiled to bytecode the chain can execute.

Smart contracts are only as safe as their code. Every major DeFi exploit has traced back to a bug in contract logic, a misconfigured upgrade, or a compromised admin key. "The code is the contract" means bugs are permanent once deployed unless an upgrade path exists — and upgrade paths introduce their own attack surface.