flow is not deleted after the deposit flow is finished for a 1x leverage long position. Hence all the user operations in the perpetual contract is blocked.
Current position is an open 1x long .
Alice deposited some collatteral tokens.
Keeper calls runNextAction(bytes[] memory metadata, .. ) with metadata containing only the paraswap details and hence no call for gmx market will be done.
Since the nextaction.selector is INCREASE_ACTION , the protocol is PROTOCOL.DEX and the flow is FLOW.DEPOSIT the below code is executed
Since this is the last action for a DEPOSIT.FLOW , flow and flowdata needs to be deleted inorder to continue the contracts operation. (gmxLock is never enabled since no gmx operations is required for this)
Here once the keeper calls runNextAction() to complete the alice's deposit , all other operations is blocked. When user tries to call any operation it reverts with FlowInProgress() error.
run cmd : forge test --match-test test_dhank_Run_Paraswap --rpc-url https://arbitrum-mainnet.infura.io/v3/{api} -vv
Since since no action for deleting the flow is done after the DEPOSIT.FLOW is finished for a 1x long position market , all the operations are blocked
Manual
Call finalize(hex'') after the _mint to delte the flow and flowData
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.