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

fix(usd-estimation): no usd estimations for native #4352

Merged
merged 2 commits into from
May 28, 2024

Conversation

alfetopito
Copy link
Collaborator

Summary

Fixes #4347

  • No usd estimations on wrap/unwrap
  • Use wrapped token when querying usd estimation

To Test

  1. Pick native and wrapped native (and vice versa)
  • There should be no usd queries (coingecko/defillama)
  1. Pick native vs any other token
  • It should query the value of the wrapped token instead

@alfetopito alfetopito self-assigned this May 1, 2024
Copy link

vercel bot commented May 1, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
cosmos ✅ Ready (Inspect) Visit Preview May 28, 2024 0:09am
cowfi ✅ Ready (Inspect) Visit Preview May 28, 2024 0:09am
cowfi-new ✅ Ready (Inspect) Visit Preview May 28, 2024 0:09am
explorer-dev ✅ Ready (Inspect) Visit Preview May 28, 2024 0:09am
swap-dev ✅ Ready (Inspect) Visit Preview May 28, 2024 0:09am
widget-configurator ✅ Ready (Inspect) Visit Preview May 28, 2024 0:09am

@elena-zh
Copy link
Contributor

elena-zh commented May 2, 2024

Hey @alfetopito , everything looks good to me on Ethereum and GC, however, I still can see price requests on Sepolia.
image
Should we leave it as it is right now?

@alfetopito
Copy link
Collaborator Author

Hey @alfetopito , everything looks good to me on Ethereum and GC, however, I still can see price requests on Sepolia. image Should we leave it as it is right now?

Not a problem.

The quote requests on sepolia for native_token are querying https://sepolia.etherscan.io/address/0x0625aFB445C3B6B7B929342a04A22599fd5dBB59, which is the COW token.
Unrelated to the picked sell/buy tokens.

@elena-zh
Copy link
Contributor

elena-zh commented May 3, 2024

Hey @alfetopito , everything looks good to me on Ethereum and GC, however, I still can see price requests on Sepolia. image Should we leave it as it is right now?

Not a problem.

The quote requests on sepolia for native_token are querying https://sepolia.etherscan.io/address/0x0625aFB445C3B6B7B929342a04A22599fd5dBB59, which is the COW token. Unrelated to the picked sell/buy tokens.

Hey @alfetopito , what about quoting WETH token? See the video: https://www.loom.com/share/62c7cb27ca414efa811c0c629acecd6f

I've just stopped and cancelled my orders to make sure there is no need in requesting native_price for order orders.
Also, as you can see it on the video, native price request appears each time when ai swap a token pair.

@alfetopito alfetopito force-pushed the feat/4238_defillama branch from 5308823 to 76e3a9f Compare May 15, 2024 17:25
@alfetopito alfetopito force-pushed the feat/4238_defillama branch from 76e3a9f to 262801b Compare May 16, 2024 08:20
Base automatically changed from feat/4238_defillama to develop May 16, 2024 08:44
@alfetopito
Copy link
Collaborator Author

I need to update the branch and verify issues reported by Elena.
Won't merged until I have the capacity to work on it.

@alfetopito
Copy link
Collaborator Author

Hey @alfetopito , everything looks good to me on Ethereum and GC, however, I still can see price requests on Sepolia. image Should we leave it as it is right now?

Not a problem.
The quote requests on sepolia for native_token are querying https://sepolia.etherscan.io/address/0x0625aFB445C3B6B7B929342a04A22599fd5dBB59, which is the COW token. Unrelated to the picked sell/buy tokens.

Hey @alfetopito , what about quoting WETH token? See the video: https://www.loom.com/share/62c7cb27ca414efa811c0c629acecd6f

I've just stopped and cancelled my orders to make sure there is no need in requesting native_price for order orders. Also, as you can see it on the video, native price request appears each time when ai swap a token pair.

I was able to reproduce it on Sepolia.
However, not on any other chain.
I'll merge as it is right now, and try to fix it in an upcoming PR, although this is very low priority.

@alfetopito alfetopito merged commit e986ec4 into develop May 28, 2024
11 of 12 checks passed
@alfetopito alfetopito deleted the fix/4347_no-usd-estimations-for-native branch May 28, 2024 12:16
@github-actions github-actions bot locked and limited conversation to collaborators May 28, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Price queries for wrap/unwrap transactions
4 participants