Author: Dynamo DeFi, Compiler: 0xjs@Golden Finance

Recently I have been developing a new on-chain metric to properly capture economic activity on the blockchain.

As I often say, a useful framework for analyzing blockchains is to think of them as digital economies:

  • Incentive Program = Stimulus

  • Liquidity Inflow = Foreign Investment

So what is the best metric to measure this activity?

There are many problems with current indicators:

TVL — Represents dollars, not activity. Due to large deposits, not all TVL is equally productive.

TX quantity - represents activity, but not amount. This is easy to be fooled.

DEX volume — represents USD and activity, but only a specific type of economic activity. Does not capture activity from games or even other DeFi projects.

Chain GDP - Chain GDP measures the dollars and activity on a chain. Essentially, it is the sum of all fees generated by applications on the chain. Note: This does not mean only the fees of the chain itself.

Since only fees are counted (not raw transfer amounts), it is much harder to fake using wash trading or Sybil attacks. To fake the chain GDP, you would need to pay a lot of fees to various dApps in the ecosystem.

method

To extract the data, I used DefiLlama’s Fees and Revenue API.

If you're not sure about the difference between expenses and income:

  • Fee = amount paid by the user

  • Revenue = Fees due to the protocol or token holders

For example, fees paid to liquidity providers are not revenue, but fees used for governance token staking rewards are revenue.

As for actually extracting this data, you can either iterate over the protocols and extract their total fees by chain, or you can iterate over the chains and calculate the total fees for the protocols on that chain. I chose to iterate over the chains and use the /overview/fees/{chain} endpoint because when extracting fees by chain, the TotalDataChart property shows the sum of fees for all protocols on that chain - which is exactly what we want.

Two main decisions must be made at this point:

  1. Expenses or income?

  2. Group L2 with L1 or keep them independent?

Fees vs. revenue is a simple decision. Revenue is heavily dependent on token economics. Take a protocol like Uniswap, for example. Even though Uniswap is one of the largest centers of economic activity in crypto, if we count revenue instead of fees, only Uniswap Labs’ revenue contributes to Ethereum’s GDP. Furthermore, the analysis I’ve conducted in the past has consistently found that fees are a better predictor of market cap than revenue.

Deciding whether to group L2 with its parent L1 is more difficult. To be honest, this is mostly related to Ethereum. I chose to separate them for several reasons:

  1. Higher granularity. Combining Arbitrum, Base, etc. with Ethereum provides less information than if they were separated. Anyone who wants to count them together can easily do so; however, grouping them by default obscures the meaningful shifts happening in the on-chain economy.

  2. Industry standard. Like it or not, most data providers (like DefiLlama and Artemis) default to comparing L2 as their own chain.

  3. On-chain economy. Economic activity on a chain is, to some extent, downstream of liquidity flowing into that chain. At least for now, liquidity flowing into and out of L2 is similar to inter-chain flows.

By popular request, I plan to publish the full script I used on GitHub so others can test it themselves, but I've never published there before (my background is in finance/economics, not software).

Chain GDP data

Now let's look at the data.

Ethereum is clearly ahead in terms of chain GDP (not surprisingly). In recent days, Ethereum’s GDP has been around $10-15 million most days, while Solana, the second-ranked blockchain by this metric, has a GDP of around $6-7 million.

That being said, Solana is the clear winner this year. While most major blockchains peaked in March and have suffered from a drop in activity since then (recession?), Solana has remained stable and even grown, pulling away from its closest competitor and approaching the GDP of Ethereum itself.

Another notable trend is Base, which has seen its GDP briefly rise from 8th to 3rd among these public chains and now ranks 6th, despite a downward trend in recent weeks.

For those who wish to dive deeper into other chains and time periods, here is an extract of the data exported on July 12, 2024

https://docs.google.com/spreadsheets/d/1JSIMYO4gTMIRbc2PIIHUtEkGcQKj3zJy6QL0SUAaBF8/edit?gid=0#gid=0。

This spreadsheet contains data for over 50 chains since the beginning of 2024.