Article

DeFi Fundamentals: Lending, AMMs, and Liquidity Pools

How decentralized finance actually works - automated market makers, liquidity pools, lending markets, yield, and the impermanent loss nobody warns you about.

10 min readintermediatedefi-nftsUpdated Jun 19, 2026
Share:
Table of contents
  1. Banks without the bank
  2. AMMs: trading against a pool, not a person
  3. Liquidity pools and where yield comes from
  4. Impermanent loss: the LP's hidden tax
  5. Reading risk before chasing yield

Banks without the bank

DeFi - decentralized finance - rebuilds financial services as open-source code that anyone can use without an account, a credit check, or a gatekeeper. Lending, trading, borrowing, earning interest: the same primitives as a bank, but the 'bank' is a smart contract that follows public rules and can't quietly change the terms on you.

The magic and the danger are the same thing: it's all automatic and irreversible. There's no manager to call. The contract does exactly what it's coded to do, which is wonderful until the code has a bug. Respect the power; verify the protocol.

AMMs: trading against a pool, not a person

Traditional exchanges match buyers with sellers via an order book. Most DeFi exchanges use an Automated Market Maker instead. Instead of finding a counterparty, you trade against a pool of two assets, and a formula sets the price based on the ratio of what's in the pool.

The classic formula is x * y = k: the product of the two reserves stays constant. Buy a lot of token X and you drain it from the pool, which pushes its price up automatically. This is why large trades suffer 'slippage' - you move the price as you trade. It's elegant: no order book, no market makers, just math and a pile of liquidity available 24/7.

Liquidity pools and where yield comes from

Those pools don't fill themselves. Liquidity providers (LPs) deposit pairs of tokens and, in return, earn a cut of every trade's fees. That's real yield: you're getting paid for providing the inventory that lets others trade.

Lending markets work similarly. You supply an asset, borrowers pay interest to borrow it (over-collateralized, so they post more than they take), and you earn that interest. When a protocol also hands out its own governance token as a reward, that's 'yield farming' - and it's worth asking how much of the advertised APY is real fees versus temporary token emissions that may evaporate.

Impermanent loss: the LP's hidden tax

Here's the thing nobody mentions before you provide liquidity. If the two tokens in your pool change price relative to each other, you can end up with less value than if you'd simply held them. The AMM automatically rebalances, selling the winner and buying the loser, so you capture less of a big move. That gap is called impermanent loss - 'impermanent' because it only locks in when you withdraw, but very permanent if the prices don't come back.

Fees can outweigh it, especially in stable pairs where prices barely diverge. But pairing a volatile token with a stablecoin and watching the token moon means your LP position underperforms just holding. The Yield Calculator Race game on the Games page drills exactly this kind of DeFi math - APY, compounding, and impermanent loss - under a timer, which is the fastest way to make the formulas stick.

Reading risk before chasing yield

A 4% yield from lending blue-chip assets on a battle-tested protocol is a different animal from a 4,000% farm on a three-day-old contract. High yield is a price the market pays you for taking on risk - smart contract bugs, depegging assets, mercenary liquidity that leaves the moment rewards drop.

Before you deposit, ask: Is the contract audited and old enough to have survived stress? Where does the yield actually come from? What happens if one of these tokens crashes? DeFi can be genuinely rewarding, but it rewards the people who understand what they're holding, not the ones who only read the APY.

H
Hunger4Crypto Editorial TeamCrypto Education & Research

Our editorial team combines years of blockchain industry experience with a commitment to clear, unbiased crypto education. All content is reviewed for accuracy and updated regularly.

Updated:

📚Related Articles

Was this helpful?