Paraswap swaps in _doDexSwap lack explicit min-out constraints, allowing large slippage or potential MEV manipulation.
_doDexSwap
sends tokens to Paraswap using externally generated call data but does not enforce a minimum output on-chain.
Price could move unfavorably or front-runners could exploit the trade.
The function calls ParaSwapUtils.swap(...)
with no additional on-chain check like require(outputAmount >= minExpected)
.
If the Paraswap aggregator call is front-run or manipulated, the vault might receive fewer tokens.
Unbounded slippage scenario where user deposit or vault funds get poor pricing.
Manual code inspection.
Common DeFi best practices for DEX aggregator usage.
Add a minOutputAmount
parameter in _doDexSwap
or parse it from the ParaSwap call data, then assert on-chain with require
.
Alternatively, incorporate a slippage tolerance check in the vault logic itself.
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.