Open NatPDeveloper opened 1 year ago
So it came to my attention recently that uni v3 can pull in less than the amount in specified for a swap if there's insufficient liquidity.
I'm curious if uniswap v2 can do this as well. It looks like no but it would be great to be sure as the scenario I mentioned above is not in the docs. https://github.com/Uniswap/v2-periphery/blob/master/contracts/libraries/UniswapV2Library.sol#L65
UniV3 https://github.com/Uniswap/v3-core/blob/d8b1c635c275d2a9450bd6a78f3fa2484fef73eb/contracts/UniswapV3Pool.sol#L563 https://github.com/Uniswap/v3-core/blob/main/contracts/UniswapV3Pool.sol#L767
I would suggest adding the above scenario to the docs for those developing smart contracts on top of the protocol this can lead to forever locked funds.
So it came to my attention recently that uni v3 can pull in less than the amount in specified for a swap if there's insufficient liquidity.
I'm curious if uniswap v2 can do this as well. It looks like no but it would be great to be sure as the scenario I mentioned above is not in the docs. https://github.com/Uniswap/v2-periphery/blob/master/contracts/libraries/UniswapV2Library.sol#L65
UniV3 https://github.com/Uniswap/v3-core/blob/d8b1c635c275d2a9450bd6a78f3fa2484fef73eb/contracts/UniswapV3Pool.sol#L563 https://github.com/Uniswap/v3-core/blob/main/contracts/UniswapV3Pool.sol#L767
I would suggest adding the above scenario to the docs for those developing smart contracts on top of the protocol this can lead to forever locked funds.