Skip to content

Both Amount0In and Amount0Out Present in Logs #184

@azaidelson

Description

@azaidelson

In a lot of cases (over 6 million since inception), the UniswapV2Pair swap event is emitted with both Amount0In and Amount0Out greater than zero.

Examples:

  1. https://etherscan.io/tx/0xb91c8441ab08cd612225b4ded46054ce0a48f1e07347995ef22a4cc552c18895, log_index 69
  2. https://etherscan.io/tx/0x39b259e1ece6da2d865003875ff841cba963836458fac1bb253bb2365bcd6767, log_index 148

What does the amount0In log mean in this case?
In addition, there is sometimes a mismatch between the AmounOut in the log, and the amount of token that is transferred to the next step in the route. In example 2, the amount transferred is 8755596609890 (log_index 146), while the amount_out is 9216417484093 (log_index 148).

Is there a bug in the logging mechanism?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions