Smart contract security glossary

This smart contract security glossary defines 30 terms you meet in Solidity audits, contest reports and code reviews, from flash loans and proxies to invariants and proofs of concept. Each entry gives a plain definition first, then a short Solidity example where code helps, and links to the vulnerability pages where the term matters.

Last updated . 2 minute read. By the QuillAudits Team.

Attacks and market mechanics

How prices, ordering and borrowed capital get used against a contract.

  • Flash loan: A loan with no collateral that must be repaid, plus any fee, before the transaction that took it ends, or the whole transaction reverts.
  • Oracle: The source a contract trusts for data it can't compute itself, most often an asset price, whether pushed by an off-chain network or read from a pool.
  • TWAP: A time-weighted average price: the price in a pool averaged over a window, weighted by how long each price held, used as an oracle that is harder to move.
  • MEV: Maximal extractable value: the profit available to whoever orders the transactions in a block, through arbitrage, liquidations, sandwiches and front-running.
  • Front-running: Getting a transaction executed ahead of a pending one you have already seen, to profit from it or take what it was about to claim.
  • Slippage: The gap between the price a trade was quoted at and the price it executes at, which contracts cap with a minimum output and a deadline.

Safeguards and design patterns

Patterns that limit what a callback or a single key can do.

  • Checks-effects-interactions: An ordering rule for Solidity functions: validate first, update state second and call other contracts last.
  • Reentrancy guard: A lock, usually a nonReentrant modifier, that makes any second entry into guarded functions revert while the first call is still running.
  • Access control list: The record of which addresses hold which permissions, checked before a privileged function runs and usually kept in Solidity as a mapping from roles to addresses.
  • Multisig: A wallet contract that executes a transaction only after M of its N owners approve it, used to hold treasuries, upgrade rights and admin roles.
  • Timelock: A contract that holds queued admin actions for a minimum delay before they can run, so users and monitors can review them or exit first.

Proxies and upgrades

How upgradeable contracts split state from code, and where that split breaks.

  • Proxy pattern: A design where a proxy contract keeps the state, balance and address while delegating every call to an implementation contract that can be swapped.
  • Delegatecall: An EVM call that runs code from another contract against the storage, balance and address of the caller, with msg.sender and msg.value unchanged.
  • Transparent proxy: A proxy that routes calls by sender: its admin can only upgrade it, and every other caller is always forwarded to the implementation.
  • UUPS proxy: A proxy whose upgrade function lives in the implementation contract, so each implementation must carry and guard its own upgrade path.

Token standards

The interfaces most contracts integrate, and the behaviors that surprise integrators.

  • ERC-20: The fungible token standard: balances, transfers and allowances behind one interface that any wallet or protocol can call.
  • ERC-721: The non-fungible token standard: each token ID has exactly one owner, and safe transfers call the receiving contract, which can re-enter yours.
  • ERC-4626: The tokenized vault standard: one interface for depositing an ERC-20 asset into a vault and receiving transferable shares in return.

Testing and verification

From stating a property to testing, analyzing and proving it.

  • Invariant: A property of contract state that must hold after every transaction, such as no balance exceeding the total supply.
  • Foundry: A Rust toolkit for Solidity development: Forge builds and tests contracts with tests written in Solidity, Cast talks to chains, Anvil runs a local node and Chisel is a REPL.
  • Fuzzing: Automated testing that runs a function with many generated inputs and reports any input that breaks a stated property.
  • Invariant testing: Stateful fuzzing: the tool calls your contracts in random sequences and checks after every call that the invariants of the system still hold.
  • Static analysis: Checking source code or bytecode for known bug patterns without running it, using structures such as syntax trees and control flow graphs.
  • Symbolic execution: Running code on symbolic values instead of concrete ones, collecting the conditions for each path, and asking a solver for inputs that reach a failure.
  • Formal verification: Proving with mathematical tools that code meets a written specification for every possible input and state, beyond the cases a test tried.

Audits and findings

How findings are modeled, demonstrated, rated and paid for.

  • Security graph: A map of the contracts, functions, state and roles in a codebase, with edges for calls, writes, transfers and permission checks, used to trace who can move value.
  • Proof of concept exploit: Runnable code, usually a test, that carries out an attack on the real contracts and asserts the damage, so anyone can reproduce a finding.
  • Severity classification: The scale, usually Critical, High, Medium, Low and Informational, that rates a security finding by its impact and how likely it is to be exploited.
  • Audit contest: A time-boxed competition in which many independent researchers review the same code before launch and share a prize pool for the valid findings they report.
  • Bug bounty: A standing offer to pay security researchers for vulnerabilities they report privately in deployed contracts, with rewards set by severity.

How is the glossary organized?

The 30 terms fall into six groups, listed above with a one-line summary each: attacks and market mechanics, safeguards and design patterns, proxies and upgrades, token standards, testing and verification, and audits and findings. Every term page answers its question in the first two sentences, then adds code, a table or a checklist, and the sources for each fact.

Where should you start?

If you are getting code ready for an audit, read invariant, proof of concept exploit and severity classification first, since they shape how findings are written and judged. For how DeFi protocols get attacked, start with flash loan, oracle and front-running, then go to the vulnerability pages for vulnerable and fixed code and real exploits.

FAQ

What is the difference between an invariant and an invariant test?

An invariant is the property, such as a vault holding at least what it owes. An invariant test is how you check it: a fuzzer calls the contracts in random sequences and checks the property after every call.

Is this glossary only about Solidity?

The examples are Solidity for EVM chains, and some terms, such as delegatecall and the ERC standards, are EVM concepts. Ideas like invariants, fuzzing and severity classification apply to smart contracts in any language.

How were the terms chosen?

They are the words that come up in audit reports, contest rules and the vulnerability pages on this site. Each term page links to the pages that use it.

QuillShield is building the security layer between AI and money, so you can keep shipping between audits.

Sign-up is free, and new accounts get $50 in credit, good for up to half of an order.

  1. 1Sign up and import a repo
  2. 2See the exact price before anything is charged
  3. 3Approve it, and the audit starts