What is TVL in DeFi and Why It Matters
Total Value Locked (TVL) is the most-cited metric in DeFi. Here's what it actually measures, why it can be misleading, and how to use it in your analysis.
Builder of AI agents, crypto trading bots, and open-source automation tools. Sharing practical guides on how to build, deploy, and profit from AI and DeFi technology.
"Protocol X has $5 billion TVL" โ you see this phrase constantly in crypto. But what does it actually mean, why does it matter, and when does it mislead you?
What TVL Actually Measures
TVL = Total Value Locked = the sum of all assets deposited in a protocol's smart contracts.
On Aave, TVL includes:
- Every USDC deposited for lending
- Every ETH deposited as collateral
- Every WBTC supplied to the protocol
TVL is essentially "how much money is using this protocol right now."
How to Read TVL Data
The best free source is DeFiLlama. It aggregates TVL across every major protocol and chain.
import requests
def get_protocol_tvl(protocol_slug: str) -> dict:
"""Get TVL history for a DeFi protocol via DeFiLlama API."""
r = requests.get(f"https://api.llama.fi/protocol/{protocol_slug}", timeout=10)
data = r.json()
current_tvl = data.get('tvl', [{}])[-1].get('totalLiquidityUSD', 0)
return {
"name": data.get('name'),
"tvl_usd": f"${current_tvl/1e9:.2f}B",
"category": data.get('category'),
"chains": data.get('chains', []),
}
def get_top_protocols(limit=10) -> list:
"""Get top DeFi protocols by TVL."""
r = requests.get("https://api.llama.fi/protocols", timeout=10)
protocols = r.json()
return sorted(protocols, key=lambda x: x.get('tvl', 0), reverse=True)[:limit]
top = get_top_protocols()
for p in top:
print(f"{p['name']}: ${p['tvl']/1e9:.2f}B TVL ({p.get('category', 'N/A')})")
When TVL Is a Useful Signal
Growing TVL = User adoption: More people trusting the protocol with real money. This is genuinely bullish for the protocol's health.
TVL rank helps identify dominant protocols in each category (lending, DEX, bridges).
TVL vs token market cap: The ratio TVL / Market Cap (called "Market Cap/TVL") shows how "expensive" the protocol's token is relative to actual usage. Values near 1.0 are "fairly valued" by this metric. Very high values (>10) suggest the token may be overvalued relative to usage.
When TVL Is Misleading
1. Double-counting: If you deposit ETH in Aave, borrow USDC, and deposit that USDC in Curve โ your ETH is counted in Aave's TVL and your USDC in Curve's TVL. The same underlying capital is counted twice.
2. Token price dependency: TVL is denominated in USD. When ETH price doubles, every ETH-denominated TVL metric doubles โ even if no new users joined.
3. Artificial TVL: Some protocols bootstrap TVL with unsustainably high yields to attract deposits, then collapse when yields dry up.
4. Doesn't measure revenue: A protocol with $10B TVL but low trading volume might generate less fee revenue than one with $1B TVL and high volume.
Better Metrics Alongside TVL
| Metric | What It Shows | Source | |--------|--------------|--------| | Protocol Revenue | Actual fees earned | DeFiLlama โ Fees | | Active Users | Real engagement | Dune Analytics | | Volume/TVL | Capital efficiency | DeFiLlama | | Revenue/TVL | Yield sustainability | Manual calculation |
For bots specifically: protocol revenue and volume are more important than TVL. A protocol generating $5M/day in fees with $2B TVL is healthier than $10B TVL with $100K/day in fees.
TVL is a useful first filter when evaluating DeFi protocols. Use it alongside revenue, volume, and user data for a complete picture.