Skip to main content

DeFi Fundamentals

What DeFi is, core protocols, TVL, composability, smart contract risk, and the mental model for DeFi investing.

What Is DeFi?

Decentralized Finance, DeFi, is a category of financial applications built on public blockchains that operate without centralized intermediaries. Instead of a bank, broker, or exchange company processing your transactions, smart contracts, self-executing code deployed on a blockchain, handle lending, borrowing, trading, and yield generation. Anyone with a wallet can interact with these protocols 24/7, without KYC, without approval, and without a minimum balance. DeFi is permissionless finance.

The significance of DeFi is not just "removing the middleman." It is about creating financial primitives that are composable, transparent, and programmable. Every transaction is publicly verifiable. Every protocol's rules are encoded in smart contracts that anyone can audit. And because these protocols live on the same blockchain, they can interact with each other: a loan from one protocol can be used as collateral in another, which can be deposited into a third for yield. This composability is what makes DeFi fundamentally different from traditional finance.

Core Protocol Categories

DeFi protocols fall into several fundamental categories. Understanding each category and how they interact is essential before you deploy capital into any of them.

Lending & BorrowingDeposit assets to earn interest, or borrow assets against collateral. Over-collateralized by design. You deposit more than you borrow. Protocols: Aave, Compound, Morpho.
Decentralized Exchanges (DEXs)Swap tokens without a centralized order book. Most use automated market makers (AMMs) where liquidity providers fund pools. Protocols: Uniswap, Curve, PancakeSwap.
DerivativesTrade perpetual futures, options, and synthetic assets on-chain. Protocols: dYdX, Hyperliquid, GMX, Synthetix.
Yield AggregatorsAutomatically compound and optimize yield farming positions across multiple protocols. Protocols: Yearn Finance, Beefy Finance.
InsuranceCover smart contract risk, oracle failures, and protocol exploits. Protocols: Nexus Mutual, InsurAce.
StablecoinsTokens pegged to fiat currencies. The backbone of DeFi liquidity. Types: fiat-backed (USDC, USDT), crypto-backed (DAI), algorithmic.

TVL: Total Value Locked

Total Value Locked (TVL) is the primary metric for measuring DeFi adoption and protocol health. TVL represents the total amount of assets deposited into a protocol's smart contracts. Higher TVL generally indicates more trust, more liquidity, and deeper markets. However, TVL alone is not sufficient. You must also consider how the TVL is distributed (concentrated in a few whale wallets vs. many small depositors), whether it is incentivized by emissions (which disappear when rewards end), and how it trends over time.

DeFi TVL peaked at roughly $180 billion in late 2021, crashed to approximately $40 billion during the 2022 bear market, and has been recovering as market conditions improve. The TVL cycle closely tracks the broader crypto market cycle, but individual protocols can buck the trend if they offer genuinely superior products or sustainable yield.

TVL is not market cap

TVL measures deposits, not valuation. A protocol with $1 billion TVL and a $200 million governance token market cap has a TVL/market cap ratio of 5x, meaning each dollar of token value secures $5 of deposits. This ratio can indicate whether a protocol's token is undervalued relative to its usage.

Composability: Money Legos

The most powerful property of DeFi is composability: protocols can interact with each other permissionlessly. Deposit ETH into a lending protocol, receive a receipt token (like aETH), use that receipt token as collateral in another protocol to borrow stablecoins, then deposit those stablecoins into a liquidity pool to earn trading fees. Three protocols, one continuous chain of value creation. This is why DeFi is called "money legos". Each protocol is a building block that snaps together with others.

Composability creates enormous capital efficiency but also cascading risk. If the bottom layer fails (a lending protocol exploit, for example), every position built on top of it can collapse. The DeFi stack is only as strong as its weakest link.

1

Layer 1: Collateral deposit

Deposit 10 ETH into a lending protocol. Receive a receipt token (e.g., aETH) representing your deposit. Your ETH earns lending interest while deposited.
2

Layer 2: Borrow against collateral

Use your aETH as collateral to borrow 15,000 USDC (at ~65% loan-to-value). The lending protocol locks your aETH and issues you USDC. You now have leveraged exposure.
3

Layer 3: Deploy borrowed capital

Deposit the 15,000 USDC into a stablecoin liquidity pool earning 8% APY from trading fees. Your total yield stack: ETH lending interest + USDC liquidity pool fees, minus the borrowing interest on your loan.
4

The risk cascade

If ETH drops 40%, your collateral value falls, and you face liquidation. If the lending protocol is exploited, you lose your collateral. If the liquidity pool is drained, you lose your deployed capital. Each layer adds yield and risk.

Smart Contract Risk

Every DeFi protocol is a smart contract: code deployed on a blockchain. If that code has a bug, an attacker can exploit it and drain funds. Billions of dollars have been lost to smart contract exploits since DeFi's inception. This is the defining risk of DeFi and the reason you should never deposit money you cannot afford to lose into any single protocol.

Audits reduce but do not eliminate this risk. A smart contract audit is a third-party review of the code by security researchers who look for vulnerabilities. Top audit firms include Trail of Bits, OpenZeppelin, Spearbit, and Cyfrin. A protocol that has been audited by multiple reputable firms, has a bug bounty program, and has been live for over a year with significant TVL is lower risk than an unaudited protocol launched last week, but no protocol is zero risk.

The audit paradox

An audit does not guarantee safety. It means professional reviewers looked for bugs and did not find critical ones at the time of the audit. New attack vectors are discovered constantly. The code may have been modified after the audit. And the audit scope may not have covered all contract interactions. Treat audits as a necessary minimum, not a guarantee.

Governance Tokens and Voting

Most DeFi protocols are governed by token holders. If you hold the protocol's governance token (UNI for Uniswap, AAVE for Aave, COMP for Compound), you can vote on proposals that change the protocol's parameters: interest rate curves, fee structures, new collateral types, treasury allocations, and more. This is the decentralized part of "decentralized finance": no single entity controls the protocol.

In practice, governance participation is low and dominated by large token holders (whales and the protocol's founding team). Most retail users do not vote. This creates a governance concentration risk: a small number of wallets can push through proposals that benefit themselves. Understanding who controls governance is part of due diligence.

The DeFi Stack

DeFi exists as a layered architecture. Understanding which layer you are interacting with helps you assess risk, understand fees, and make better deployment decisions.

Layer 1: SettlementThe base blockchain (Ethereum, Solana, Avalanche). Provides security, finality, and decentralization. Gas fees are paid here.
Layer 2: ScalingRollups and sidechains (Arbitrum, Optimism, Base, Polygon). Faster and cheaper transactions while inheriting L1 security.
Protocol LayerThe smart contracts themselves: Uniswap, Aave, Curve. The core financial primitives that hold and move funds.
Aggregator LayerServices that optimize across multiple protocols: DEX aggregators (1inch), yield optimizers (Yearn), portfolio managers.
Interface LayerThe frontends you interact with: web apps, wallets, dashboards. You can always bypass the frontend and interact directly with the smart contract.

Start small and layer up

Do not try to master all of DeFi at once. Start with a single lending deposit on a top-tier, heavily audited protocol. Understand how it works, monitor your position, and learn the mechanics. Then add a second protocol layer. Build your DeFi knowledge the same way you build composable positions. One block at a time.

Put this lesson to work

Free on Thrive, no account needed.