Target is hidden
This information is not publicly available.
Root cause: While the circuit breaker is active, LiquidationTrigger.bark() multiplies the remaining liquidation room by the 20% throttle independently on every call. It stores no breaker-period quota. Repeated permissionless calls therefore consume a geometric series approaching the full unthrottled capacity in the same transaction.
Exploit condition: A manipulated RAIN price activates the breaker and makes several normally healthy vaults appear unsafe. Any caller can then batch bark() across those vaults and buy the resulting auctions before the manipulated price clears.
Impact: The breaker promises to prevent a wave of unfair liquidations, but ten calls at the shipped parameters consume 44,631.29088 USDR of a 50,000-USDR liquidation capacity instead of the intended 10,000-USDR allowance. The PoC immediately buys the ten bad-price auctions and receives more than 70,843 RAIN at a 26,212-USDR discount to the pre-attack $1 trend.
Primary proof: pocs/RUSDR-005_circuit_breaker_throttle_bypass/artifacts/run_poc.txt
Weakness: Business Logic Errors (HackenProof) / Direct theft of user funds / CWE-841: Improper Enforcement of Behavioral Workflow
Severity: Critical. The program accepts oracle-manipulation attacks and classifies direct theft of user funds as an in-scope impact.
bark respects the nominal 10,000-USDR breaker allowance.bark calls in the same transaction consume 44,631.29088 USDR while the breaker stays active.Scope asset: https://github.com/hackenproof-public/rain-usdr-contracts/tree/bd6e03abe34936b7dbece2509b90457bd5c9b119
Affected:
rain-usdr-contracts commit bd6e03abe34936b7dbece2509b90457bd5c9b119, the revision pinned by the HackenProof scope asset.Ten users each own an ordinary RAIN vault containing 40,000 RAIN with 10,000 USDR of debt. At the pre-attack $1 price, every vault is at the required 400% collateral ratio. The system uses its shipped RAIN liquidation capacity of 50,000 USDR and its shipped active-breaker throttle of 20%.
The attacker manipulates the delayed RAIN price from $1 to $0.60. This exceeds the breaker's 25% deviation threshold and makes the ten vaults appear below the 260% bark threshold. The breaker correctly becomes active. Under the stated 20% throttle, new RAIN liquidations during this breaker period should be limited to 10,000 USDR.
The attacker batches ten permissionless bark() calls in one transaction. The first call computes 50,000 * 20% = 10,000 USDR of room. After it increases dirt, the second call computes 40,000 * 20% = 8,000; the third receives 32,000 * 20% = 6,400; and so on. In general, after n calls the attacker consumes:
hole * (1 - (1 - throttle)^n)
After ten calls, 44,631.29088 USDR is in auctions—89.26% of normal capacity and 4.46 times the supposed active-breaker allowance. All calls occur in one block, and the breaker remains active throughout.
The attacker then buys all ten auctions at the manipulated $0.60 oracle price plus the shipped 5% auction buffer. The attacker spends 44,631.29088 USDR and receives more than 70,843 RAIN. Against the breaker's pre-attack $1 trend, that collateral is worth over 70,843 USDR, giving the attacker a value gap above 26,212 USDR at the expense of the liquidated vault owners.
The program excludes incorrect third-party oracle data but explicitly does not exclude oracle-manipulation attacks. The PoC models the manipulated price locally and performs no testing against an oracle or third-party contract.
CircuitBreaker states that it defends against price manipulation by slowing liquidations so a manipulated price cannot trigger a wave of unfair liquidations.
LiquidationTrigger.bark() first derives room from hole - dirt and then applies room = room * throttle / WAD on every invocation. bark() then increments dirt, so the next invocation receives 20% of the newly reduced remainder. There is no timestamp, epoch, breaker-activation snapshot, or cumulative throttled quota.
The repository's breaker regression test checks only one vault and one bark. That call is partially liquidated as expected, so the test misses the aggregate same-block bypass.
DutchAuction.take() transfers collateral at the active auction price and even supports a flash-loan-style callback. Once the attacker has bypassed the throttle and created the extra auctions, the protocol itself provides the path to acquire the victims' collateral before the manipulated price clears.
This root cause is independent of the reserve-solvency issues submitted as HackenProof reports RAINUSDR-1232, RAINUSDR-1238, and RAINUSDR-1248: it neither reads nor changes worstCaseLoss, committed reserve, or the solvency gate. It fails inside the liquidation-cap calculation even when reserve accounting is otherwise correct.
The bundle is in pocs/RUSDR-005_circuit_breaker_throttle_bypass/. run.sh fetches the exact scope commit, verifies the checked-out HEAD, installs exact @openzeppelin/[email protected], copies CircuitBreakerThrottleBypassPoC.t.sol into the test directory, and runs only test_repeatedBarksBypassActiveBreakerThrottleInOneBlock under Foundry 1.5.1.
The failure converts a safety mechanism specifically designed for suspicious oracle movements into only a per-call size reduction. Because bark is permissionless and calls can be batched atomically, the attacker can trigger a liquidation wave before keepers or governance can intervene.
At the shipped 50,000-USDR RAIN capacity and 20% throttle, ten calls reach 44,631.29088 USDR. The PoC stays within the shipped debt ceilings, dust threshold, collateral ratio, liquidation penalty, auction buffer, and reserve parameters. Its ten calls use about 5.3 million gas in Foundry, so the sequence is practical within one transaction. Increasing the number of eligible vaults makes cumulative use approach the full 50,000-USDR unthrottled capacity, with the dust floor only limiting the final small tail.
The demonstrated attacker outcome is direct acquisition of victim collateral below the pre-manipulation trend price. A transient manipulated price can therefore cause liquidations well beyond the protocol's advertised emergency allowance and turn them into immediate attacker profit.
Apply the throttle to aggregate caps, then subtract current utilization. While the breaker is active, compute effective global and per-ilk ceilings first:
effectiveGlobalHole = globalHole * throttle / WAD
effectiveIlkHole = ilk.hole * throttle / WAD
room = min(effectiveGlobalHole - globalDirt, effectiveIlkHole - ilk.dirt)
Revert when either dirt value already meets its effective ceiling. If the intended policy is a replenishing time-period quota, store an explicit period identifier and cumulative amount consumed during that period; a per-call percentage cannot enforce a rate. Add a regression test that activates the breaker and batches several bark calls across different vaults in one block, asserting that their aggregate tab cannot exceed the breaker allowance.
unzip RUSDR-005_circuit_breaker_throttle_bypass.zip
cd RUSDR-005_circuit_breaker_throttle_bypass
./run.sh --preflight
./run.sh
[PASS] test_repeatedBarksBypassActiveBreakerThrottleInOneBlock(), then Control: one bark respects the active breaker's 10,000-USDR allowance., Exploit: ten same-block barks consume 44,631.29088 USDR while the breaker remains active., Impact: ten bad-price auctions transfer 70,843+ RAIN to the attacker at a 26,212+ USDR gap to the pre-attack trend., and RESULT: PASS.run.sh removes its unique temporary checkout automatically on success, failure, and interruption. It starts no service, container, local chain process, or live target session.RUSDR-005_circuit_breaker_throttle_bypass.zip - complete deterministic PoC bundle for upload.pocs/RUSDR-005_circuit_breaker_throttle_bypass/artifacts/run_poc.txt - primary proof with the native Foundry pass and emitted state deltas.pocs/RUSDR-005_circuit_breaker_throttle_bypass/CircuitBreakerThrottleBypassPoC.t.sol - exact-scope exploit, control, and monetization test.pocs/RUSDR-005_circuit_breaker_throttle_bypass/artifacts/control_comparison.txt - concise expected-versus-vulnerable boundary comparison.
Comments are hidden
This information is not publicly available.