Uniswap / v2-periphery

🎚 Peripheral smart contracts for interacting with Uniswap V2
https://uniswap.org/docs
GNU General Public License v3.0
1.14k stars 1.69k forks source link

computeProfitMaximizingTrade method in ExampleSwapToPrice #139

Closed Samboy76 closed 2 years ago

Samboy76 commented 2 years ago

amountIn = leftSide.sub(rightSide); it throws me below exception, does it mean the calc function might be wrong?

VM Exception while processing transaction: revert ds-math-sub-underflow

Samboy76 commented 2 years ago

Closing issue as n/a