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

Solver dashboard #64

Merged
merged 22 commits into from
Nov 27, 2024
Merged

Solver dashboard #64

merged 22 commits into from
Nov 27, 2024

Conversation

PoloX2021
Copy link
Contributor

Adds all the queries from 2 dune solver dashboards:

Solver Info
Competition Monitoring

The first dashboards has the following 10 queries. The first 5 have been updated and adapted to fit every chain. "Solver_rewards_total" has yet to be revised but that is more complex and being tackled. The 4 last ones are not relevant for now, awaiting the new tables on dune (batch and trades) for other chains.

active_solvers
batch_settlement_info
daily_solver_stats
ranked_active_solvers
solver_failure_rates_by_env
solver_rewards_total: yet to be revised
cost_coverage_by_solver_environment: no longer useful as there are no more fees
cost_coverage_production_solver: no longer useful as there are no more fees
cow_rewards_total: up to date, ready to be extended to other chains
solver_yields: not useful

The second has the 2 following. No modification from the dashboard were added.

number_capped_reward_batches
protocol_weekly_rewards

There is an issue with sqlfluff for linting, as it does not process correcty the parameters from dune sql

@PoloX2021 PoloX2021 requested a review from harisang November 12, 2024 07:26
@harisang
Copy link
Contributor

@PoloX2021 Could you add a brief description/documentation at the very beginning of each query?

@harisang
Copy link
Contributor

@PoloX2021 Regarding the queries that are not useful anymore. I would suggest we either delete them right away, but removing the sql code and adding a comment at the top saying "NOT RELEVANT ANYMORE" or something like that, or open an issue right away to delete them in a follow-up PR

@@ -0,0 +1,33 @@
-- This query finds the number of transactions where the rewards reached the upper bound
Copy link
Contributor

Choose a reason for hiding this comment

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

This looks like more of an internal monitoring/special-purpose stat. Where is this query referenced?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, you are indeed correct.
I'll create a separate subfolder for internal monitoring.

sum(consistency_reward) as consistency_reward,
sum(quote_reward) as quote_reward,
sum(performance_reward + consistency_reward + coalesce(quote_reward, 0)) as total_reward
from query_3641173
Copy link
Contributor

Choose a reason for hiding this comment

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

Same comment as above. If the query you reference is not part of this repo, please add it as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Same issue, same answer. I'll add the query

@harisang
Copy link
Contributor

@PoloX2021 Very nice work! Added a few more comments but overall looks very good!

@harisang harisang mentioned this pull request Nov 19, 2024
@harisang
Copy link
Contributor

harisang commented Nov 26, 2024

@PoloX2021 Did some minor edits and fixes. Could you fix the remaining issues so that we merge this?

Copy link
Contributor

@harisang harisang left a comment

Choose a reason for hiding this comment

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

Things look good! Approving so that we can proceed with merging. Once merged, i will share internally so that we get a few more eyes on the queries and if there are any issues, we can always follow up with a new PR

@PoloX2021 PoloX2021 merged commit 5046f91 into main Nov 27, 2024
1 check passed
@PoloX2021 PoloX2021 deleted the solver-dashboard branch November 27, 2024 13:04
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.

2 participants