op-analytics
op-analytics copied to clipboard
Implement sugar-sdk pool snapshot data pull
Implements the Sugar SDK puller that currently pulls snapshot data for the Base and OP chains.
We can try more Chain IDs as well: https://github.com/velodrome-finance/sugar-sdk?tab=readme-ov-file#configuration
We store the OP Chain chain IDs in the chain metadata file (however is best to pull that). Not all will have Velodrome implementations.
Also want to validate if we can pull things like votes, fees, etc before merging - since it's most valuable to have the full suite of metrics that you can pull from the UI (preferably at a token level for rewards and tvl).
Howdy. We've just added some more pool stats. This matches what velo/aerodrome display on liquidity screens. Do let us know what other stats you might need. And thank you for your patience since all this is very much WIP at the moment
sugar-sdk 0.0.2 now supports both sync and async mode for existing readonly APIs. we are going to make sure that we support both modes moving forward. See docs: https://github.com/velodrome-finance/sugar-sdk?tab=readme-ov-file#pools
this will break your current setup since async chains must be prefixed with Async* now (e.g. OPChain became AsyncOpChain, its sync version is now called OpChain)
sugar-sdk 0.0.2now supports both sync and async mode for existing readonly APIs. we are going to make sure that we support both modes moving forward. See docs: https://github.com/velodrome-finance/sugar-sdk?tab=readme-ov-file#poolsthis will break your current setup since async chains must be prefixed with Async* now (e.g. OPChain became AsyncOpChain, its sync version is now called OpChain)
Thank you for flagging @callmephilip , we will review the new docs and reimplement.
Priorities to pull by pool:
- TVL
- Breakdown by token if possible as well, but not ideal
- Trade Volume
- veVELO votes
- Rewards (Fees + Incentives)
- If this is by token, then this would be great to pull
- Also, ideally we segment out fees from trade volume, versus fees from incentives/bribes.
If this is a super light pull, we can try to run ~hourly.
Also, if this shows data for each weekly epoch, then we could build a view on top that gets the amount that happens in each hour (i.e. if there's $100 volume now, $90 last hour, then $10 happened in the period elapsed).