Smart Contract Security Glossary
Definitions, examples, and audit checks for Solidity, EVM, and DeFi security terms.
Browse by topic.
Start with these terms.
Reentrancy
Reentrancy is a smart contract vulnerability where external code calls back into a contract before the first call finishes, often before balances, ownership, or other state has been updated.
Oracle Manipulation
Oracle manipulation occurs when an attacker distorts a data source that a smart contract trusts, causing the contract to make decisions from unsafe data.
Flash Loan Attack
A flash loan attack uses same-transaction borrowing to amplify an existing DeFi vulnerability, usually in pricing, collateral, governance, or accounting.
Access Control Vulnerability
An access control vulnerability lets an unauthorized caller perform privileged actions such as moving funds, changing roles, upgrading contracts, or changing protocol settings.
All glossary terms.
Vulnerabilities
7Reentrancy
Reentrancy is a smart contract vulnerability where external code calls back into a contract before the first call finishes, often before balances, ownership, or other state has been updated.
Read-Only Reentrancy
Read-only reentrancy happens when a view function returns stale or inconsistent state during an unfinished state transition, and another contract relies on that value.
Access Control Vulnerability
An access control vulnerability lets an unauthorized caller perform privileged actions such as moving funds, changing roles, upgrading contracts, or changing protocol settings.
Signature Replay
Signature replay happens when a valid signature can be reused more than once or reused in a different context than the signer intended.
Unchecked Return Value
An unchecked return value bug happens when code ignores whether a low-level call or token operation succeeded.
Weak Randomness
Weak randomness is predictable or manipulable randomness used for security-critical smart contract decisions.
Gas Griefing
Gas griefing is an attack or failure mode where a caller, receiver, or loop structure causes execution to fail by controlling gas usage.
EVM
7Delegatecall
Delegatecall executes code from another contract while reading and writing the caller's storage, preserving the original caller context.
Function Selector
A function selector is the first 4 bytes of calldata that tells an EVM contract which function should handle a call.
Storage Collision
A storage collision happens when two variables or contracts use the same storage slot, corrupting state in upgradeable or delegatecall-based systems.
selfdestruct
selfdestruct is an EVM operation that can force-send Ether and historically removed contract code and storage under older semantics.
Calldata
Calldata is the read-only input data sent to a contract call, usually containing the function selector and ABI-encoded arguments.
CREATE2
CREATE2 is an EVM opcode that deploys contracts to deterministic addresses based on the deployer, salt, and init-code hash.
Storage Slot
A storage slot is a 32-byte indexed location in EVM contract storage used to hold state variables and derived storage data.
Solidity
23Checks-Effects-Interactions
Checks-Effects-Interactions is a Solidity pattern that validates inputs first, updates contract state second, and performs external calls last to reduce reentrancy risk.
Reentrancy Guard
A reentrancy guard is a lock that prevents a protected function from being entered again while it is already executing.
Proxy Initialization
Proxy initialization is the setup step that assigns initial state for an upgradeable proxy, usually through an initializer function instead of a constructor.
Integer Overflow
An integer overflow occurs when arithmetic produces a value larger than the maximum value an integer type can represent.
Upgradeable Proxy
An upgradeable proxy is a smart contract pattern where users call a stable proxy address while execution is delegated to replaceable implementation logic.
Initializer Function
An initializer is a one-time setup function used instead of a constructor when a smart contract is deployed behind an upgradeable proxy.
External Call
An external call is an interaction where one smart contract calls another address, creating a trust boundary and possible control-flow risk.
Commit-Reveal
Commit-reveal is a two-step pattern where users first submit a hidden commitment and later reveal the original value to reduce front-running.
tx.origin
tx.origin is a Solidity global variable that returns the original externally owned account that started the transaction.
Fallback Function
A fallback function is a Solidity function that runs when calldata does not match any function selector or when Ether is sent without a matching receive function.
Receive Function
A receive function is a Solidity function that runs when a contract receives plain Ether with empty calldata.
abi.encodePacked
abi.encodePacked is a Solidity encoding function that tightly packs values without the padding, offsets, and dynamic-length delimiters used by abi.encode.
Integer Underflow
Integer underflow happens when a subtraction goes below the minimum value a type can represent and wraps or reverts depending on compiler behavior.
Timelock
A timelock is a smart contract mechanism that delays execution of queued actions until a minimum waiting period has passed.
Multisig
A multisig is a wallet or account that requires approval from multiple signers before executing a transaction.
msg.sender
msg.sender is the address that directly called the current Solidity function in the current EVM call context.
ecrecover
ecrecover is Solidity's interface to the EVM precompile for recovering an Ethereum address from a secp256k1 signature over a 32-byte hash.
Merkle Proof
A Merkle proof is a list of sibling hashes used to prove that a leaf belongs to a Merkle tree with a known root.
UUPS Proxy
A UUPS proxy is an upgradeable proxy pattern where upgrade logic lives in the implementation contract instead of the proxy contract.
Transparent Proxy
A transparent proxy is an upgradeable proxy pattern where admin calls are handled by the proxy while non-admin calls are delegated to the implementation.
Diamond Proxy
A diamond proxy is an EIP-2535 upgradeable proxy pattern that routes function selectors to multiple facet contracts.
Role-Based Access Control
Role-based access control is a permission model where sensitive actions are gated by roles assigned to accounts or contracts.
Pausable
Pausable is an emergency-control pattern that lets authorized accounts temporarily disable selected contract functions.
DeFi
15Flash Loan Attack
A flash loan attack uses same-transaction borrowing to amplify an existing DeFi vulnerability, usually in pricing, collateral, governance, or accounting.
Oracle Manipulation
Oracle manipulation occurs when an attacker distorts a data source that a smart contract trusts, causing the contract to make decisions from unsafe data.
Price Manipulation
Price manipulation is the intentional movement of an asset, pool, share, or collateral price so a protocol values assets incorrectly.
Front-Running
Front-running is a transaction-ordering attack where an attacker observes a pending transaction and submits their own transaction so it executes first.
Sandwich Attack
A sandwich attack is a front-running pattern where an attacker places one transaction before and one after a victim trade to profit from the victim's price impact.
MEV
MEV, or maximal extractable value, is value that can be extracted from transaction inclusion, exclusion, or ordering beyond normal block rewards and fees.
Slippage
Slippage is the difference between the expected trade price and the actual execution price, often caused by liquidity, volatility, or transaction ordering.
ERC-20 Approval Race Condition
The ERC-20 approval race condition is a token allowance issue where a spender can use an old allowance before a new allowance change takes effect.
TWAP Oracle
A TWAP oracle reports a time-weighted average price over a chosen window instead of relying on a single spot price.
Liquidation
Liquidation is a protocol action that repays or closes an undercollateralized borrow position and transfers collateral according to the protocol's rules.
Health Factor
A health factor is a lending-risk metric that compares a borrower's adjusted collateral value against their debt.
Precision Loss
Precision loss happens when integer arithmetic drops fractional value during division, scaling, or fixed-point conversions.
Rounding Error
A rounding error is the difference between the mathematically exact result and the integer-rounded result returned by smart contract math.
Fee-on-Transfer Token
A fee-on-transfer token deducts a fee during transfer, so the recipient receives less than the amount requested by the sender.
Rebasing Token
A rebasing token changes account balances automatically when supply is adjusted, without requiring each holder to send or receive a normal transfer.
Testing
3Fuzz Testing
Fuzz testing sends many generated inputs through smart contract code to find edge cases, unexpected reverts, broken assumptions, and state transitions that normal unit tests miss.
Invariant Testing
Invariant testing checks that important smart contract properties stay true across many generated call sequences, actors, and state transitions.
Echidna
Echidna is a property-based smart contract fuzzer that generates call sequences to try to falsify user-defined properties and assertions.
Audit Tools
1Standards
7ERC-4626 Vaults
ERC-4626 is the tokenized vault standard where users deposit an asset and receive vault shares that represent a claim on the vault's assets.
EIP-712
EIP-712 is a standard for signing typed structured data so a signature is bound to a specific message type and domain.
Permit2
Permit2 is Uniswap's shared approval and signature transfer system that lets users authorize token spends through structured signatures or managed allowances.
Token Decimals
Token decimals are ERC-20 metadata that describe how raw integer balances should be displayed, not a guarantee that every token uses 18 decimals.
Non-Standard ERC-20
A non-standard ERC-20 is a token that behaves differently from common ERC-20 assumptions, such as missing return values, fees, rebases, pauses, blacklists, or unusual decimals.
SafeERC20
SafeERC20 is an OpenZeppelin library that wraps ERC-20 calls to handle tokens that revert, return false, or return no value.
ERC-777 Hooks
ERC-777 hooks are callback functions that can run during token transfers, giving sender or recipient contracts a chance to execute code.