The swapExactIn and swapExactOut functions in uniswapsettlement.sol lack a deadline parameter for execution.
Impact
Without a deadline parameter, transactions are vulnerable to delays in blockchain processing. This exposes users to significant financial risks due to potential market price fluctuations during transactions that take long to execute. Users may experience unexpected losses if market prices move unfavorably while their transactions await processing, undermining the effectiveness of any set slippage thresholds
Lines of code
https://github.com/code-423n4/2024-05-predy/blob/a9246db5f874a91fb71c296aac6a66902289306a/src/settlements/UniswapSettlement.sol#L22-L56
Vulnerability details
Summary
The
swapExactIn
andswapExactOut
functions inuniswapsettlement.sol
lack a deadline parameter for execution.Impact
Without a deadline parameter, transactions are vulnerable to delays in blockchain processing. This exposes users to significant financial risks due to potential market price fluctuations during transactions that take long to execute. Users may experience unexpected losses if market prices move unfavorably while their transactions await processing, undermining the effectiveness of any set slippage thresholds
Proof of Concept
Tools Used
Manual code Review
Recommended Mitigation Steps
Introduce a deadline parameter in both
swapExactIn
andswapExactOut
functions to specify the maximum permissible time for the transaction to execute.Assessed type
Other