The _doDexSwap function lacks slippage protection when executing token swaps through Paraswap. Without slippage protection, swaps can settle at any price, exposing users to potentially severe slippage losses. Adding a slippage protection would protect users from unfavorable trade execution.
Current code
Lack of slippage protection will lead to so many things like users swap been manipulated by mev bots causing users swap to suffer significant losses due to unfavorable swap rates leading to unexpected and undesirable outcomes
slippage protection is needed in _doDexSwap kindly fix the below code
Slippage and deadline are handled externally. Paraswap implementation used by the current code (behind the proxy): https://etherscan.io/address/0xdffd706ee98953d3d25a3b8440e34e3a2c9beb2c GMX code: https://github.com/gmx-io/gmx-synthetics/blob/caf3dd8b51ad9ad27b0a399f668e3016fd2c14df/contracts/order/OrderUtils.sol#L150C15-L150C33
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.