We've been using this query to populate the labels for gauges. This was needed because it's only possible to create the map between a gauge and its symbol with cross-chain queries -- thus not possible in Dune V1.
What we want is a query that maps every RootGauge with its respective label which is a string composed by <network>:<pool_label> -- first what we can do is simply map the gauge address to its pool address:
On Ethereum, you have to query GaugeCreated events from LiquidityGaugeFactory and CappedLiquidityGaugeFactory contracts. Just that already gives you gauge <> pool mapping.
on L2s it's slightly different since we have RootGauges contracts on Ethereum, but the Pool contracts live on the respective L2 blockchain. In this case, you will have to query, e.g. for Arbitrum, theArbitrumRootGaugeCreated events from ArbitrumRootGauge and CappedArbitrumRootGaugeFactory contracts. That gives you the gauge <> recipient mapping -- recipient is an address on L2 that you'll use to find the Pool that should receive incentives for that gauge, on it's also called streamer. Moving on, you have to query RewardsOnlyGaugeCreated events from ChildChainLiquidityGaugeFactory contract, there you have the streamer <> pool mapping, and then it's just a matter of joining everything and repeating for each L2.
If you want to learn more about veBAL and Gauges, take a look at this documentation.
@hedgehog-jacek I just added more information to this issue -- is it clear to you now? We can meet later, but I thought it would be good to have better instructions here anyway so we don't forget any details.
We've been using this query to populate the labels for gauges. This was needed because it's only possible to create the map between a gauge and its symbol with cross-chain queries -- thus not possible in Dune V1.
What we want is a query that maps every
RootGauge
with its respective label which is a string composed by<network>:<pool_label>
-- first what we can do is simply map the gauge address to its pool address:GaugeCreated
events fromLiquidityGaugeFactory
andCappedLiquidityGaugeFactory
contracts. Just that already gives you gauge <> pool mapping.RootGauges
contracts on Ethereum, but the Pool contracts live on the respective L2 blockchain. In this case, you will have to query, e.g. for Arbitrum, theArbitrumRootGaugeCreated
events fromArbitrumRootGauge
andCappedArbitrumRootGaugeFactory
contracts. That gives you the gauge <> recipient mapping -- recipient is an address on L2 that you'll use to find the Pool that should receive incentives for that gauge, on it's also called streamer. Moving on, you have to queryRewardsOnlyGaugeCreated
events fromChildChainLiquidityGaugeFactory
contract, there you have the streamer <> pool mapping, and then it's just a matter of joining everything and repeating for each L2.If you want to learn more about veBAL and Gauges, take a look at this documentation.