The RAACMinter contract allows an account with UPDATER_ROLE to arbitrarily change the stabilityPool address without proper validation or governance oversight. This enables an attacker to replace the Stability Pool with a malicious contract, bypassing protocol safeguards and minting unlimited RAAC tokens. This flaw violates the principle of least privilege and introduces a single point of failure.
https://github.com/Cyfrin/2025-02-raac/blob/89ccb062e2b175374d40d824263a4c0b601bcb7f/contracts/core/minters/RAACMinter/RAACMinter.sol#L124
An malicious actor gains the update role
Set Malicious Stability Pool: Call setStabilityPool() with the address of a malicious contract.
Mint Unlimited RAAC: The malicious Stability Pool triggers mintRewards(), minting RAAC tokens without validation.
Code Proof:
In RAACMinter.sol, the UPDATER_ROLE can freely update the Stability Pool:
Attack Simulation:
Malicious actor deploys a fake Stability Pool contract:
Actor calls:
Actor triggers mintRewards():
Result: RAAC tokens are minted without collateral, causing hyperinflation.
Token Hyperinflation: Unlimited RAAC minting devalues the token, rendering it worthless.
Fund Drainage: Malicious Stability Pool can siphon funds from other protocol components.
Protocol Collapse: Loss of user trust and financial insolvency.
Manual Review, static analysis
Restrict Stability Pool updates to governance proposals with a timelock and validation.
Step 1: Restrict Updates to Governance
Step 2: Add Timelock for Critical Changes
Integrate with TimelockController to enforce delays:
Step 3: Governance Proposal Workflow
Governance proposes a new Stability Pool address.
Proposal passes after a 7-day timelock.
TimelockController executes the update.
Why This Fix Works
Governance Control: Only approved governance proposals can update the Stability Pool.
Contract Validation: Ensures the new address is a valid smart contract.
Timelock: Provides users time to audit changes and exit if malicious.
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.