gateway icon indicating copy to clipboard operation
gateway copied to clipboard

`/amm/price` returns prices for non-existent pools on Sushiswap Goerli

Open fengtality opened this issue 2 years ago • 0 comments

Describe the bug

  • Call /amm/price for WETH-DAI on Sushiswap Goerli:
{
    "network": "goerli",
    "timestamp": 1678831599966,
    "latency": 0.482,
    "base": "0xB4FBF271143F4FBf7B91A5ded31805e42b2208d6",
    "quote": "0xdc31Ee1784292379Fbb2964b3B9C4124D8F89C60",
    "amount": "0.010000000000000000",
    "rawAmount": "10000000000000000",
    "expectedAmount": "1196132100000",
    "price": "117267850000000",
    "gasPrice": 33,
    "gasPriceToken": "ETH",
    "gasLimit": 3000000,
    "gasCost": "0.004972704000000000"
}

It returns a result, but a call to /amm/trade fails: https://goerli.etherscan.io/tx/0x077d5c96cbf1b1c9b8a8d96e89ec7bd85baeb19a983ed29ae5f7190e09fd3995

There doesn't appear to be a pool for this pair: Screen Shot 2023-03-14 at 3 16 30 PM

Expected result

  • Calling /amm/price should result in an error with "No trade found" message
  • Hummingbot client's amm-arb strategy should be able to handle this type of error

fengtality avatar Mar 14 '23 22:03 fengtality