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

Add list of batches excluded from slippage computation (due to R depeg) #325

Closed
wants to merge 4 commits into from

Conversation

fhenneke
Copy link
Collaborator

This adds some transaction hashes to the table of batches excluded from slippage computation.
This is done in the Dune query and not in the python code since all computations related to slippage happen on Dune.

Alternative approaches:

  • Use different prices for the conversion to ETH, e.g., prices at the time of rewards payment.
  • Implement filtering as post-processing in python.

Since we plan to overhaul the slippage computation, we went for the hacky solution.

This adds some transaction hashes to a table of excluded batches.
This is done in the Dune query and not in the python code since all
computations related to slippage happen on Dune.
@fhenneke fhenneke requested a review from harisang November 13, 2023 15:34
@harisang
Copy link
Contributor

Can you also do a dry run with this fix so that we are sure it works?

queries/dune_v2/period_slippage.sql Outdated Show resolved Hide resolved
@fhenneke
Copy link
Collaborator Author

Dry run works as expected. ETH transfers from the script are identical to numbers on done dashboard.

@harisang
Copy link
Contributor

harisang commented Nov 13, 2023

This PR just got merged: duneanalytics/spellbook#4776

So I am wondering whether we should remove hashes:

  • 0x4b8b031baebd7c13652f51ab33feaec078093c992edcb23c3e9f531fa9310131
  • 0xaa037b87eba06781f0699b6c021fa84d67a197502d3141c00c9e274055899118

as they are disjoint from the R stable coin depeg.

@fhenneke
Copy link
Collaborator Author

So I am wondering whether we should remove hashes:
0x4b8b031baebd7c13652f51ab33feaec078093c992edcb23c3e9f531fa9310131
0xaa037b87eba06781f0699b6c021fa84d67a197502d3141c00c9e274055899118
as they are disjoint from the R stable coin depeg.

We should exclude as few auctions as possible. If those settlements are not related to the depeg, they should be removed in my opinion.

this was not directly related to the value of R but was just a bad
suboptimal execution on its own right
@fhenneke fhenneke closed this Nov 14, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Nov 14, 2023
@fhenneke
Copy link
Collaborator Author

We did not go for excluding the batches after all. The depeg reasonably falls under inventory risk. The reimburement for the suboptimal settlement by Quasilabs is handled by the solver and not by the protocol.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants