You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all, read the comments of #44. Goal here is to abstract some complexity of the liquidity spell by leveraging macros and spells to enrich the pool balance changes (of any type i.e. Swap, Join, Exit, etc) with labels and pricing.
Ideally we would only have create a spell that outputs pool, token, delta (still TBD) and the macros will do all the work to transform into daily data, calculate or estimate USD liquidity, add pool symbols, etc.
The text was updated successfully, but these errors were encountered:
Considerations:
It has not been as easy as initially thought due to a few blockers:
The liquidity spell as-is takes pricing information a few CTEs before the last SELECT statement, in order to allow for the estimation of liquidity on weighted pools using pricing assets, which is more relevant in chains with less swap volume and, therefore, less pricing data on the dex.prices table (especially avax, gnosis and zkevm), and also protects us from wrong pricing feeds. Breaking this down in several macros would be a bit trickier, bus still doable. I am at the moment investigating how effective that would be.
With that peculiarity of the liquidity spell, it's not so easy to settle in a single spell-enhancing macro, as adjustments would have to be made to the protocol_fees and bpt_prices spells in order to allow this integration, which also makes me question the effectiveness of this.
My idea is to work on this until our standup tomorrow and bring a definitve perspective on whether we keep thing as they are, making minor adjustments, such as making the spells be incrementally refreshed or go on a full-on rebuild of them
First of all, read the comments of #44. Goal here is to abstract some complexity of the liquidity spell by leveraging macros and spells to enrich the pool balance changes (of any type i.e. Swap, Join, Exit, etc) with labels and pricing.
Ideally we would only have create a spell that outputs
pool
,token
,delta
(still TBD) and the macros will do all the work to transform into daily data, calculate or estimate USD liquidity, add pool symbols, etc.The text was updated successfully, but these errors were encountered: