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

Liquidation risk from gmx funding fees

Title

Liquidation risk from gmx funding fees

Summary

The perpetualvault contract doesn't have a system to manage increasing leverage caused by gmx's negative funding fees.

Vulnerability Details

The contract lets users set a leverage level when they start but doesn't handle the impact of gmx's fees. two key problems arise:

Leverage silently increases as fees reduce collateral:

  • Example: $1000 position / $100 collateral = 10x initial leverage

  • After $20 fees: $1000 position / $80 collateral = 12.5x leverage

This creates risk of liquidations as positions become increasingly over-leveraged from fee impacts.

Impact

Without a fix, users risk losing funds as positions become too leveraged and get liquidated.

Tools Used

Manual Review

Recommendations

Add a function to check and adjust leverage:

Updates

Lead Judging Commences

n0kto Lead Judge 5 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
Assigned finding tags:

Informational or Gas

Please read the CodeHawks documentation to know which submissions are valid. If you disagree, provide a coded PoC and explain the real likelihood and the detailed impact on the mainnet without any supposition (if, it could, etc) to prove your point.

Support

FAQs

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