DeFi Protocol Layer

18 min readUpdated: March 2026

DeFi protocols are the applications layer of blockchain — the products that users actually interact with. From swapping tokens on Uniswap to earning yield on Aave, understanding how these protocols work gives you a career advantage that few traditional finance professionals possess.

Automated Market Makers (AMMs)

Automated Market Makers replaced the order book model in DeFi. Instead of matching individual buyers and sellers, AMMs maintain a liquidity pool containing two (or more) tokens and use a mathematical formula to price trades automatically. Uniswap's constant product formula is the foundational model:

x × y = k

where x and y are token reserves, and k remains constant after any trade

When you buy ETH from an ETH/USDC pool, you add USDC and remove ETH. The formula automatically reprices ETH upward to reflect the reduced supply in the pool. No counterparty needed, no order matching required — the price emerges mathematically from the current reserves.

Uniswap V3: Concentrated Liquidity

The original AMM model spreads liquidity evenly across all possible prices from zero to infinity. Most trading activity occurs within a narrow price range, meaning the majority of deposited capital was sitting idle. Uniswap V3 (May 2021) introduced concentrated liquidity: LPs can specify the price range within which their capital is active. An LP who concentrates their ETH/USDC position between $1,800 and $2,200 earns fees equivalent to 4,000x the capital a V2 LP would need — if ETH trades within that range. Capital efficiency increased by up to 4,000x, and Uniswap now processes over $2 billion in daily volume with $6.8 billion in TVL.

Impermanent Loss

Providing liquidity to an AMM carries a specific risk called impermanent loss (IL). Consider a $1,000 ETH/USDC position deposited when ETH = $2,000:

  • You deposit: 0.25 ETH + 500 USDC
  • ETH price rises to $4,000
  • Your pool position is now worth: ~0.177 ETH + 707 USDC ≈ $1,414
  • If you had held: 0.25 ETH + 500 USDC ≈ $1,500
  • Impermanent loss: ~$86 (5.7%) compared to simply holding

IL is "impermanent" because if the price returns to the original level, the loss disappears. But if you withdraw during a divergence, the loss crystallizes. LP fees can offset IL — whether they do depends on the pool's trading volume relative to price volatility.

Top DeFi protocols by TVL

Top DeFi protocols by Total Value Locked — liquid staking dominates at $41B+

Lending and Borrowing

DeFi lending protocols enable permissionless borrowing and lending without credit checks, paperwork, or institutional relationships. The model is simple: depositors provide liquidity and earn interest; borrowers post collateral and borrow against it. As of early 2026, Aave holds $14.1B in TVL and Compound holds $3.2B.

Over-Collateralization

DeFi lending requires over-collateralization — you must deposit more value than you borrow. A typical collateral ratio is 150%: to borrow $10,000 USDC, you must deposit $15,000 ETH. This seems inefficient compared to traditional finance, but it eliminates counterparty risk entirely: if a borrower defaults, the protocol can automatically liquidate their collateral to repay the loan. No courts, no credit bureaus, no collection agencies.

Aave: Flash Loans and Rate Switching

Aave extended the lending model with two innovations: flash loans (uncollateralized loans that must be repaid within the same transaction, enabling arbitrage and collateral swaps with zero capital at risk) and rate switching (users can toggle between stable and variable interest rates). Aave V3 introduced cross-chain lending and efficiency mode, allowing users with correlated assets (e.g., stablecoins) to borrow at up to 97% LTV rather than the standard 80%.

Liquidation Mechanics

When a borrower's collateral value falls toward the liquidation threshold (typically when the loan-to-value ratio exceeds 82.5% on Aave), any external actor (liquidator) can repay a portion of the loan and receive the collateral at a discount (typically 5–15%). This discount incentivizes rapid liquidation, protecting the protocol from bad debt. Liquidation bots monitor health factors across thousands of positions in real-time — a significant career opportunity for engineers specializing in MEV (Maximal Extractable Value) infrastructure.

Staking and Liquid Staking

Ethereum's transition to Proof of Stake created the staking economy. To become a validator, you must lock 32 ETH (approximately $83,000 at $2,600/ETH) and run validator software 24/7. Validators earn approximately 4% APY in staking rewards, but their ETH is locked until they choose to exit — a process that can take weeks during high withdrawal queue periods.

Liquid Staking Tokens

Liquid staking protocols allow anyone to stake any amount of ETH and receive a liquid receipt token representing their staked position plus accrued rewards:

  • stETH (Lido): rebasing token — your balance increases daily as rewards accrue
  • rETH (Rocket Pool): value-accruing token — price increases relative to ETH
  • cbETH (Coinbase): institutional liquid staking token from Coinbase

Lido dominates with $28.2B TVL and 31% of all staked ETH — a concentration that has triggered governance debates about excessive centralization of Ethereum's validator set.

Liquid Staking Flow

Your ETH
Any amount
Lido Protocol
Pools ETH across validators
stETH
Liquid receipt token
Use in DeFi
Collateral, liquidity, yield

Liquid staking tokens maintain DeFi composability while earning staking yield

EigenLayer: Restaking

EigenLayer introduced restaking (2023): Ethereum validators can opt-in to secure additional protocols using their already-staked ETH, earning additional yield in return for additional slashing risk. With $13.4B TVL, EigenLayer has created a new market structure where Ethereum's economic security can be "rented" to emerging protocols — including data availability layers, oracle networks, and rollup sequencers — without requiring them to bootstrap their own validator sets.

DeFi category TVL breakdown

DeFi TVL by category — liquid staking ($41B+) and lending ($35B+) lead the market

Yield Generation

DeFi offers multiple yield sources, each with distinct risk profiles:

  • LP fees: earned by providing liquidity to DEX pools (typically 0.05–1% per trade depending on the pool tier)
  • Lending rates: interest earned by depositing assets into lending protocols (variable, market-driven)
  • Staking rewards: protocol-native rewards for staking governance tokens or validation participation
  • Protocol incentives (emissions): token rewards distributed to attract liquidity — the highest-APY yields but also the most volatile

The distinction between real yield (fees and interest from actual protocol usage) and token emissions (newly minted tokens given as incentives) is critical. "DeFi summer" (2020) demonstrated the danger of emissions-driven yields: when token prices fell, APYs collapsed, liquidity fled, and many protocols died. Protocols like Uniswap and Aave generate substantial real yield — their sustainability is not dependent on token price appreciation.

Yield aggregators like Yearn Finance and Convex Finance automate the process of moving capital between yield strategies, compounding rewards automatically and reducing gas costs through batched transactions. Understanding the yield stack — from protocol design to tokenomics to risk management — is one of the most commercially valuable skills in DeFi.

Key Takeaways

  • AMMs use constant product formulas (x × y = k) to price trades automatically — Uniswap V3 concentrates liquidity for up to 4,000x capital efficiency
  • DeFi lending requires over-collateralization; liquidation bots enforce protocol solvency without human intervention
  • Liquid staking tokens (stETH, rETH) allow ETH to earn staking yield while remaining composable within DeFi
  • EigenLayer restaking extends Ethereum's $100B+ economic security to other protocols for additional yield
  • Real yield (from fees and usage) is fundamentally more sustainable than token emissions — evaluate both when assessing a protocol