-
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
Extend cost coverage query to all networks #105
Conversation
a375f34
to
0ce09c0
Compare
(select fees from fees_eth) as fees_eth, | ||
(select latest_withdrawal_time from fees_eth) as last_withdrawal, | ||
(select protocol_fee_in_eth from protocol_fees_collected) as protocol_fee_in_eth | ||
(select native_token from outgoing_native_token) + (select cow from outgoing_cow) * (select cow_price / native_token_price from conversion_prices) as total_outgoing_native_token, |
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.
This column seems to be null on arbitrum and base. Potentially an issue with conversion prices?
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.
Good point. Indeed, the COW price is missing from the prices.usd table for Arbitrum and Base.
Tbh, this is not used anywhere at the moment for the verification of the payouts, so we could still proceed as is.
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.
One option would be to do what we are doing in the rewards calculations, which is to only consider the dollar value of COW on ethereum.
dune-queries/cowprotocol/accounting/rewards/main_rewards_dashboard_query_2510345.sql
Line 57 in 6ee39f1
select avg(price) from prices.usd |
@fleupold Do you think we should include the CoW Swap UI fee in the protocol_fee amount this query reports? The change is quite simple so we could do that (note the CoW Swap UI fee shows up as a partner fee now) |
Probably not as it's strictly speaking not a protocol fee. I think it's fine to only show it in the partner fee section (where we also show the proceeds from the partner fee share). Let's document this though, as it can be easy to miss. |
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.
LGTM
This PR updates the cost coverage query that shows up in the main payouts dashboard.
Query has been updated and can be tested here: https://dune.com/queries/2601653?start_time_d83555=2024-12-31+00%3A00%3A00&end_time_d83555=2025-01-07+00%3A00%3A00
I still want to do some sanity checks about what exactly we are computing at the very end; in case you have any comments/feedback, let me know