Skip to content
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

Merged
merged 1 commit into from
Jan 14, 2025

Conversation

harisang
Copy link
Contributor

@harisang harisang commented Dec 30, 2024

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

@harisang harisang force-pushed the update_cost_coverage_query branch from a375f34 to 0ce09c0 Compare January 10, 2025 11:29
@harisang harisang marked this pull request as ready for review January 10, 2025 14:54
@harisang harisang requested review from fhenneke and fleupold January 10, 2025 14:56
(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,
Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Contributor Author

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.

@harisang
Copy link
Contributor Author

@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)

@fleupold
Copy link
Contributor

Do you think we should include the CoW Swap UI fee in the protocol_fee amount this query reports?

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.

Copy link
Contributor

@fhenneke fhenneke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@harisang harisang merged commit 8354bcc into main Jan 14, 2025
4 checks passed
@harisang harisang deleted the update_cost_coverage_query branch January 14, 2025 22:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants