SC02—Business Logic Vulnerabilities
>Control Description
>Prevention & Mitigation Strategies
- 1.Model protocol economics explicitly using adversarial simulations and agent-based models rather than relying on intuition.
- 2.Express core invariants in code and tests, e.g., total value withdrawn cannot exceed total deposits + realized yield, rewards distribution is proportional to time-weighted stake.
- 3.Use formal verification and property-based fuzzing for key accounting paths (vaults, strategies, reward distribution).
- 4.Version and gate new strategies/spells: roll out behind caps, monitor metrics and on-chain invariants before raising limits.
- 5.Ensure governance and operations teams understand invariants, not just auditors.
>Attack Scenarios
Flawed collateral accounting in GMX V2 CauldronV4 contracts enabled attackers to exploit broken economic invariants: (1) made a deposit into GMX designed to fail, leaving tokens stuck in OrderAgent, (2) self-liquidated their position causing the contract to erase the position but fail to remove the associated order and collateral, (3) used the ghost collateral to borrow 6,260 ETH (~$12.9M).
A design flaw in the yETH weighted stableswap pool's fixed-point iteration solver allowed attackers to force the solver into divergent behavior. Through highly imbalanced liquidity operations, they caused the product term to collapse to zero, converting the pool from a hybrid stableswap invariant to a constant-sum curve, enabling minting of approximately 2.35x10^56 yETH LP tokens without collateral.
>References
Ask AI
Configure your API key to use AI features.