High Risk
https://github.com/Cyfrin/2023-10-SteadeFi/blob/0f909e2f0917cb9ad02986f631d622376510abec/contracts/strategy/gmx/GMXCompound.sol#L127-L136
Incorrect state transition may cause vault in stuck under processCompoundCancellation
scenario.
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).
Vault may stuck in unexpected state after processCompoundCancellation
action.
vscode, Manual Review
Change the vault status to Open
instead of Compound_Failed
when call GMXCompound#processCompoundCancellation
function.