When I tried to swap 1BAT from DAI by using Uniswap App (https://app.uniswap.org/#/swap), I needed 0.325372DAI
as this picture show.
However, when I tried to calculate how much DAI I need to get 1BAT
by directory read contract function (getAmountsIn()), it shows 329322487172572064
, which means I need '0.32932DAI' to swap 1BAT
.
I thought that the amount from getAmountsIn()
would be same as the amount from uniswap official app.
Why those two amounts are different, Did I called wrong function?
Could you give me any advise, please?