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

Revert "Merge pull request #7 from gnosis/gas-estimate-offset" #14

Merged
merged 1 commit into from
Apr 5, 2024

Conversation

MartinquaXD
Copy link
Contributor

In #7 solutions that were flagged as market orders also got a surplus fee computed if they have a signed fee of 0 which should theoretically be correct for regular orders.
However, for quote requests we build fake auctions that contain a single market order with a signed fee of 0. With that change the solver tried to compute a surplus fee for those orders as well. But computing a surplus fee requires a reference price to know how expensive a quote would be to execute (to know what fee would be fair). This reference price does not exist for native price requests (i.e. sell token to buy exactly 0.1 WETH).
So effectively the PR made dex solvers unusable as native price estimators. This was not caught because there is no test specifically for native price estimates.

Since this issues is blocking some other development reverting seems the most reasonable option for now. Making only the settlement overhead adjustable (without changing the surplus fee logic) can happen in a follow up PR.

This commit was created with git revert 1740937 -m 1 but had slight conflicts (mostly involving the removal of the score field).

This reverts commit 1740937, reversing
changes made to 6ae4fef.
@MartinquaXD MartinquaXD merged commit b261498 into main Apr 5, 2024
3 checks passed
@MartinquaXD MartinquaXD deleted the revert-simulations-for-market-orders branch April 5, 2024 09:26
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