I’ve published an updated adapter for Curve Fees
I’m using the graphql endpoint you suggested for mainnet : https://thegraph.com/hosted-service/subgraph/sistemico/curve
Querying this:
{
dailyVolumes (
orderBy: timestamp
orderDirection: desc
where: {
timestamp_gte: 1642464000
timestamp_lte: 1642465000
pool_contains
}
) {
pool {
fee
adminFee
assetType
name
}
volume
timestamp
}
}
Then summing over the pools dailyVolumes vol.volume * vol.pool.fee * asset_type_price[vol.pool.assetType]
where vol.pool.fee
is actually mostly 0.04%
The weird thing is that it seems I’m not getting the same values as displayed here on tokenterminal: Curve (CRV) | Dashboard | Token Terminal
Was probably due to the clamping of thegraph dailyVolumes object to 100 values. Adding first:1000
solved the problem - note that with 45 pools today, this limits the range queries to roughly a month of data.