I'm working through some example transactions and inspecting logs to get some data. Specifically how many tokens were gained as the result of a transaction. Looking at transactions on UniswapV3 and UniswapV2 I'm getting the result I expected and it matches the overview data of etherscan. However when I look at transactions from PancakeSwap or SushiSwap the "amount of tokens" as a result of the transaction is consistently off by 1000000000 (exactly 1 billion?).

Mostly I'm wondering what the cause of this is so I can account for it in the code I'm writing.

  • Can you show the transaction hash where it happened?
    – Ismael
    Commented Dec 2, 2021 at 16:04

1 Answer 1


Hard to say without a specific example, but my best guess is that you are looking at a token that does not have 18 decimals.

If you look at the amount in wei, then it will look off compared to the same token if it had 18 decimals.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.