-
Notifications
You must be signed in to change notification settings - Fork 452
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
copy fix: arbitrum network cost estimate #466
Conversation
@Uniswap/routing @gzeoneth I did some additional local CLI testing to see the improvements:
I think we should ship this PR, and have couple more fixes as follow-up items (Although some fixes require deeper thinking):
|
The big difference between the gas estimate with/wout simulation is due to the SOR
The difference between pre/post fix with simulation is that SOR is picking another route, due to to previously wrong math inflated the USD amount that led to a suboptimal route being picked. |
re follow-up items:
Obviously those change are probably not production ready. I also found it quite confusing to adapt to SOR's L2 gas assumption without creating api breaking changes. Also noticed:
That said, with these 2 commit I am getting a pretty close estimate in terms of gas and USD
https://www.tdly.co/shared/simulation/c236561e-1bbc-40b4-987f-f436ca6b642e But agree, we can ship this PR first and fix the rest later. This PR already reduced a magnitude of the error of USD fee estimate. |
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.
lets give it a go ✅
What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
This PR fixes 2 bugs that causes inflated network cost (gas fee) estimate for Arbitrum.
What is the current behavior? (You can also link to an open issue here)
Smart Order Router is inflating the Arbitrum fee due to double counting L1 fee and a incorrect unit conversion
What is the new behavior (if this is a feature change)?
Other information:
See discussions in fix: arbitrum network cost estimate #464 for original PR. This PR is created because it runs within https://github.com/Uniswap/smart-order-router, which contains all the repo secrets to successfully run all the tests.