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

bug: Wrong user's total surplus #2756

Open
squadgazzz opened this issue May 25, 2024 · 3 comments
Open

bug: Wrong user's total surplus #2756

squadgazzz opened this issue May 25, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@squadgazzz
Copy link
Contributor

squadgazzz commented May 25, 2024

Problem

Total surplus for the 0xd16F39990092033EE2faB400Bf3364379c616c4E user is wrong on mainnet prod.
DB query returns 589477720296680500000.
More specifically, the total surplus for order 7cd8a08e is 589 ETH, which is not true.
The issue is in the SQL query since 1e18 denominator is used, while NEAR token has 1e24.

Impact

The wrong value is shown on the UI for all users that have a trade with NEAR token(or any other with a denominator different from 1e18).
image

To reproduce

Make an order with NEAR token.

Expected behavior

A correct value is returned.

Version / commit hash: v2.259.0
Environment: mainnet-prod

@squadgazzz squadgazzz added the bug Something isn't working label May 25, 2024
Copy link

This issue has been marked as stale because it has been inactive a while. Please update this issue or it will be automatically closed.

Copy link

This issue has been marked as stale because it has been inactive a while. Please update this issue or it will be automatically closed.

Copy link

This issue has been marked as stale because it has been inactive a while. Please update this issue or it will be automatically closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant