Liquidation risk from gmx funding fees
The perpetualvault contract doesn't have a system to manage increasing leverage caused by gmx's negative funding fees.
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.
Without a fix, users risk losing funds as positions become too leveraged and get liquidated.
Manual Review
Add a function to check and adjust leverage:
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.
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.