Identity & evidence3 min read

TVL and Double Counting in DeFi Analytics

Define total value locked with explicit contract scope, look-through rules and prices, and avoid counting one underlying claim through several receipt layers.

Editorial illustration accompanying tvl and double counting in defi analytics.

Overview

When translating these concepts into an integration, keep the scope described by the wallet history api with the result. The examples in wallet transaction history and smart contract event logs show how the same distinction affects neighbouring data questions.

Total value locked is a methodology-driven aggregation. Nested positions and receipt tokens can make one underlying asset appear in several places, so the metric needs a declared counting boundary.

Decide direct or look-through value

A direct contract-balance view measures assets held at selected addresses. A look-through view interprets claims on underlying assets. Combining both without reconciliation can count the same exposure twice. Borrowed assets and protocol-owned holdings also need explicit inclusion rules rather than an assumed industry-wide definition.

Worked example: a deposited receipt token

A vault holds one hundred units of an asset and issues a receipt token. A second protocol holds that receipt token. Adding the vault’s underlying value and the full receipt value can count the same claim twice in an ecosystem-wide aggregate. Keep the claim relationship available for the selected aggregation policy.

Publish calculation context

Record contract scope, block, price observations and exclusions. Test nested vaults, missing conversion rates and a depegged quote asset. Changes in prices can move TVL without deposits or withdrawals. Keep flow metrics separate so readers do not interpret every value change as new capital.

A practical acceptance test

Represent one underlying hundred-unit claim through a vault and a deposited receipt token. Assert the selected ecosystem aggregation does not count two hundred by accident. Move the asset price without adding funds and verify that the TVL change is not labelled a deposit. Preserve direct and look-through views as separate reproducible methods.

Questions about the topic

Frequently asked questions

Does rising TVL always mean new deposits?

No. Prices and conversion rates can change the valuation.

Can receipt tokens cause duplicate value?

Yes, if the same underlying claim is counted through multiple layers.

Standards & technical documentation

Further reading

{{TODO: author name}}

Practical explanations of blockchain data, software integration and the context behind a record.

About Indexbase
← Back to all articles

Build with better context.

Get an update when private beta opens.

Form setup in progress. Nothing entered here is sent or saved. {{TODO: endpoint}} See the full form and email alternative.