-
Notifications
You must be signed in to change notification settings - Fork 177
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
Unable to bridge or swap FOX on Optimism even though both LiFi and 0x support in their UI #5096
Comments
This is the offender:
I think we should be able to safely assume FOX price for all bridged versions here, though it definitely feels hacky, as this may happen with other bridged assets we don't have market data for |
@gomesalexandre So like 1 FOX = 1 FOX? sounds like slippage errors and other issues to me. We can keep digging. |
More like we don't have market data for the Optimism flavor of bridged FOX and bail out @twblack88 , instead of using the mainnet market data for it. |
Makes sense to me as long as we're just using it to display a fiat value and the assets are mapped to eachother. Does this explain for both LiFi and 0x @gomesalexandre? William mentioned another potential issue in discord: "The API will return an error of insufficient liquidity due to the price impact being higher than the defined limit. The threshold is easily customizable by setting PriceImpactProtectionPercentage anywhere from 0-1, so we encourage every Swap API user to customize this parameter based on their needs and tolerance. https://0x.org/docs/0x-swap-api/advanced-topics/price-impact-protection" -- If this is also an issue, I think we should be able to set to 1 because we have solid price impact handling in the UI (and may to give ShapeShift API customers their own ability to set this between 0-1) |
Correct @willyogo this is the same issue for ZRX, see |
Thanks for reporting this @sktbrd. Unfortunately, we don't have market data for BRZ, thus are unable to show a quote as we don't have USD rate for it. |
@gomesalexandre I'm not sure why we don't have a fiat price for BRZ; it's in coingecko's tokenlist and has a price on coingecko. Regardless, can you help me understand why we need a fiat price in order to show a quote? I'd expect we could display/return quotes for any assets that 0x can. in the past we've been able to support DEX trading for assets with no fiat value as long as we could get a quote from a provider. |
Nice catch @willyogo, this would be the explanation Authored #5123 which regenerated asset data, including the updated contract for BRZ. WRT the second point, we do need a USD rate in order to allow user input in fiat, as we are getting quotes as well as to show fiat rates in swapper. Theoretically, we could remove the safeguards against having USD rates for both buy and sell assets, though that's probably more of a product concern here |
thanks @gomesalexandre 🙏 good q for @shapeshift/product on whether we can remove the USD rate safe guard for buy and sell assets. my gut says we could just show either no fiat value or $0.00 and disable inputting a fiat amount. it looks like this will be limited to edge cases though, so may not be worth the squeeze until we support inputting custom tokens via contract address |
Overview
LiFi's UI and API supports bridging FOX on mainnet to FOX on optimism via a single hop, and 0x's UI (and I assume API) supports swapping FOX/wstETH on Optimism. However, when you try the same pairs in ShapeShift, the app says no rate available.
Ideally we can fix this for both FOX as well as any other pairs that our partners support but we don't (both in the API and interface). At the very least, we should understand why it works in their UI and API but not on ShapeShift.
This is a blocker for launching FOX/wstETH liquidity mining on Optimism, which we've been granted 20k OP for that we're working to get matched by Lido.
References and additional details
Steps to reproduce on LiFi:
Steps to reproduce on 0x:
Acceptance Criteria
AC:
Ideal: Enable users to swap and single-hop-bridge the same pairs in ShapeShift that they can on 0x and LiFi (at least for tokens that shapeshift supports)
At least: Determine why some pairs such as FOX are supported in 0x and LiFi but not in ShapeShift, and create a separate issue with the details
Need By Date
No response
Screenshots/Mockups
No response
Estimated effort
No response
The text was updated successfully, but these errors were encountered: