Skip to content
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

Quote requests for WETH/USDC token pair are sent when WETH/ETH token pair is selected #743

Closed
elena-zh opened this issue Jun 24, 2022 · 5 comments
Assignees
Labels
app:CowSwap CowSwap app Bug Something isn't working Low Severity indicator for defects. It won't cause any major break-down of the system

Comments

@elena-zh
Copy link
Contributor

  1. Open the app
  2. Select WETH/ETH token pair
  3. Open Console-Ntwork tab
  4. Filter by 'quote'
  5. Check requests

AR: Quote requests for WETH/USDC token pair are sent in the bg when WETH/ETH token pair is selected
bg quotes.jpg
ER: no requests

@elena-zh elena-zh added app:CowSwap CowSwap app Bug Something isn't working Low Severity indicator for defects. It won't cause any major break-down of the system labels Jun 24, 2022
@W3stside
Copy link
Contributor

Why do you expect no results? The usdc WETH request is the fall back USD price request

@elena-zh
Copy link
Contributor Author

Seems a bit illogical from my perspective:

  1. We do not sell ETH, we wrap it.
  2. Request shows WETH as a sell token
  3. Request shows USDC as buy token, but it is not in the To field
  4. If we request USD price for WETH, why don't we show it on UI?
  5. If we connect to a wallet, why don't we send all these requests when ETH/WETH pair is selected?
    image
  6. Looks like here Don't call fee/price endpoint on Wrapping (ETH/WETH || XDAI/WXDAI etc) gnosis/cowswap#1920 we implemented a logic not to send requests for ETH/WETH pair.

@W3stside
Copy link
Contributor

The usdc in the quote is how the fallback API works:

  1. Try coingecko for WETH / USD price
  2. Try CoW API for WETH / USDC buy order of amount 100 USDC (100000000 in atoms) and calculate a per unit price

You're seeing the quote for #2 in the networks tab.

Regarding the point of not showing the USD price at all for wrapping I am in agreement mostly, it doesn't really make sense to show it when wrapping

@anxolin @alfetopito @fairlighteth @nenadV91 wdyt

@alfetopito
Copy link
Collaborator

Valid point. I agree on not showing/querying USD amounts for (un)wrapping

@elena-zh
Copy link
Contributor Author

elena-zh commented Sep 1, 2022

No longer relevant in v.1.21

@elena-zh elena-zh closed this as completed Sep 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
app:CowSwap CowSwap app Bug Something isn't working Low Severity indicator for defects. It won't cause any major break-down of the system
Projects
None yet
Development

No branches or pull requests

3 participants