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)
AMMA 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 termConstant Product Formula
AMMThe 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 termLiquidity Pool
AMMA 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 termLiquidity Provider (LP)
AMMA 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 termLP Token
AMMA 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 termImpermanent Loss
AMMThe 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 termSlippage
AMMThe 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 termTWAP Oracle
AMMTime-Weighted Average Price oracle. An on-chain price feed calculated from cumulative price accumulators updated on every trade.
View termConcentrated Liquidity
AMMAn AMM design (introduced by Uniswap V3) where liquidity providers can allocate capital to specific price ranges instead of across the entire curve.
View termFlash Swap
AMMA 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 termReentrancy Attack
SecurityAn 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 termFlash Loan Attack
SecurityAn exploit that uses uncollateralized flash loans to temporarily manipulate prices, governance votes, or oracle readings within a single transaction.
View termFront-running
SecurityObserving a pending transaction in the mempool and submitting a transaction with a higher gas price to execute before it.
View termInvariant
SecurityA 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 termCEI Pattern
SecurityChecks-Effects-Interactions pattern. A Solidity best practice where you first validate inputs (Checks), then update state (Effects), then make external calls (Interactions).
View termOracle Manipulation
SecurityExploiting 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 termFactory Pattern
ArchitectureA 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 termCREATE2
ArchitectureAn EVM opcode that deploys contracts to deterministic addresses based on the deployer address, a salt, and the contract bytecode.
View termProxy Pattern
ArchitectureA smart contract architecture where users interact with a proxy contract that delegates calls to a separate implementation contract.
View termCore vs Periphery
ArchitectureAn architecture pattern separating immutable, security-critical logic (Core: Pair, Factory) from replaceable user-facing contracts (Periphery: Router).
View termFee-on-Transfer Token
ArchitectureA 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 termProtocol Revenue
TokenomicsIncome 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 termToken Vesting
TokenomicsA 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 termGovernance Token
TokenomicsA token that grants holders voting rights over protocol decisions. Can cover parameter changes (fee rates, collateral factors), treasury allocation, and upgrade proposals.
View termTotal Value Locked (TVL)
TokenomicsThe 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 termStorage Packing
SolidityAn EVM gas optimization where multiple state variables are packed into a single 32-byte storage slot. Reading one slot costs 2,100 gas.
View termEIP-2612 Permit
SolidityA 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 termUnchecked Block
SolidityA Solidity 0.8+ block where arithmetic overflow/underflow checks are disabled. Used when overflow is intentional (e.g.
View termFixed-Point Arithmetic
SolidityA technique for representing fractional numbers in Solidity (which has no native floating-point). Uniswap V2 uses UQ112.
View term