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

Manual fix for prod mainnet auction 10052057 #499

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

harisang
Copy link
Contributor

This PR manually corrects the native price of https://etherscan.io/address/0x06b964d96f5dcf7eae9d7c559b09edce244d4b8e

for prod mainnet auction 10052057, which causes the protocol fee calculations to explode.

@fhenneke
Copy link
Collaborator

Looks reasonable.

I checked that the old price was off ( 5464.85 ETH/USUALX), and that the corrected price (0.00021201 ETH/USUALX) is close to the price coingecko gives around that time (0.00020844 ETH/USUALX).

Did you use the price of some later auction?

@harisang
Copy link
Contributor Author

Looks reasonable.

I checked that the old price was off ( 5464.85 ETH/USUALX), and that the corrected price (0.00021201 ETH/USUALX) is close to the price coingecko gives around that time (0.00020844 ETH/USUALX).

Did you use the price of some later auction?

So i checked the logs and i used the first "correct price" that we saw after the issue appeared

image

Copy link
Contributor

@bram-vdberg bram-vdberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to the auction: https://api.cow.fi/mainnet/api/v1/solver_competition/10052057

Weth native price:
0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2 "1000000000000000000"
Usualx native price:
0x06b964d96f5dcf7eae9d7c559b09edce244d4b8e "5464852255471281635328"

Price of usualx in weth = usualx price / weth price = 5464.85 weth per usualx (or $18,427,474 with a price of $3,372 per ETH at the time)

Corrected price of 212011986287238:
212011986287238 / 1000000000000000000 = 0.000212 weth per usualx (or $0.714) with a price of $3,372 for ETH). This is pretty close to the price that coingecko reports for the time of the auction ($0.696-$0.692).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants