This article is more than six months old

How to track total value locked — the most powerful metric in DeFi

How to track total value locked — the most powerful metric in DeFi
How to track total value locked, the most powerful metric in DeFi. Credit: Andrés Núñez/DL News.

Total value locked is one of the most important metrics in decentralised finance, one that could raise or sink a protocol’s future. Understanding it is vital to understand DeFi as a whole.

In short, TVL is a metric that tracks how much crypto is locked up in a DeFi protocol’s smart contracts, or in all DeFi protocols running on a given blockchain.

As TVL is often viewed as a proxy for the growth and sustainability of a DeFi protocol, some investors use it to judge whether the market is correctly pricing a project’s native token.

While DefiLlama’s TVL figures are among the most widely used by those in the industry, the method for calculating TVL is not standardised.

Some blockchains try to inflate their TVL by double-counting crypto deposits.

One example of this is counting the value of both tokens deposited to liquid staking protocols and the receipt-like liquid staking tokens the protocol issues for the deposits.

Others trump up their TVLs by converting historical data to dollars using current asset prices.

It’s a tricky calculation, but getting a grip on it is fundamental to understanding DeFi.

Join the community to get our latest stories and updates

DeFi power users first started looking at TVL during the sector’s rise in the early 2020s.

As the DeFi industry matured, TVL became a powerful metric for checking the popularity of a DeFi protocol at a glance.

To DeFi users, a rising TVL signals growing liquidity and use — and, hopefully, higher yields.

For decentralised exchanges like Uniswap or Curve, a higher TVL means they can facilitate larger swap volumes relative to the incurred slippage.

Slippage refers to the difference between the expected price of a trade and the price when the trade is executed.

For lending markets like Aave, it means larger loans are possible.

Analysts may consider a DeFi protocol undervalued if its TVL is significantly higher than its token’s market capitalisation. But this may not apply to all tokens.

Curve Finance’s CRV, for example, has a revenue share model and so Curve’s TVL does directly correspond to the value of the token.

On the other hand, Uniswap’s UNI or Aave’s AAVE aren’t tied to the protocol’s dynamics.

The problem with calculating TVL

The structure of the DeFi market presents several issues for accurately calculating TVL.

So-called double-counting is the sharpest thorn in the side of anyone hoping to accurately calculate TVL.

It refers to when the value of the same underlying tokens on a given blockchain are counted multiple times.

For example, imagine a DeFi user deposits some Ether to a protocol on Ethereum.

They then receive a placeholder token representing the Ether they deposited and deposit that token into a different protocol.

Should this same Ether be counted twice? Most argue that it shouldn’t.

Double-counting has historically been a contentious issue. When DefiLlama stopped double-counting tokens in 2022, the TVL of some blockchains subsequently dropped by over a billion dollars.

How does DefiLlama calculate TVL?

Counted assets can include staked funds like those deposited to liquid staking protocol Lido, collateral and borrowed assets at lending protocols — like Compound or Aave — and funds deposited into liquidity pools at decentralised exchanges such as Curve Finance or Uniswap.

DefiLlama takes precautions to ensure that TVL is calculated accurately and without bias across the DeFi market.

It considers the value of most tokens locked in the contracts of a protocol or platform as TVL, and values tokens using CoinGecko’s API data.

DefiLlama allows users to further filter TVL across several subcategories:

  • Staking — Refers to assets locked in smart contracts.
  • Pool2 — Assets locked in a type of liquidity pool that incentivises users to deposit native tokens issued by the protocol instead of selling them. Some older projects such as Alchemix have Pool2 TVL grandfathered in to avoid reputational damage, as at the time of inclusion nobody had agreed on a better way to calculate TVL.
  • Borrows — Assets borrowed from lending protocols.

DefiLlama and the DeFi community have come to an agreement on what to exclude from TVL. Consequently, DefiLlama data does not include the TVL value of:

  • Governance tokens staked within a protocol, such as CRV tokens locked within Curve’s protocol.
  • Assets staked in blockchain contracts, as opposed to DeFi protocols. This can sometimes overshadow the TVL of DeFi protocols that run on that blockchain. DefiLlama does, however, track assets deposited to liquid staking protocols like Lido.
  • Liquidity pool receipt tokens paired with governance tokens, like Convex Finance’s pool for locked Curve DAO tokens borrowed from lending protocols.
  • The TVL of protocols whose TVL feeds into other protocols, such as locking tokens issued by Yearn Finance within Compound. These tokens would be considered Compound’s TVL, not Yearn’s.
  • Rewards and liquidity for staked assets.

How to view TVL on DefiLlama

Users can check TVL for DeFi protocols through the “Overview tab” under the DeFi dashboard.

DefiLlama displays TVL using a line plot. At the top of the chart there are several toggles to overlay other metrics, such as a protocol’s market cap and revenue, on the chart.

Users can also change the currency from USD to the native token of the blockchain on which the protocol operates.

If the USD value drops noticeably while the native asset stays fairly steady, it hints at something.

This steadiness implies that the protocol hasn’t truly experienced a decrease in TVL, but has simply been affected by the price of the blockchain’s native asset falling.

There’s also a timeline slider to zero in on specific time periods, and a toggle for important market events.

How to track total value locked

Next steps

  • Discover what led DefiLlama developer 0xngmi to remove double-counting in TVL calculation.
  • Check out the DefiLlama documents for more in-depth reading about what is and isn’t included in TVL.
Related Topics