The Router (and Pool) does not implement any slippage checks with comparing the swap / liquidity results with a minimum swap / liquidity value.
Impact
Users can be frontrun and receive a worse price than expected when they initially submitted the transaction.
There's no protection at all, no minimum return amount or deadline for the trade transaction to be valid which means the trade can be delayed by miners or users congesting the network, as well as being sandwich attacked - ultimately leading to loss of user funds.
Recommended Mitigation Steps
Add some sort of protection for the user such that they receive their desired amounts. Add a minimum return amount for all swap and liquidity provisions/removals to all Router functions.
Handle
cmichel
Vulnerability details
The
Router
(andPool
) does not implement any slippage checks with comparing the swap / liquidity results with a minimum swap / liquidity value.Impact
Users can be frontrun and receive a worse price than expected when they initially submitted the transaction. There's no protection at all, no minimum return amount or deadline for the trade transaction to be valid which means the trade can be delayed by miners or users congesting the network, as well as being sandwich attacked - ultimately leading to loss of user funds.
Recommended Mitigation Steps
Add some sort of protection for the user such that they receive their desired amounts. Add a minimum return amount for all swap and liquidity provisions/removals to all
Router
functions.