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] Incorrect data in 'token_bought_amount' column in 'dex_solana.trades' table #7137

Open
0xpurif opened this issue Nov 12, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@0xpurif
Copy link

0xpurif commented Nov 12, 2024

Description

The reported amount is wrong for trades done through the 'phoenix' dex in the dex_solana.trades table.

Current behavior

Using this query as example, I have filtered SOL-WIF trades happening through phoenix, on a given day where I noticed discrepancies https://dune.com/queries/4276304 . Taking this transaction as example y7yZTszPRef9VLk3ggx3d2JdjFv8UJQP4FVgf4diYtHJVuWMEhfKbLmZg8FYnxG9cVBqjddDMULPBeS5SZ1TjHh, we can see on solscan that the amount of WIF bought is 1353.211, however for the same tx_id, the query returns that the amount bought is 1.353211

image

Expected behavior

Using same example as above, token_amount_bought should return 1353.211 for that tx_id. Many other txs return erroneous amounts.

Impacted model(s)

Unsure how many rows exactly, but likely a lot, for the WIF-SOL pair alone this seems be almost 1M rows affected

dex_solana.trades

Possible solution

This is most likely a decimal issue as the amounts are corrects but decimals are shifted by 3 to the left

@0xpurif 0xpurif added the bug Something isn't working label Nov 12, 2024
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