DeFiFoundry
50,000 USDC
View results
Submission Details
Severity: high
Invalid

user can not refund withdraw fee

Summary

function _cancelFlow() internal {
} else if (flow == FLOW.WITHDRAW) {
try IGmxProxy(gmxProxy).refundExecutionFee(
depositInfo[counter].owner,
depositInfo[counter].executionFee
) {} catch {}
}
// Setting flow to liquidation has no meaning.
// The aim is to run FINAIZE action. (swap indexToken to collateralToken);
flow = FLOW.LIQUIDATION;
nextAction.selector = NextActionSelector.FINALIZE;
}

When canceling the flow in the FLOW.WITHDRAW state, it does not cancel the withdrawal request, but instead, it cancels the order of the depositId of the counter variable. As a result, the user loses the fee, and the last user who deposited will receive the fee.

If there are no depositing users, the last depositor (the attacker) could withdraw the fee multiple times.

References

Updates

Lead Judging Commences

n0kto Lead Judge 3 months ago
Submission Judgement Published
Invalidated
Reason: Lack of quality

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.