The building blocks of DeFi
- Lending protocols — supply assets to earn yield, or borrow against collateral. Rates adjust automatically based on supply and demand.
- AMMs / DEXes — swap one token for another via liquidity pools rather than an order book. Providers deposit token pairs and earn fees.
- Yield — returns from lending, staking, or providing liquidity. Higher yield almost always means higher risk.
- Staking — lock tokens to help secure a PoS network and earn rewards (technically not DeFi, but often grouped with it).
- Governance tokens — tokens that let holders propose and vote on protocol changes.
How an AMM works (with a lemonade-stand analogy)
An AMM holds a pool of two tokens (say USDC and ETH). A formula (like the constant-product x · y = k) sets the price based on the pool’s ratio. When you swap, you add one token and remove the other, shifting the ratio and therefore the price. Liquidity providers earn a share of the swap fees in return for supplying the pool.
A swap against an x · y = k pool