beethovenxfi / beethovenx-backend

MIT License
13 stars 15 forks source link

SOR: debug DAI to USDC trade on mainnet #589

Closed gmbronco closed 10 months ago

gmbronco commented 10 months ago
{
  sorGetSwaps(
    swapType: EXACT_IN
    tokenIn: "0x6b175474e89094c44da98b954eedeac495271d0f"
    tokenOut: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"
    swapAmount: "10"
    chain: MAINNET
    swapOptions: { maxPools: 5 }
  ) {
    returnAmount
  }
}

returns 0

gmbronco commented 10 months ago

GyroE pool was throwing when parsing fromRawPool - issue was Gyro pools were out of sync with their values. poolSyncAllPoolsFromSubgraph mutation fixed it.