Uniswap / smart-order-router

GNU General Public License v3.0
413 stars 420 forks source link

wrong result #590

Open guotie opened 5 months ago

guotie commented 5 months ago

I use the following base cli which is in README.md:

./bin/cli quote --tokenIn 0xd9aAEc86B65D86f6A7B5B1b0c42FFA531710b6CA --tokenOut 0x4200000000000000000000000000000000000006 --amount 1000 --exactIn --minSplits 1 --protocols v3 --router alpha --chainId 8453 

and the output is:

Best Route:
[V3] 100.00% = USDbC -- 0.05% [0x4C36388bE6F416A29C8d8Eee81C771cE6bE14B18] --> WETH
        Raw Quote Exact In:
                0.25
        Gas Adjusted Quote In:
                0.25

Gas Used Quote Token: 0.000003
Gas Used USD: 0.014250
Calldata: undefined
Value: undefined

  blockNumber: "15040322"
  estimatedGasUsed: "128000"
  gasPriceWei: "28528120"
Total ticks crossed: 1

why Quote Exact In is only 0.25?

why calldata is undefined?

TNasiB commented 5 months ago

calldata is undefined because alpha router has a check for the parameters with which you call, if you call smart order router with configs as in the documentation, then calldata will return

guotie commented 5 months ago

add flag recipient will produce calldata

--recipient 0xxxxxxxx