-
Notifications
You must be signed in to change notification settings - Fork 373
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
Swap route via WETH #205
Comments
By default. You can specify the |
I don't think you can do that using this library. |
I've checked this. Well, it is possible for get_price methods, but make_swap methods don't have such an option actually, which is surprising. However, it is relatively easy to add it. |
When I come to think about it, the default should be [t0,t1] (and a boolean for going through [t0,weth,t1] route) and in case such pair doesn't exist an exception thrown suggesting to set the boolean parameter to true. Because incurring double fee breaks the principle of least surprise. |
@liquid-8 Yeah, I might look into that.
@romanbsd The issue is that [t0, t1] is often a much less liquid pair than [t0, weth, t1], so chances are high that such a trade might have significant price impact and therefore a bad execution price. Swaps are actually made using [t0, t1] right now though (no multi-hop swaps yet), so yeah...
I agree, but in this case ensuring that the pair assumed has liquidity takes precedence imo (I'd be more surprised if I made a terrible trade, as in #198, then if I incurred an additional 0.3% fee). |
Insufficient liquidity is caveat emptor. But maybe some safeguard is needed indeed... |
Hey all, so i've been running into this issue because sometimes my clients have LP as [t0, stablecoin] instead of [t0, bnb/eth/base_token], and not being able to customize Should we add an optional param |
The make_trade (as well as get price methods) have a route of [token1, WETH, token2]
https://github.com/uniswap-python/uniswap-python/blob/master/uniswap/uniswap.py#L686
Does it mean that the swaps incur 0.6% fee?
The text was updated successfully, but these errors were encountered: