-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[CoW AMM] Metric for daily invariant growth (surplus) per $100 #23
Conversation
), | ||
|
||
-- Computes the token balance changes of the relevant token per transaction | ||
reserves_delta as ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most of the query can be substitutes by calling the base query.
The base query also tries to take care of
- liquidity injections
- deposits and withdrawals
If it is actually this easy, the simplifications should be added to the base query as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Which base query do you mean exactly? I created #27 (but am not aware of an existing one)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I meant query 3968186, which is currently used for dashboards. It is not currently part of this repo.
65e465b
to
5c0690a
Compare
As an additional metric next to "growth of 10k" we want to compare the invariance growth of CoW AMMs with the ones from Uniswap.
For CoW AMM this is equal to surplus, for Uniswap it's equal to the swap fee amount (volume * 0,3%). Both are normalized over TVL in order to have a reasonable comparison.
This query adds the comparison for CoW AMM.
Test Plan
Comparing https://balancer.fi/pools/ethereum/cow/0xf08d4dea369c456d26a3168ff0024b904f2d8b91 with https://dune.com/queries/4059213 for a rough sanity check (values cannot match exactly because balancer uses a different price feed)