User cannot deposit or withdraw and keeper cannot call run() function when the flow is ongoing that is flow value != None. This value is set to default after every flow except in one case that will cause the DoS for the user and keeper.
Consider the current state of the pool:
positionIsClosed = false (Position is Open)
beenLong = true (Position is Long)
leverage = 1x (Hence _isLongOneLeverage(beenLong) = true)
Now user wants to deposit in this pool and calls deposit function with correct amount and sets the flow = DEPOSIT. pays the execution fee and set the nextAction.selector = INCREASE_ACTION.
Keeper will call runNextAction for _nextAction.selector = INCREASE_ACTION. and because of the above conditions of the pool _isLongOneLeverage(_isLong) this condition will be true and _runSwap() function will be called. Suppose the runSwap is called by the keeper with metadata length = 1 (Because of the optimized route). then it will call _doDexSwap() and swaps the tokens and finally _mint() is called and it calculates and assign the shares to the owner and here the flow ends. But after this flow ends flow variable is not reset to default that cause DoS for other user while deposit, withdraw and keeper cannot call run function because of _noneFlow() modifier which checks flow value should be default.
DoS for the user to deposit and withdraw. The keeper cannot call run().
Manual Review
Set flow value to default after the flow is finished.
Likelihood: Medium/High, - Leverage = 1x - beenLong = True - positionIsClosed = False - Metadata → 1 length and Dex Swap Impact: Medium/High, DoS on any new action before the admin uses setVaultState Since this seems to be the most probable path for a 1x PerpVault, this one deserves a High.
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.