Skip to content
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

amountUSD for certain swaps are ridiculous #114

Open
tamebadger opened this issue Aug 17, 2022 · 1 comment
Open

amountUSD for certain swaps are ridiculous #114

tamebadger opened this issue Aug 17, 2022 · 1 comment

Comments

@tamebadger
Copy link

tamebadger commented Aug 17, 2022

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?

@vraj-pedalsup
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants