v2-subgraph icon indicating copy to clipboard operation
v2-subgraph copied to clipboard

amountUSD for certain swaps are ridiculous

Open tamebadger opened this issue 2 years ago • 1 comments

When querying via this link.

The result is:

{
  "data": {
    "swaps": [
      {
        "id": "0x0b2972ad9a8d80b410c44019535ecc91329005a7b6c0bd74ae55bc119717d979-0",
        "timestamp": "1660741237",
        "pair": {
          "id": "0x689d2ee154633ae19d61a8570c09248dcbd0ed04",
          "token0": {
            "id": "0x505b5eda5e25a67e1c24a2bf1a527ed9eb88bf04"
          },
          "token1": {
            "id": "0xdac17f958d2ee523a2206206994597c13d831ec7"
          }
        },
        "sender": "0x7a250d5630b4cf539739df2c5dacb4c659f2488d",
        "amount0In": "150899.178999483031617536",
        "amount1In": "0",
        "amount0Out": "0",
        "amount1Out": "3426.432067",
        "to": "0xbf5ae133b9a0fc1a07952a7df2afa21f7f69ef58",
        "amountUSD": "2085043285.885802128737796776632585"
      }
    ]
  }
}

And here is the corresponding transaction on etherscan.

So the expected amountUSD would be around 3,426.432067 but is now 2085043285.885802128737796776632585

Is this a problem that is known or something new that started happening recently?

tamebadger avatar Aug 17 '22 23:08 tamebadger

How did you compile and deploy this subgraph?

Right now, I updated the apiVersion to 0.0.6 in subgraph.yaml file and the typescript code is generated using graph codegen command. But when I try to compile the subgraph, it gives much more errors.

Can you help me out here?

vraj-pedalsup avatar Apr 10 '23 06:04 vraj-pedalsup