Fees & Revenue
TLDR: Fees are what the demand-side (i.e. users) of a protocol pay (excluding gas fees).
The closest comparison to this metric in traditional companies is what most two-sided marketplaces get from their end users in fees. As an example, on top of Airbnb's revenue numbers they also report quarterly Gross Booking Value (GBV) numbers. Gross bookings is the total amount that renters pay for their stay in a given location.
Supply-side fees is what the supply-side (i.e. service providers) receive. Continuing our Airbnb example, this is what hosts get after Airbnb takes their cut for facilitating the marketplace. Airbnb's cut is what traditionally is counted as revenue.
The exact logic for fee calculations depends on which protocol we are tracking. We will go through a few different protocols and showcase how the fees and revenue are split.
Uniswap is an AMM-based decentralized exchange. Liquidity providers deposit funds into pools and receive a return on investment (supply-side fees) from the fees charged for each token swap. The protocol currently does not take a cut of any of the swap fees paid by traders.
We index each pool's
Swapevent to track the volume and, subsequently, the fees and revenue. In the case of Uniswap V2 pairs, the swap fee is static (0.3%), whereas for Uniswap V3 pools swap fees are tiered (0.05%, 0.3% and 1%). The example below shows the relevant events and parameters for fee and revenue calculations for the USDC/ETH pools (Uniswap V3) and pair (Uniswap V2).
Compound is a non-custodial lending protocol built on Ethereum. Lenders deposit funds into Compound and receive interest payments from borrowers (supply-side fees). The protocol takes a cut of the total interest paid by borrowers and trading fees paid by traders (revenue).
We index each lending market's
AccrueInterestevent to track the total interest paid by borrowers. Each market configures its own reserve factor which is used to calculate the part of interest paid going to the protocol. We track this monitoring
NewReserveFactorevents. The example below shows the events and parameters relevant for fee and revenue calculations for the USDC market.