-
Notifications
You must be signed in to change notification settings - Fork 26
Bug: Raydium Parser Swaps TokenIn and TokenOut for Pump.fun Migrated Tokens #6
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
Comments
This has already been fixed in the latest version of the package. Kindly confirm that the version you're currently using is the latest one. |
Thanks for the quick response! I appreciate you letting me know that this should be fixed in the latest version. I'm fairly confident I'm using the most recent version of the package, as I just updated it recently. To be absolutely sure, could you possibly test the two transaction signatures I provided in the issue description using your latest version? Signature 1 (Pump.fun migrated token): 48Sysuy1xSfiUhuH7Ktj4yri2RCoPuDyCWXbgKZqACTXE5oPVUP1C2MLtEeM2icbQrp9z4Q3gDPXWSEPx6BHRv8w Signature 2 (Directly deployed Raydium token): 5QAijtNpbKBemWzGefaqcwRjRFuSazkCCa4gRxh6DW8E1bqBDoeK2aDtE7QRMV1ddXv61uTagtp7AgkfZihyxoFF If you run these through the parser on your end, it would help confirm whether the issue is indeed resolved in the latest release, or if perhaps there's still something lingering, specifically with these migrated tokens. Thanks again for your time and help! |
Figured the issue |
Great! Thanks for looking into this so quickly. I've updated to version 0.1.5, and it does indeed seem like the token swap issue is resolved for the migrated Pump.fun tokens. That's excellent news. (Just a small note: I didn't initially see version 0.1.5 listed in the "Releases" section on GitHub, so it wasn't immediately obvious that a new version was available. Perhaps updating the releases page might be helpful for other users in the future.) However, while testing with version 0.1.5 and the same transaction signature (48Sysuy1xSfiUhuH7Ktj4yri2RCoPuDyCWXbgKZqACTXE5oPVUP1C2MLtEeM2icbQrp9z4Q3gDPXWSEPx6BHRv8w), I've noticed another discrepancy. According to Solscan (https://solscan.io/tx/48Sysuy1xSfiUhuH7Ktj4yri2RCoPuDyCWXbgKZqACTXE5oPVUP1C2MLtEeM2icbQrp9z4Q3gDPXWSEPx6BHRv8w), the actual user/signer of this transaction is 2mz4ydwRMeQFRLuPdQapVsDRp4hJri8bbx12de9HJCrG. However, the parsed output from version 0.1.5 still identifies a different user: AA95dMp7ZmqV2KM7x4q1hXiaTtwaboNyz2ZhJNd12g42. Here's the parsed output again for reference:
It seems the user field is still not being parsed correctly for this transaction. The expected user should be 2mz4ydwRMeQFRLuPdQapVsDRp4hJri8bbx12de9HJCrG. |
Cool 👌
The parser's Also, if you check Solscan, you'd see that there are two signers; |
I've identified a potential bug in the Raydium transaction parser within this library. It appears that for transactions involving tokens that have migrated from Pump.fun to Raydium, the parser incorrectly swaps the tokenIn and tokenOut fields in the parsed output.
This issue is not observed with tokens that were originally deployed directly on Raydium.
To demonstrate this problem, I've provided two example "buy" transactions (WSOL being exchanged for another token):
Example 1: Transaction with a Pump.fun Migrated Token
Signature: 48Sysuy1xSfiUhuH7Ktj4yri2RCoPuDyCWXbgKZqACTXE5oPVUP1C2MLtEeM2icbQrp9z4Q3gDPXWSEPx6BHRv8w
Parsed Output:
Problem: In this case, the expected behavior is that tokenIn should represent WSOL (SOL being spent) and tokenOut should be the migrated Pump.fun token (token being received). However, the parser output incorrectly reverses these. The tokenIn is identified as hTRDn7zE5tDHRnjj6Qms2WG1zEGv9ii6AiwfgbFpump (the migrated token) and tokenOut as So11111111111111111111111111111111111111112 (WSOL).
Example 2: Transaction with a Token Deployed Directly on Raydium
Signature: 5QAijtNpbKBemWzGefaqcwRjRFuSazkCCa4gRxh6DW8E1bqBDoeK2aDtE7QRMV1ddXv61uTagtp7AgkfZihyxoFF
Parsed Output:
Observation: The parsing in this example appears to be correct, with tokenIn being WSOL and tokenOut being the other token (EkDsamMWbbEFPu7oV19SGo7ZUETDSGy56MK21MkNN4S5).
Impact: This incorrect parsing leads to a misrepresentation of the actual tokens being traded in transactions involving Pump.fun migrated tokens, which can affect applications relying on accurate Raydium transaction data.
Could you please investigate this issue? Thank you for your time and attention to this matter.
Sincerely,
The text was updated successfully, but these errors were encountered: