If GMX fails during the compounding process in the addLiquidity function, then processCompoundCancellation is executed, which sets the state to Compound_Failed
:
In this state, the only function that can be called is compound
. This means that compound
must be executed repeatedly until it succeeds. Otherwise, the state remains stuck in Compound_Failed.
This is what such a scenario might look like:
There are some TokenA/TokenB in GMXTrove.
A keeper calls the compound function.
The tokens are attempted to be deposited in GMX.
The deposit fails (for example, due to insufficient GM supply for purchase or to high slippage amount).
The status is set to Compound_Failed.
The keeper calls the compound function again, and it fails once more.
It could render the vault temporarily unusable as it gets stuck during the compound operation until it works.
VSCode
In the processCompoundCancellation
function, the TokenA/TokenB should be sent back to GMXTrove, and the vault should be reopened so that other functions can be called. This way, you can still retry the Compound
operation, but the vault won't remain stuck in the same state if it fails again and again.
Impact: High Likelihood: Low The sponsor confirmed it's a typo in the diagram but the documentation/source is the source of truth for the hawks. Will group all findings pointing out the wrong status transition to Compound_Failed based on the diagram.
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.