Disparity in prices between uniswap and wrapper #182
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 ( |
Beta Was this translation helpful? Give feedback.
-
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? |
Beta Was this translation helpful? Give feedback.
-
Yes. Just set up the local node; you can use light-mode for syncing so it requires like 700Mb of the disc space. |
Beta Was this translation helpful? Give feedback.
-
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?
Beta Was this translation helpful? Give feedback.
All reactions