An EVM gas optimization where multiple state variables are packed into a single 32-byte storage slot. Reading one slot costs 2,100 gas. Uniswap V2 packs both reserves (uint112 each) and a timestamp (uint32) into one slot: 112 + 112 + 32 = 256 bits, saving 2,100 gas per read compared to separate slots.
Solidity
Storage Packing
Related terms in Solidity
EIP-2612 Permit
A standard that allows token approvals via off-chain signatures instead of on-chain transactions. Users sign a...
Unchecked Block
A Solidity 0.8+ block where arithmetic overflow/underflow checks are disabled. Used when overflow is intention...
Fixed-Point Arithmetic
A technique for representing fractional numbers in Solidity (which has no native floating-point). Uniswap V2 u...