Query editor
---------------------------------------------------------------------------------------------------------------------------------------------------------------BD/USDC LP APR (%) Aerodrome Base----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------withaero_price as (selectdate_trunc('day', timestamp) as day,pricefrom prices.daywhere contract_address = 0x940181a94a35a4569e4529a3cdfb74e38fd98631 -- AEROand blockchain = 'base'),tvl as (withtoken_supply as (selectdate_trunc('day', evt_block_time) as time,avg(reserve0 / 1e18) as bold_supply,avg(reserve1 / 1e6) as usdc_supplyfromaerodrome_base.Pool_evt_Syncwherecontract_address = 0xffdf1e3160b60c2e499fa25e51b5c192b9b15e3b -- BD/USDC sAMM PoolGROUP by1order by1 desc)selecttime,bold_supply * p1.price + usdc_supply * p2.price as tvlfromtoken_supply sjoin prices.day p1 on p1.timestamp = s.timejoin prices.day p2 on p2.timestamp = s.timewherep1.blockchain = 'base'and p1.contract_address = 0x252d36f435582ecb01686448d21e8c9ea0b2ca65 -- BOLDand p2.blockchain = 'base'and p2.contract_address = 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913 -- USDC),emissions AS (with-------------------- AERO emissionsemissions AS (SELECTdate_diff('week',timestamp '2026-01-01 00:00',DATE_TRUNC('week',emission.call_block_time - INTERVAL '3' day) + INTERVAL '10' day) AS "epoch",gauge._pool as pool_contract,SUM(emission._amount) / 1e18 AS emission,date_trunc('day', MAX(emission.call_block_time)) AS block_timeFROMaerodrome_base.GaugeFactory_call_createGauge gaugeLEFT JOIN aerodrome_base.Gauge_call_notifyRewardAmount emission ON gauge.output_gauge = emission.contract_address