Reference desk

DefiLlama

An independent, plain-language field guide to the data behind DefiLlama, its total value locked methodology, and the dashboards built on top of it.

01 / Overview

How DefiLlama measures decentralized finance

DefiLlama is an open source data aggregator that measures how much value is sitting inside decentralized finance protocols and how that value moves between blockchains. It reads balances directly from public chains, prices them in US dollars, and publishes the result as free dashboards and a public API. You can look up a single lending market, compare hundreds of them side by side, or download the whole dataset without creating an account.

Abstract representation of blockchain analytics dashboards with total value locked charts
DefiLlama presents on-chain balances as comparable dollar figures across chains, categories, and individual protocols.

The project's reputation rests on two decisions that are unusual in crypto analytics. First, the measurement itself is public: the code that reads each protocol's contracts lives in an open repository, so a disputed figure can be traced back to the exact lines that produced it. Second, protocols do not buy their way in. A listing on DefiLlama is free, and the order of the tables is a function of the underlying data rather than of sponsorship.

DefiLlama grew out of the DeFi expansion of the early 2020s, when total value locked, usually shortened to TVL, became the shorthand everyone used to size a protocol, and no neutral place existed to compute it the same way twice. The site has been built and maintained largely by pseudonymous contributors, the best known of whom goes by 0xngmi, together with a constant stream of outside pull requests from protocol engineers, analysts, and hobbyists.

This guide covers what DefiLlama actually measures, how those numbers are produced and refreshed, what each family of dashboards is for, how to pull data out programmatically, and where the figures deserve a second look. If you have ever quoted a TVL chart in a research note or a pitch deck, the methodology section is the part worth reading twice.

02

What DefiLlama tracks

TVL is the metric DefiLlama is known for, but it is only one column of a much wider table. Over time the project has grown from a single leaderboard into a set of linked datasets that answer different questions: how much capital is parked somewhere, how much activity that capital generates, what it earns, and what risks surround it. Most DefiLlama pages share the same grammar, which is a sortable table, a time series chart above it, and a set of filters for chain and category.

The capital side covers TVL by protocol, by chain, and by category, plus stablecoin supply broken down by issuer and by network, protocol treasuries, and token unlock and emission schedules. These are stock measures: they describe what exists at a point in time. They are the numbers that move when prices move, which is the single most common source of confusion for newcomers.

The activity side is made of flow measures. DefiLlama tracks spot decentralized exchange volume, perpetual futures volume, options activity, bridge transfers between chains, and the fees users pay along with the share of those fees that reaches a protocol as revenue. Flow data answers the question a TVL chart cannot: whether the deposits are actually being used for anything.

A third group is context and risk. There are yield tables with historical APY for individual pools, borrow and lending rates, liquidation levels, a catalog of hacks and exploits with the amounts lost, venture funding rounds, centralized exchange reserve transparency, fork relationships between codebases, and spot crypto ETF flows. None of these are TVL, and grouping them under one roof is much of the practical value of the site.

Navigation follows the same logic. Chain pages roll everything up for a single network, category pages compare protocols doing the same job such as lending or liquid staking, and each protocol has its own page with a description, links, audit status, and the toggles that control what its headline number includes. Learning where those toggles live is the quickest way to stop misreading DefiLlama charts.

Capital

  • Protocol, chain, and category TVL
  • Stablecoin supply by issuer and chain
  • Treasuries and token unlock schedules

Activity

  • Spot and perpetuals trading volume
  • Fees paid and protocol revenue
  • Bridge flows between networks

Yield

  • Pool level APY with history
  • Lending and borrowing rates
  • Filters by chain, asset, and pool size

Risk and context

  • Hack and exploit records
  • Venture raises and forks
  • Exchange reserve transparency
03

How DefiLlama calculates total value locked

Total value locked, as DefiLlama defines it, is the dollar value of the assets held in a protocol's smart contracts at a given moment. It is not money the protocol owns, and it is not money it has earned. It is the size of the pot users have entrusted to the contracts, whether that pot is collateral in a lending market, liquidity in a trading pool, or deposits in a vault.

The mechanics are deliberately simple, which is what makes them auditable. Each protocol has an adapter, a small piece of code that names the contracts to inspect and the tokens to count. The adapter returns token balances, a pricing service converts those balances into dollars, and DefiLlama stores the result as a timestamped data point. Repeat that across every listed protocol and you get chain totals, category totals, and the global DeFi figure.

  1. 01 Adapter names contracts and tokens
  2. 02 Node reads balances from the chain
  3. 03 Price feed converts to US dollars
  4. 04 Values stored with a timestamp
  5. 05 Rolled up by chain and category
The DefiLlama pipeline from contract call to published chart.

What counts as locked

The headline number is meant to reflect the assets that make the product work. In a lending protocol that is the supplied collateral; in an automated market maker it is the pooled liquidity; in a liquid staking protocol it is the staked base asset. Borrowed amounts are reported separately rather than added on top, because counting both the collateral and the loan drawn against it would inflate the same capital twice.

Several other pools of value sit alongside the core figure instead of inside it. Tokens staked purely for governance rewards, liquidity pools that pair a protocol's own token with something else, treasury holdings, and unvested team allocations are all tracked, but DefiLlama keeps them as separate switches so that a project cannot pad its ranking by counting its own emissions as user deposits.

Where the prices come from

A balance is only half the calculation. DefiLlama runs its own token pricing service that combines market data with on-chain sources so that assets without a deep listing still receive a value. Long tail tokens, wrapped assets, and receipt tokens are the hard cases, and the way they are priced is a recurring reason two trackers can disagree about the same protocol by a noticeable margin.

Double counting and the toggles

Modern DeFi is stacked. A user stakes ether, receives a liquid staking token, deposits that into a lending market, and borrows against it to farm somewhere else. Each of those steps is a real protocol with real balances, so a naive sum counts the same underlying ether several times. DefiLlama handles this by tagging protocols whose deposits are derivatives of value already counted elsewhere, then offering explicit switches for double counted and liquid staking value on chain and category totals.

The practical rule is to state which setting you used. A DefiLlama chain total with double counting included and one with it excluded are both defensible figures, but they are not the same figure, and quoting one while describing the other is how bad research notes get written.

Components and how DefiLlama presents them
Component Treatment Reason
User deposits in core contracts In the headline number This is the capital the product actually uses
Borrowed amounts Reported separately Avoids counting collateral and loan as two sums
Governance staking of the native token Separate switch Reflects token holders, not deposited user capital
Pools pairing the protocol's own token Separate switch Highly reflexive with the token price
Treasury and vesting balances Tracked apart from TVL Owned by the project rather than locked by users
Derivative deposits already counted elsewhere Flagged, with a toggle on totals Prevents the same asset inflating a chain total

How often the numbers refresh

DefiLlama is a periodic snapshot system, not a real-time feed. Adapters run on a schedule and write new points throughout the day, which is fast enough for trend analysis and slow enough that it will not match a protocol's own live dashboard to the dollar in the middle of a volatile hour. Historical series are kept, so charts can be rewound and compared across periods, and that history is what makes DefiLlama useful for research rather than only for monitoring.

04

How a protocol gets listed on DefiLlama

Listings work through code, not through a sales conversation. Someone writes an adapter for the protocol, opens a pull request against the public adapters repository, and a maintainer reviews it. If the logic is sound and the contracts are the right ones, the protocol appears on the site and starts accumulating history from that point forward. There is no listing fee, and paying for placement is not on the menu.

Because anyone can write an adapter, most of them are submitted by the protocol teams themselves. That is efficient, and it also means review matters. DefiLlama maintainers check that the adapter counts real user assets, that it is not quietly including the project's own tokens as if they were deposits, and that the category assigned to the protocol matches what it does. Mistakes still slip through, and corrections also arrive as pull requests, which is the fastest route if you spot a number that looks wrong.

In practice, a submission moves faster when the basics are ready before the pull request is opened. That means naming every contract that holds user funds, listing the chains involved, describing which balances should be excluded, and providing the metadata a protocol page needs.

  • Contract addresses for every chain the protocol is deployed on
  • A clear statement of which balances count as user deposits and which do not
  • Category, launch date, links, and audit information for the protocol page
  • A token identifier if the project has one, so market data lines up correctly

The same open process applies to the other datasets. Fee and volume adapters follow the same review path, hacks and funding rounds are contributed as structured entries, and forks are recorded as relationships between codebases. This is why DefiLlama coverage grows in a slightly uneven way: it expands wherever someone cared enough to write the adapter, and a niche protocol with an attentive engineer can be tracked more precisely than a larger one without.

05

TVL compared with the other DefiLlama metrics

TVL is popular because it is easy to compute and easy to compare, not because it is the best measure of a protocol's health. A protocol can hold enormous deposits and generate almost nothing, or run a small pool of capital at high velocity and earn more than a rival ten times its size. The reason DefiLlama publishes fees, revenue, and volume next to TVL is so the comparison can be made in one place.

The table below sets out what each metric answers and where it can mislead. Reading two or three of them together is usually more informative than optimizing any single one, and it is the habit that separates a careful DefiLlama user from someone quoting a leaderboard.

Metric Question it answers Main blind spot
Total value locked How much capital is deposited right now Moves with token prices even when deposits do not change
Fees What users paid to use the protocol Most of it may go to liquidity providers, not the project
Revenue What the protocol itself retained Depends on fee switch settings that can change
Volume How much trading actually flows through Can be inflated by incentive driven or wash activity
Stablecoin supply How much stable liquidity a chain holds Says nothing about whether it is being used
Yield or APY What a specific pool paid recently Backward looking and often reward token dependent
06

Getting data out of DefiLlama

A large share of the traffic to DefiLlama never sees the website. The project publishes a documented API that returns the same data behind the charts as JSON, and the core endpoints require no key and no account. That is why so many dashboards, research spreadsheets, risk monitors, and academic datasets quietly run on DefiLlama responses.

The open tier covers the essentials: the list of tracked protocols with current and historical TVL, chain level totals, token prices at current and past timestamps, stablecoin circulation, and the yield pool dataset. It is generous enough for a personal project, a newsletter chart, or a class assignment. Usage is rate limited, which is reasonable given that the whole thing is free.

For heavier or commercial work, DefiLlama sells a Pro tier that raises the limits and opens up extended endpoints across the fee, volume, and specialized datasets. It is the most visible commercial side of the project and part of what keeps the free tier free. Many charts on the site also offer a direct download, which is often the fastest path when you need one series rather than a pipeline.

Open access compared with the DefiLlama Pro tier
Aspect Open API Pro API
Access No key or account needed Subscription key
Coverage TVL, chains, prices, stablecoins, yields Extended endpoints across the wider datasets
Rate limits Suited to light and personal use Raised for production workloads
Typical user Researchers, students, hobby dashboards Funds, protocol teams, data products
Cost Free Paid, see current DefiLlama terms
07

Tools built on the DefiLlama dataset

Once you have priced token balances across every major chain, other products become natural extensions. LlamaSwap is the clearest example: a swap interface that queries several decentralized exchange aggregators at once and shows their quotes side by side, so the comparison happens in the open instead of inside a single routing engine.

The yield section works as a screener rather than a leaderboard. You can filter pools by chain, by asset, by protocol category, and by pool size, then look at how an advertised rate behaved over previous weeks instead of trusting the number shown today. Reward driven yields decay in ways that a single snapshot hides, and the history DefiLlama keeps is what makes that decay visible.

Smaller conveniences round out the set. Watchlists let you follow a handful of protocols without an account tied to your identity, comparison views put several chains or protocols on one chart, and the hack, raise, and unlock trackers double as reference tables for anyone writing about the sector. Taken together they explain why DefiLlama tends to be the first tab open during a market event.

08

Independence and the token question

Neutrality is the product. If rankings could be bought, the tables would be worthless, so DefiLlama keeps listings free and keeps the ranking logic mechanical. The open source adapters back this up in a way a policy statement cannot: if you doubt a figure, you can read the code that produced it and open a pull request arguing for a different treatment.

DefiLlama has also stated repeatedly that it does not have a token. This matters because the name is a frequent target for impersonation, and tokens claiming an association with DefiLlama have appeared more than once. Any airdrop, presale, or governance token presented as official should be treated as a scam until proven otherwise through the project's own channels.

The subject is sensitive for a reason. In 2023 a dispute over a proposed token led to a public split between the contributors who maintain the site and the venture group the project had been associated with, and the token plan was abandoned. The episode is worth knowing because it explains the firmness of the current position and why the funding model leans on a paid API tier rather than on an asset with a price.

Treat any token, presale, or airdrop claiming to represent DefiLlama as fraudulent unless it is confirmed through the project's own verified channels.

09

Reading the numbers with care

The most common mistake is reading a TVL chart as a flow of money. Because DefiLlama values deposits in dollars, a falling line can mean users withdrew, or it can mean nobody moved and the deposited assets simply lost value. Comparing the dollar series against the same protocol measured in its main deposit asset usually settles which of the two happened.

The second is comparing protocols that are not comparable. A liquid staking protocol, a lending market, and a bridge all report a TVL figure, but the number means something different in each case, and stacked positions can be counted at more than one layer. Categories exist on DefiLlama precisely so that like is compared with like, and the double counting switches exist so that chain totals can be read either way.

Third, remember where the numbers come from. Adapters are written by people, often by the teams being measured, and an adapter can point at the wrong contract or miss a new deployment after an upgrade. When a chart makes an implausible jump, checking the protocol page and the adapter history is more productive than assuming either fraud or a broken site. Corrections in DefiLlama arrive through the same public process as listings.

Finally, be explicit in whatever you publish. Note the date, the toggle settings, and the exact dashboard you took the number from, because DefiLlama recomputes history when adapters are fixed and a figure you screenshotted last quarter may not match the series today. That is a feature of a maintained dataset rather than a flaw, but only if your citation says which version you used. For background on the wider sector these figures describe, the Wikipedia overview of decentralized finance is a reasonable starting point.

10

Who uses DefiLlama

Analysts and journalists use it as a citation layer. When a story needs a figure for how much value a chain holds or how much a protocol earns in fees, DefiLlama offers a number that a reader can go and verify, which is a materially different standard from an unsourced internal chart.

Protocol and treasury teams use it as a mirror and a benchmark. Watching your own line next to direct competitors, checking whether a fee change moved revenue, and confirming that your adapter reports the same total as your internal accounting are all routine DefiLlama tasks inside a working DeFi team.

Individual users tend to arrive with narrower questions. Is this yield real, has this pool been paying it for more than a week, how large is this bridge, has this protocol been exploited before, and when does the next token unlock hit. DefiLlama answers those without an account, a wallet connection, or a signup form, which is a large part of why it became the default.

11

How to get started with DefiLlama

A first session goes better with a specific question than with aimless browsing. The sequence below moves from the widest view to a reproducible dataset in about fifteen minutes.

  1. Step 01

    Start from a chain or a category

    Pick the network or the protocol type you care about rather than the global total. Comparison is only meaningful inside a category, and this is where the DefiLlama tables do their best work.

  2. Step 02

    Open a protocol page and check the toggles

    Look at what is included in the headline figure, then switch staking, pool2, and borrows on and off to see how much of the total they represent.

  3. Step 03

    Cross-check against fees and volume

    Deposits without activity behave very differently from deposits that turn over daily. Two metrics side by side beat one metric read closely.

  4. Step 04

    Save a watchlist, then move to the API

    Track the handful of protocols you actually follow, and when manual checking gets repetitive, pull the same series from the DefiLlama API into a spreadsheet or notebook.

12

Frequently asked questions about DefiLlama

Is DefiLlama free to use?

Yes. The dashboards and the core API are free and do not require an account or a connected wallet. DefiLlama also offers a paid Pro API tier for higher limits and extended datasets, which is aimed at commercial and production use.

Does DefiLlama have a token?

No. The project has stated publicly that it has no token. Anything marketed as an official DefiLlama token, airdrop, or presale should be assumed fraudulent unless it is confirmed through the project's own verified accounts.

What exactly does TVL mean here?

It is the US dollar value of the assets held in a protocol's contracts at the time of the snapshot. On DefiLlama, borrowed amounts, governance staking, pool2 liquidity, and treasury holdings are shown separately from that headline figure rather than folded into it.

How do I get a protocol listed?

Write an adapter that reads the relevant contracts and submit it as a pull request to the public adapters repository, along with the metadata for the protocol page. Listing on DefiLlama is free and cannot be purchased or accelerated by payment.

Why does a number differ from the protocol's own dashboard?

Usually because of timing, pricing, or scope. DefiLlama refreshes on a schedule rather than every block, prices some assets differently, and may exclude components such as borrows or staking that a project chooses to include in its own headline figure.

Is the code open source?

Yes. The adapters that compute each protocol's numbers are public, which is what allows anyone to audit the DefiLlama methodology, reproduce a figure, or propose a correction through a pull request.

Can I use the data in a report or product?

The open API exists for exactly that, and attribution is the polite and useful convention. For sustained commercial workloads, check the current DefiLlama terms and the Pro tier, since rate limits on the free endpoints are set for light use.

Does DefiLlama give investment advice?

No. It publishes measurements, not recommendations. A high yield or a large TVL figure on DefiLlama describes what has happened on-chain; it says nothing about smart contract risk, counterparty risk, or whether a position is suitable for you.