- Notifications
You must be signed in to change notification settings - Fork386
Disparity in prices between uniswap and wrapper#182
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
Been testing a few coins to get a sense of the accuracy of the wrapper. I've noticed a difference across a few coins and am curious for others to give it a test. On average I'm seeing a 0%<x<0.5% delta. Here's my code, please do comment if I've implemented it poorly or give it a test.
EDIT: I wonder if it's a gas fee? Can we calculate this/extract this value? EDIT 2: Looking at another issue I've seen this as a possible solution, could someone explain the exponent work (10** etc) and where these values are obtained from?
Thoughts@ErikBjare? |
BetaWas this translation helpful?Give feedback.
All reactions
Replies: 3 comments
-
You may not be getting the best route from the pair by default. Try specifying
You can get the current gas price from the Note that neither this wrapper nor the Uniswap interface takes gas costs into account when quoted.
The decimals are retrieved from the ERC20 contracts, they are needed to scale the traded amount into their base (non-decimal) unit ( |
BetaWas this translation helpful?Give feedback.
All reactions
-
Thanks for getting back to me. Comparing with uniswap v3, with multihops disabled, so we're looking at TOKEN->TOKEN directly there's still this discrepancy. Does uniswap do anything off chain perhaps or could the infrua node be lagging in some capacity? |
BetaWas this translation helpful?Give feedback.
All reactions
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
Yes. Just set up the local node; you can use light-mode for syncing so it requires like 700Mb of the disc space. |
BetaWas this translation helpful?Give feedback.
All reactions
This discussion was converted from issue #152 on October 19, 2021 10:13.