-
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
Solver Dashboard #56
Solver Dashboard #56
Conversation
- Frequence to choose the agregation frequence - LastNDays to choose the time period over which to compute the metric
…le coswap.raw_batch_rewards into each specific column
… settlement, instead of alphabetical order
…t number of decimals
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.
Nice initiative! Should we remove the queries that are no longer useful to make sure we don't display any useless or outdated data in that dashboard?
I think that the no longer used queries should disappear at some point. However, the cost_coverage might change to a new metric (still in debate) and the rewards need modifications. |
Sorry for mixing up cow amm dashboard and solver dashboard in the same query, still figuring out the best practice for github. Will separate different prs in the future. |
I think it's still fairly easy to split this PR (by simply removing the solver dashboard folder and creating a new PR from those files). I feel somewhat confident commenting on the AMM parts (still a few comments seem unaddressed), but less sure about which parts of the solver dashboard we want to keep or if we just want to "dump" all queries under version control without improving them for now. |
Sorry for being so late here. I am starting to review the part for the solver dashboard. Let us know if you can actually split this PR already, so that i wait and add my comments in the new PR |
-- First we find the firest settlement for each solver | ||
-- Then we fet the environment and name of the solver for the prod and barn environments | ||
-- Finally we display the name of the solver with both of its addresses | ||
-- Note: if a solver has x barn address and y prod address, we will display x*y rows for that solver |
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. We might need to rethink that, although the goal is to have at most one address per solver per environment, or drop the distinction between prod and barn (for solvers) altogether.
I think i am fine with this, for now, although already today Barter has multiple and unnecessary entries because of that colocated and non-colocated addresses being whitelisted at the same time
https://dune.com/queries/1372857
-- Parameters | ||
-- {{blockchain}} - blockchain name | ||
|
||
WITH |
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.
WITH | |
with |
when '{{blockchain}}'='arbitrum' then | ||
CONCAT('<a href="https://arbiscan.io/tx/', cast(tx_hash as varchar), '" target="_blank">', cast(tx_hash as varchar), '</a>') | ||
end as txHash, | ||
gas_price / pow(10, 9) as gas_price, |
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.
Checked the current version of the query on Dune (not sure if it is identical to this PR though) and gas price looks like it's a integer-> https://dune.com/queries/1373033
so some fixing is probably needed here
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 comes from the way it is being displayed.
In the data it is represented as the value of Gwei for one unit of gas which is not an integer. But then, the table has been rounded to the closest integer, in the display parametets.
token_approvals | ||
--case when tx_cost_usd > 0 then fee_value / tx_cost_usd else null end as coverage | ||
FROM cow_protocol_{{blockchain}}.batches b | ||
JOIN num_tokens_traded |
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.
JOIN num_tokens_traded | |
join num_tokens_traded |
Closing as the new PR #64 is meant to replace this one. |
Adds all the queries from 2 dune solver dashboards:
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 no longer relevant.
The second has the 5 following. No modification from the dashboard were added.