#47295 [SC-Insight] Configurator Can Manipulate Critical Parameters to Force Mass Liquidations and Drain Protocol Funds

Submitted on Jun 12th 2025 at 11:33:20 UTC by @Catchme for IOP | Paradex

  • Report ID: #47295

  • Report Type: Smart Contract

  • Report severity: Insight

  • Target: https://github.com/tradeparadex/audit-competition-may-2025/tree/main/paraclear

  • Impacts:

    • Protocol insolvency

    • Direct theft of any user funds, whether at-rest or in-motion, other than unclaimed yield

Description

Brief/Intro

The Paraclear protocol grants the CONFIGURATOR_ROLE unrestricted power to modify critical financial parameters including margin requirements, liquidation fees, and trading fees without any upper bounds validation. A malicious configurator can exploit this to set extreme parameter values (e.g., 1000% margin requirements, 100% liquidation fees) that instantly make all user positions unhealthy, then liquidate them through the insurance fund to extract maximum penalties and trading fees, effectively draining the entire protocol.

Vulnerability Details

1. Unrestricted Parameter Control

The configurator role has unlimited power to modify critical parameters with no upper bounds:

Liquidation Fee - No Upper Limit:

Margin Parameters - No Upper Limit:

Trading Fees - No Upper Limit:

2. Margin Calculation Impact

The margin requirement calculation directly uses these unvalidated parameters:

3. Health Check Vulnerability

Account health is determined by comparing account value to margin requirements:

When imf_base is set to extreme values (e.g., 10x normal), all accounts become immediately liquidatable.

4. Liquidation Penalty Extraction

The liquidation penalty is calculated as:

With extreme parameters:

  • margin_requirement = position_value × 1000% = 10× position value

  • liquidation_fee = 100%

  • liq_penalty_full = 10× position value

5. Contradicts Official Documentation

The official Paradex documentation states:

  • "The Liquidation Fee is set to 70%"

  • "Partial Liquidation of unhealthy accounts and attempts to minimise impact on the user's assets"

However, the code allows unlimited fee manipulation, violating these safety guarantees.

Impact Details

  1. Parameter Manipulation:

    • Set imf_base to 1000% (normal: 1-5%)

    • Set liquidation fee to 100% (documented: 70%)

    • Set trading fees to 50% (normal: 0.1%)

  2. Mass Liquidation Trigger:

    • All user positions instantly become unhealthy (excess_balance < 0)

    • Insurance fund can liquidate any account

  3. Profit Extraction:

References

Proof of Concept

Proof of Concept

PoC

paraclear/src/paraclear/tests/test_paraclear_liquidations.cairo

Was this helpful?