Found Academy useful? A $5 donation by May 14 helps us ship more, faster. Every donor counts (QF matching).

Donate

Glossary

DeFi and Smart Contract Glossary

29 terms across AMM mechanics, security patterns, protocol architecture, tokenomics, and Solidity. Click any term for the full definition and related Academy modules.

29 terms

Automated Market Maker (AMM)

AMM

A smart contract that holds token reserves and enables trading without an order book. Prices are determined algorithmically based on the ratio of tokens in the pool.

View term

Constant Product Formula

AMM

The pricing invariant x * y = k, where x and y are token reserves and k is a constant. When one token is bought, the other's reserve increases to maintain k.

View term

Liquidity Pool

AMM

A smart contract holding paired token reserves that enables trading. Liquidity providers deposit equal value of two tokens and receive LP tokens representing their share.

View term

Liquidity Provider (LP)

AMM

A user who deposits tokens into a liquidity pool to facilitate trading, earning a share of trading fees in return. LPs take on impermanent loss risk in exchange for fee income.

View term

LP Token

AMM

A token minted to liquidity providers representing their share of a pool. LP tokens can be burned to withdraw the underlying tokens plus accumulated fees.

View term

Impermanent Loss

AMM

The difference between holding tokens in a liquidity pool versus holding them in a wallet. When the price ratio of pooled tokens changes, the pool rebalances, and LPs end up with m...

View term

Slippage

AMM

The difference between the expected price of a trade and the actual execution price. In AMMs, larger trades relative to pool size cause more slippage because each unit bought moves...

View term

TWAP Oracle

AMM

Time-Weighted Average Price oracle. An on-chain price feed calculated from cumulative price accumulators updated on every trade.

View term

Concentrated Liquidity

AMM

An AMM design (introduced by Uniswap V3) where liquidity providers can allocate capital to specific price ranges instead of across the entire curve.

View term

Flash Swap

AMM

A feature of Uniswap V2 where tokens are sent to the borrower before payment is verified. The borrower can use the tokens, then either return them or pay with the other token, all...

View term

Reentrancy Attack

Security

An exploit where a malicious contract calls back into the vulnerable contract before the first execution is complete, manipulating state that hasn't been updated yet.

View term

Flash Loan Attack

Security

An exploit that uses uncollateralized flash loans to temporarily manipulate prices, governance votes, or oracle readings within a single transaction.

View term

Front-running

Security

Observing a pending transaction in the mempool and submitting a transaction with a higher gas price to execute before it.

View term

Invariant

Security

A condition that must always be true throughout a contract's execution. In Uniswap V2, the key invariant is x * y >= k after every swap.

View term

CEI Pattern

Security

Checks-Effects-Interactions pattern. A Solidity best practice where you first validate inputs (Checks), then update state (Effects), then make external calls (Interactions).

View term

Oracle Manipulation

Security

Exploiting a price oracle to make the protocol act on incorrect price data. Spot price oracles (single-block readings) are trivially manipulable via flash loans.

View term

Factory Pattern

Architecture

A design pattern where one contract (the Factory) creates and registers other contracts (Pairs/Pools). In Uniswap V2, the Factory uses CREATE2 to deploy Pair contracts with determi...

View term

CREATE2

Architecture

An EVM opcode that deploys contracts to deterministic addresses based on the deployer address, a salt, and the contract bytecode.

View term

Proxy Pattern

Architecture

A smart contract architecture where users interact with a proxy contract that delegates calls to a separate implementation contract.

View term

Core vs Periphery

Architecture

An architecture pattern separating immutable, security-critical logic (Core: Pair, Factory) from replaceable user-facing contracts (Periphery: Router).

View term

Fee-on-Transfer Token

Architecture

A token that deducts a fee on every transfer, meaning the recipient receives less than the sender sent. These tokens break pre-calculated swap amounts because the actual tokens arr...

View term

Protocol Revenue

Tokenomics

Income generated by a protocol's core operations, distinct from token price appreciation. In Uniswap V2, protocol revenue comes from an optional 0.05% fee (1/6th of the 0.

View term

Token Vesting

Tokenomics

A schedule that releases tokens to holders over time rather than all at once. Prevents early investors and team members from selling immediately after launch.

View term

Governance Token

Tokenomics

A token that grants holders voting rights over protocol decisions. Can cover parameter changes (fee rates, collateral factors), treasury allocation, and upgrade proposals.

View term

Total Value Locked (TVL)

Tokenomics

The total value of assets deposited in a DeFi protocol's smart contracts. TVL is the most common metric for measuring protocol adoption, but it can be misleading: incentivized liqu...

View term

Storage Packing

Solidity

An EVM gas optimization where multiple state variables are packed into a single 32-byte storage slot. Reading one slot costs 2,100 gas.

View term

EIP-2612 Permit

Solidity

A standard that allows token approvals via off-chain signatures instead of on-chain transactions. Users sign a permit message, and anyone can submit it on-chain.

View term

Unchecked Block

Solidity

A Solidity 0.8+ block where arithmetic overflow/underflow checks are disabled. Used when overflow is intentional (e.g.

View term

Fixed-Point Arithmetic

Solidity

A technique for representing fractional numbers in Solidity (which has no native floating-point). Uniswap V2 uses UQ112.

View term