The deposit function in the PerpetualVault contract lacks slippage protection, allowing deposits to be executed at unfavorable prices. This exposes users to price manipulation and front-running attacks, where an attacker can exploit price discrepancies to cause users to receive fewer shares than expected.
The deposit() function in the PerpetualVault contract lacks slippage protection when minting shares, making it vulnerable to MEV attacks and front-running. Users have no way to specify a minimum number of shares they expect to receive for their deposit, which could result in significant value loss due to price manipulation.
Users receive fewer shares for their deposits, leading to financial loss.
MEV bots can front-run deposit transactions to extract value
Manual Review
Add slippage protection parameters to the deposit function:
Update DepositInfo struct to include slippage parameters:
Implement slippage checks in both immediate and delayed minting paths:
Shares represent a part of the vault. Even if someone performs a frontrun or sandwich attack, you will still have the corresponding amount of shares representing your deposit. A user could add liquidity two days later, and you would still have the same amount of shares.
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.