franco-bianco / solanaswap-go

31 stars 2 forks source link

Jupiter swap wrong parsing #6

Closed ix-56h closed 1 month ago

ix-56h commented 1 month ago

Hello !

I've found this swap TX which return weird results : 2D2XT57pgKVymT4rrnqMwjYFzLjZn7NznVSkcMAwy5APAdx5upePDAzyYt5XeAontDkbfHrZ3PUPoNmi5WxJVoVd

image

The parsed data :

{
  "Signers": [
    "gHBMjLUykPo8ZKrxkd5mRQ17KqRnUM1zkyfHNuZL28i"
  ],
  "Signatures": [
    "2D2XT57pgKVymT4rrnqMwjYFzLjZn7NznVSkcMAwy5APAdx5upePDAzyYt5XeAontDkbfHrZ3PUPoNmi5WxJVoVd"
  ],
  "AMMs": [
    "Jupiter",
    "Jupiter"
  ],
  "Timestamp": "0001-01-01T00:00:00Z",
  "TokenInMint": "HVVGqPvnqEPgZGtCeuwc6iiJHVBywSbYj8xhZpWcpump",
  "TokenInAmount": 5802465560343,
  "TokenInDecimals": 6,
  "TokenOutMint": "An5dz1sZig67QMWh6ybY7EBxExvyoZLNtKaKGzbgkXpa",
  "TokenOutAmount": 8166655326420,
  "TokenOutDecimals": 6
}

Well, since we have 2 swaps, a SPL_A to SOL then a SOL to SPL_B, the parser return the SPL_A amount as amount_in and the SPL_B as amount_out.

ix-56h commented 1 month ago

This is not a real issue, my bad. everything's good, maybe the amount_out have a diff of 2, but that's it.