Submitted by 0xAsen, rvierdiiev, pks27, TheSchnilch, kz0213871, nervouspika, 0xhacksmithh. Selected submission by: pks27.
Relevant GitHub Links
Summary
Incorrect state transition may cause vault in stuck under
processCompoundCancellation scenario.Vulnerability Details
When keeper execute
compound action and GMXCallback return afterDepositCancellation action, then protocol will call GMXCompound#processCompoundCancellation function to change vault status.However, vault status is changed to
GMXTypes.Status.Compound_Failed instead of GMXTypes.Status.Open by GMXCompound#processCompoundCancellation function, which is different with document described below:and
All scenarios should be handled to ensure vault eventually returns to an Open status. Consider how a scenario might lead to a stuck vault (other statuses).Impact
Vault may stuck in unexpected state after
processCompoundCancellation action.Tools Used
vscode, Manual Review
Recommendations
Change the vault status to
Open instead of Compound_Failed when call GMXCompound#processCompoundCancellation function.