Open renorzr opened 3 years ago
Hey im not sure whats happening but yeah there is an issue with the liquidity, you are trying to borrow 53 UNI on sushiswap UNI/LINK pair but looking at the reserves there are less than 1 UNI token in the pool (to be more accurate 0,0044 UNI) & i check the pool in sushiswap and basically its empty. This is not true in the case of uniswap.
Then I found these posts, maybe are usefull haha to be honest im not sure (sorry Im out of time). post1 post2
thanks @6eer.
seems computeProfitMaximizingTrade
doesn't consider reserves...
computeProfitMaximizingTrade has an issue with the reserves it's returning the amount bigger than the liquidity .
Hi,
The demo works well, but when I tried with pair LINK/UNI, got error
revert ds-math-sub-underflow
(the output is pasted at the bottom).Added
console.log
aroundcomputeProfitMaximizingTrade
andgetAmountIn
, theamountIn
looks weird.Could you please take a look? Thanks.
btw, I tried with WETH/WBTC the
amountIn
seems good (no arbitrage opportunity as expected). Possibly a problem with liquidity?This is my .env:
This is the bot output: