Skip to content
Business logic Audit finding Advanced

HousePool: pending recapitalization outlives its paid-out cash, freezing Senior LP funds

After a total loss, the owner refills the pool and a trader collects a large claim from that refill. The pool still records the whole refill as owed to Senior LPs, so every later LP settlement reverts and Senior funds are frozen.

Pleiades Follow

Originally disclosed on Immunefi

  • Disclosed after under an hour

#99867 [SC-High] HousePool: pending recapitalization outlives its paid-out cash, freezing Senior LP funds

Submitted on Nov 15th 2026 at 15:10:03 UTC by @Pleiades for Audit Competition | Plether

Description

HousePool: pending recapitalization outlives its paid-out cash, freezing Senior LP funds

Program: Plether audit competition on Immunefi · Asset: packages/perps/src · Report: PLE-2026-063EABB6

Pin: a82d4fefb02768e5b3bddcc97dee371eee24fea8 in https://github.com/immunefi-team/audit-comp-plether

Severity: High, row "High: temporary freezing of funds for at least 24 hours"

In short

After a total loss, the owner refills the pool and a trader collects a large claim from that refill. The pool still books the whole refill as owed to Senior LPs, and every later LP settlement reverts. In my test, 29,957.08 USDG of Senior money stayed in the pool, unredeemable, for 47 hours, with the state identical at every hour. Every way I found to end it needs an outside action, mostly cash: 5,148.49 USDG on the release parameters, and one atom less still reverts. I rate it High. The PoC runs in the repository's Foundry suite, and a fix is included.

The bug in five steps

Two groups of liquidity providers (LPs) fund the pool. Junior LPs take losses first; Senior LPs are paid first. An LP withdraws by filing a redemption request that matures after a delay and then cannot be cancelled. settleLpEpoch pays matured requests. Each call starts with a reconcile, which works out what each group owns. Amounts are thousands of USDG from the main test, rounded.

  1. A price path that ends at the cap lets traders wipe out both groups. The pool holds next to nothing, just 1 USDG, and owes a trader 70. A reconcile writes both groups' principal, what the pool owes them, down to 0.
  2. The owner refills the pool with recapitalizePool (100 in these units, 100,000 USDG in the logs). The pool records the 100 as pending recapitalization, to be credited to Senior at the next reconcile.
  3. The trader collects the 70 from that cash. The pool now holds 30, but the pending recapitalization still says 100.
  4. The next reconcile credits Senior with the 30. It carries the other 70 forward as still pending, with no cash behind it.
  5. A Senior LP asks to redeem 99.8% of the Senior shares, and the request cannot be cancelled once it matures. Every settleLpEpoch now reverts with HousePool__NoLpEpochProgress: 48 hourly attempts over 47 hours, while the 30 sits in the pool. After each attempt the test asserts that principal, high-water mark, pending amount and cash are unchanged.

In the control, the owner refills 140 for the same claim and the same request is paid 69,928.37 USDG. [E1]

The pending 70 falls only inside a reconcile that commits, meaning one that a revert does not undo (HousePool.sol:1772, :1790), and a settlement commits only if it moves a queue item (HousePool.sol:1183-1185). In a further run I filed a Junior redemption during the freeze and let it mature: settleLpEpoch still reverted and every tracked value stayed the same. [E25]

Run it

Bash
git clone --recurse-submodules https://github.com/immunefi-team/audit-comp-plether target
git -C target checkout a82d4fefb02768e5b3bddcc97dee371eee24fea8
git -C target submodule update --init --recursive
mkdir -p target/packages/perps/test/perps/hunt
# save HuntH15.t.sol (full source in the Proof of Concept section) into that folder
cd target/packages/perps
forge test --match-path test/perps/hunt/HuntH15.t.sol --match-test test_H15_Target_PriceDrivenWipe_Freeze48 -vvv

The test file HuntH15.t.sol is in the Proof of Concept section; the command above runs test_H15_Target_PriceDrivenWipe_Freeze48 in it. I ran everything with Solc 0.8.35 and Foundry 1.9.0; the first compile takes about 12 minutes. Expect exit code 0 and this line:

Text
  48 hourly attempts reverted HousePool__NoLpEpochProgress; last timestamp 1709730000

The main test uses the repository's test parameters. Severity is judged at the release parameters, so a second test replays the chain with those: bash ../poc/run.sh test_H15R_Target_PriceDrivenWipe_Freeze48 HuntH15R.t.sol. It also ends with 48 of 48 reverts. The PoC changes no in-scope contract and makes the wipe with prices and trades, not with burn, vm.store or stdstore. Three runs gave identical results, and the PoC commands also passed on a fresh clone of the pin. The control and fix commands are in appendix A. [E2]

Abridged output (6 decimals):

Text
  settleTraderClaim paid Y = 70043920000
  stage 4: after real settleTraderClaim
    pendingRecapitalization   100000000000
    pool cash (totalAssets)   29957082325
  stage 5: reconcile 1 (production settleLpEpoch fed by a junior dust redeem)
    seniorPrincipal           29957082325
    pendingRecapitalization   70042917675
    freeAssets (liq. view)    0
  48 hourly attempts reverted HousePool__NoLpEpochProgress; last timestamp 1709730000

Why it happens

The pool keeps the refill as a pending amount, apart from its cash, and paying a trader from that cash does not lower it. A reconcile credits the pending refill only up to the distributable value, which is cash minus unpaid trader claims (HousePool.sol:1829-1834):

Solidity
    function _settleablePendingClaimantBuckets(
        HousePoolAccountingLib.ReconcileSnapshot memory reconcileSnapshot,
        HousePoolPendingPreviewLib.ClaimantPendingBuckets memory claimantBuckets
    ) internal pure returns (HousePoolPendingPreviewLib.ClaimantPendingBuckets memory settleableClaimantBuckets) {
        return HousePoolPendingPreviewLib.capClaimantBuckets(claimantBuckets, reconcileSnapshot.distributable);
    }

The rest is carried forward as a leftover with no cap of its own, waiting for cash that has already gone to the trader (HousePool.sol:1620-1621):

Solidity
        HousePoolPendingPreviewLib.ClaimantPendingBuckets memory residualClaimantBuckets =
            HousePoolPendingPreviewLib.subtractClaimantBuckets(claimantBuckets, settleableClaimantBuckets);

Call the cash D (29,957.08) and the leftover P (70,042.92), the refill X minus D. Each settlement first reserves min(P, D), here all of D, for the leftover. That leaves Senior unbacked, so its principal is written down to 0. With both groups at 0, the reserved D is applied like a fresh refill: Senior gets D again, and the leftover drops to P − D. The same D is now counted twice. The payable amount is D minus the remaining leftover, 2D − P = 59,914.16 − 70,042.92, floored at 0. No request moves, so the call reverts and undoes its own reconcile. The repository's accounting spec reserves pending inflows precisely to stop this double counting. [E9]

So the freeze holds while 2D ≤ P. Ignoring the 1 USDG held before the refill, that means a payout Y of at least two thirds of the refill X. The PoC asserts this. In the control the owner refills twice the claim, so the payout is half the refill, below two thirds, and the same sequence does not freeze. The same arithmetic says what ends it: enough cash from outside to make 2D larger than P. The amounts I measured are in appendix A. [E10]

Who can trigger it, and when

No attacker is needed. The owner acts only through documented recovery steps, the refill among them. The program counts a documented trusted-role action that triggers a bug as in scope. The refill is cash moved through a documented recovery step, not a configuration setting, and every refill from the claim size up to 1.5 times the claim freezes the same way.

The order in step 3 is forced. Only the claimant can call settleTraderClaim, and only once pool cash covers all claims. The claim therefore waits for the refill and can be collected right after it, at the same timestamp in the PoC. With no open positions, anyone can call settleLpEpoch. [E11]

The freeze needs three things:

  1. A wipe: both principals go to 0. In the main test that happens because claims exceed the pool's cash.
  2. A refill that is small against the payout: a payout of at least two thirds of the refill, so any refill below 1.5 times the claim freezes. Half is enough if the Senior request has matured before the first reconcile after the payout, so any refill below twice the claim freezes (a 60% payout run: 6 of 6 reverted).
  3. Only one settlement commits between the refill and the moment the Senior request matures. In the PoC that is a tiny Junior redemption, committed after the payout. A second committed settlement, before or after the payout, shrinks the leftover and nothing freezes (appendix C, [E26]).

Impact and severity

Senior LPs cannot withdraw 29,957.08 USDG that sits in the pool and is booked as their principal, all that is left of about 601,016 USDG of Senior principal before the wipe. The wipe came from trading, not from this bug. On the release parameters the same freeze holds 29,901.01 USDG. I claim no theft and no insolvency. The freeze is not permanent. [E13]

Time alone does not end it. A matured request cannot be cancelled. In the frozen state a Junior redemption filed after five hourly attempts and left to mature did not end the freeze, and five more attempts still reverted. A Junior and a Senior deposit request are both refused (TrancheVault__TerminallyWiped, TrancheVault__DepositsUnavailable). [E13] [E25]

This is the program's High row, "temporary freezing of funds for at least 24 hours". The funds stay frozen for 47 hours in the test, an outside action is needed to end it, and the program judges impact before feasibility.

In the test nobody acts for 47 hours, and no step in the code ends the state by itself. The views show 70,042.92 pending against 29,957.08 of cash and free assets of 0, and the monitor raises the warnings NoFreeCash and MaturedSeniorPrecedence; the repository's emergency guide says such states alone do not warrant a breaker. No monitor field says the queue is blocked, and each attempt fails with the error any settlement gives when it moves no request.

I found no documented procedure for this state and no documented detection or response deadline. The guardian cannot end it: its pauses only add restrictions, and the claim payout that completes the state has no pause gate. [E24]

Every way I measured to end it needs an outside action. On the release parameters the owner can book 5,148.49 USDG with accountExcess; one atom less still reverts, and I found no document that states the figure. That is 17 percent of the 29,901.01 USDG frozen there. A second refill needs 10,296.98, double, because it adds the same amount to cash and to the pending amount. A trader's loss of 5,154 USDG, or 10,503.90 USDG of trading costs, also ends it (appendix A). The one route that needs no cash is an owner rate change, proposed and then finalized after the 72-hour timelock with a fresh mark. In a run on the main parameters it funded Senior 19,828.33 USDG of the 29,957.08, 72 hours after the proposal. [E26]

The revert is documented as a guard against no-op callers (ACCOUNTING_SPEC.md:303-304); here it blocks every settlement. The frozen cash came from the owner's refill, since the pool held 1.00 USDG before it, but after the reconcile it is Senior's principal. The wipe uses a price path to the 2.00 cap.

The fix

The patch caps the leftover at the pool cash that is not distributable, meaning cash held for unpaid trader claims. A leftover may then wait behind cash in the pool, not behind cash that has left, apart from the corner case in appendix B. It also holds Senior's high-water mark, the recovery target the pool keeps for Senior, while a leftover is pending.

Diff
+        uint256 nonDistributableAssets = accountingSnapshot.physicalAssets > reconcileSnapshot.distributable
+            ? accountingSnapshot.physicalAssets - reconcileSnapshot.distributable
+            : 0;
+        if (residualClaimantBuckets.recapitalizationAssets > nonDistributableAssets) {
+            residualClaimantBuckets.recapitalizationAssets = nonDistributableAssets;
+        }
+        ctx.residualRecapitalizationAssets = residualClaimantBuckets.recapitalizationAssets;

With the patch the PoC leaves nothing pending, and the release run funds Senior 29,900.96 USDG at the first settlement. My regression test passes 25 of 25 patched and 16 of 25 on the pin. The refactor of _reconcile and one corner case are described in appendix B. [E20]

Known issues

I found no earlier report of this root cause. It sits in the repair of SC-L1, a fixed pre-audit finding about crediting pending recapitalization without a cap. That repair, public pull request 29 of Plether-Fi/plether-core ("Cap pending claimant buckets before reconcile"), caps the credit and, in its own summary, carries "any unsettled residual pending buckets forward in storage" until they become settleable; the carried rest is what breaks here. The program accepts a report showing that a fix introduces a new bug. It differs from Cecuro MED-24, an open known issue where settlement is deferred but still progresses [E15]. Tracker searches on 2026-11-14 found nothing similar. [E21]

AI assistance

AI tools were used to assist with this report. The submitter is responsible for its content.

Appendix

Paths starting with ./ are files of my PoC packet (test files, run logs, fix patch, evidence notes); the others are in the pinned repository. The test files and the fix patch are in the secret Gist linked in the Proof of Concept section. To use the bash ../poc/... commands below, save the Gist's files together in a folder poc/ next to target/. The full packet, 114 files with a sha256 list in manifest.json, is available on request.

A. Commands, exact figures and ways out

Other commands, run from target/: bash ../poc/control.sh (the control; X = 2Y = 140,087.84 USDG, the request is funded 69,928.37 USDG) and bash ../poc/run-fix.sh (25 of 25 tests pass patched, 16 of 25 on the pin).

The release test compiles for about 9 more minutes and ends at last timestamp 1710334800; it finishes with Senior principal 29,901.01 USDG and 70,098.99 pending. The release skew limit, the engine's cap on open-interest imbalance, rejects the main test's single 1,000,000 open, so the release run opens its positions in five orders (three opens and two increases).

On 2026-11-14 the ten PoC commands ran on a fresh clone of the pin, all with exit 0 and the expected lines. The PoC asserts the revert selector on all 48 attempts; its only mocks are the repository's MockPyth and USDG mock. The router is the repository's own LegacyOrderRouterHarness, a test-only subclass of the production OrderRouter that adds a scalar commitOrder adapter; the adapter encodes the request and delegatecalls the production V3 commitOrder, and executeOrder and settleLpEpoch are the inherited production code. No in-scope contract is modified. [E1] [E2] [E3] [E4] [E22]

The run with a Junior redemption and deposit requests during the freeze: bash ../poc/run.sh test_H15_E1_JuniorAndDeposits_DoNotUnfreeze HuntH15E1.t.sol. It reuses the main test's setup, files a Junior redemption and lets it mature, tries a Junior and a Senior deposit request, and runs five more hourly attempts. Expect one test passed; the log shows settleLpEpoch reverting HousePool__NoLpEpochProgress after each step with principal, high-water mark, pending amount, cash and free assets unchanged, and both deposit requests refused. I ran it twice with the same result (./poc/runs/e1/). [E25]

The two further runs on the same chain: bash ../poc/run.sh test_E2_SettlementBeforePayout HuntH15E2.t.sol commits one settlement between the refill and the payout and then follows the main test; nothing freezes and Senior is funded 19,828.33 USDG. bash ../poc/run.sh test_E2_RateChangeNoCash HuntH15E2.t.sol starts from the frozen state, proposes a rate change, warps 72 hours, refreshes the mark and finalizes; the next settlement progresses and funds Senior 19,828.33 USDG with no cash added. I ran each twice with the same result (./poc/runs/e2/). [E26]

The main test in USDG (1 atom is 0.000001 USDG). X is the refill, Y the trader payout, D the cash left after it, P the leftover. "Free assets" is the cash a settlement may pay out. [E5]

Step Event Pool cash Pending recapitalization Senior principal Free assets
0 A price path to the price cap (2.00) closes the positions and records the trader claim, 70,043.92. After the owner's clearDegradedMode (which lifts the engine's degraded mode once solvency is restored), a first reconcile writes both tranches down to 0 1.00 0 0 0
1 The owner calls recapitalizePool(100,000): X arrives 100,001.00 100,000.00 0 0
2 settleTraderClaim pays the claim, Y = 70,043.92, from that cash 29,957.08 100,000.00 0 0
3 The first reconcile after the payout: Senior is credited D = 29,957.08, and P = 70,042.92 stays pending (it differs from Y by the 1.00 USDG the pool held before) 29,957.08 70,042.92 29,957.08 0
4 48 hourly settlements 29,957.08 70,042.92 29,957.08 0, each reverts

Both owner steps, recapitalizePool and clearDegradedMode, are listed in SECURITY.md as instant owner controls, and the program page names them as in-scope trusted actions. [E11] [E14]

What ends the freeze, on the release parameters, three runs each, with the exact boundary found by bisection. [E18]

Route Who What it takes
Donation: USDG sent to the pool and booked with accountExcess owner 5,148.49 USDG. One atom less reverts, and the next hour funds 35,049.44 USDG
Second recapitalizePool owner 10,296.98 USDG, twice the donation because it also raises the pending credit
Trader loss any trader A position opened at the 2.00 price cap and liquidated after the price falls to 0.20 loses 5,154 USDG. The pool is credited 5,148.49, the same as the donation, because the margin was bisected to the smallest loss that works
Fee round trips any trader 1,088 round trips of 11,800 USDG notional (about 12.8 million USDG opened in total) cost the trader 10,503.90 USDG, of which 5,135.36 is fees to the treasury. Traders can still open positions while settlement is stuck

No existing guard covers this path. A repository test expects a leftover to settle "once backing becomes available", but its mock drops the claim and keeps the cash, while in production the payout removes both. [E19]

B. More on the fix

The patch also releases the high-water-mark hold on a fresh refill (./fix/fix.patch:147-148). HousePool sits 5 bytes under the contract size limit at the pin, so the patch also replaces a second inlined copy of the plan code in _reconcile; it ends at 24,414 bytes against a limit of 24,576 (./fix/FIX-NOTE.md:7-9, :30). The _reconcile refactor has no differential test (./fix/FIX-NOTE.md:33). The repository's own suites also cover the patched tree: 162 of 162 tests in 25 test contracts pass (./fix/runs/suites1-patched.txt:1216). The patch keeps the pin's behaviour in one case, a fresh refill joining a leftover that wipes stored Senior, because no storage rule can separate it from a genuine wipe (./fix/FIX-NOTE.md:18). In a stateful fuzz model of the LP vaults, 47 of 515 runs got stuck after the documented owner recovery on the pin, and 0 of 514 with the patch; the model fakes the wipe with a token burn and compares arms as distributions (./evidence/fuzz-regression.md, :24-27).

C. Related paths, the sibling, the second symptom and other versions

I checked twelve related paths and recorded each as run or read (./evidence/variants.md:7-18). The same freeze also appears when a winning trader is paid in cash with no recorded claim (48 of 48 revert), through the Router's settleLpEpoch, and with a 10% Senior request. The supporting runs use the repository's own token burn to make the wipe; the cash-paid run does not (./evidence/variants.md:20).

One sibling shares the root cause, a leftover whose cash has gone. Pending trading revenue, queued while both principals are zero (HousePool.sol:644-648), stays pending after a cash payout and, after a burn wipe, blocks 48 of 48 settlements, with 20,002.40 USDG pending over 5,110.40 USDG of cash (./poc/variant-revenue/runs/pin-1.txt:1044-1050). My patch leaves it (./poc/variant-revenue/runs/main-1.txt:4). ./fix/revenue-extension.patch:95-98 covers it but fails the repository test that expects activation to stay blocked (packages/perps/test/perps/spec/lp/HousePoolSeedLifecycle.t.sol:110-128); I did not ship that suite log (./fix/FIX-NOTE.md:46).

The second symptom: if a Junior request commits a reconcile first, nothing freezes, but the Senior high-water mark falls from 99,000 to 49,820 USDG and later revenue goes to Junior, 4,345.73 against Senior's 640 (./evidence/variants.md:13). In that run the claim is still unpaid during the reconciles, and the leftover drains 49,820 → 640 → 0 before the payout (./poc/runs/supporting/h13-run6.txt:118-166). That is why the patch holds the mark.

The duplicate check covered 281 rows from the program's known-issue sources and public tracker queries on 2026-11-14: "recapitalization" (9 hits; pull requests 29, 83, 121, 122 and 123 read) and four related terms, including the error name and the storage name. None describes a pending credit that outlives its cash (./evidence/duplicate_check.json:7, :16-17).

On versions: commit 6d6622f (2026-10-15) lacks recapitalizePool, which commit e711621f (2026-10-21) added, so it is unaffected (./evidence/variants.md:17). On 2026-11-15, git ls-remote https://github.com/immunefi-team/audit-comp-plether HEAD returns the pin, a82d4fefb02768e5b3bddcc97dee371eee24fea8, so there is no later upstream commit to compare.

D. Evidence index

Tag What it supports Where
E1 Expected lines, run results, control, fix runs ./poc/expected.txt:6; ./poc/release-expected.txt:6; ./poc/runs/effect-1.txt:241; ./poc/runs/control-1.txt:63-64; ./poc/runs/release/effect-1.txt:296; ./fix/runs/
E2 Fresh clone, toolchain, compile times ./poc/runs/clean-copy/exits.txt:1-11; packages/perps/foundry.toml:17
E3 What the PoC does and does not use ./poc/HuntH15.t.sol:4-5, :358-400, :94
E4 Release-parameter replay ./poc/HuntH15R.t.sol:154-180, :17-19
E5 The figures table and the log excerpt ./poc/runs/effect-1.txt:84-122, :124-136, :141-153, :158-169, :241
E6 The cap, and distributable equal to D HousePool.sol:1829-1834; HousePoolAccountingLib.sol:60-78; ./poc/runs/effect-1.txt:158-169
E7 The leftover has no cap HousePool.sol:1620-1621
E8 The double-count rule and the no-progress revert packages/perps/ACCOUNTING_SPEC.md:339-340, :303-304
E9 The mechanism in the code HousePool.sol:835-848; HousePoolReconcilePlanLib.sol:68-104; HousePoolPendingPreviewLib.sol:118-121; HousePool.sol:1183-1185; packages/perps/ACCOUNTING_SPEC.md:339-340
E10 The two-thirds threshold, the dust, the half case, the predicted cure ./poc/HuntH15.t.sol:363; ./poc/runs/control-1.txt:63-64; ./poc/runs/effect-1.txt:114; ./evidence/variants.md:9; ./poc/runs/supporting/h14-run3.txt:1097-1116; ./poc/runs/release/cure-donation-1.txt:100-112
E11 Who can trigger it, the owner's documented steps, the forced order HousePool.sol:794-820; CfdEngine.sol:219-226, :559-564, :632-653, :658-667; packages/perps/SECURITY.md:155-162, :246; ./evidence/program-rules.md:57; ./poc/runs/effect-1.txt:140, :141, :157
E12 The three conditions, maturity, the junior dust redeem ./poc/runs/effect-1.txt:72-122; ./evidence/variants.md:9-10, :21; TrancheVault.sol:894
E13 Impact figures; no way out for LPs ./poc/runs/effect-1.txt:88, :187-253, :162-169; ./poc/HuntH15.t.sol:390-395; TrancheVault.sol:894; HousePool.sol:1100-1118
E14 The program's rules as I read them ./evidence/program-rules.md:53, :56-57, :63, :43
E15 Cecuro MED-24 ./evidence/duplicate_check.json:98-103
E16 Routing of the refill to Senior HousePoolPendingPreviewLib.sol:103-107
E17 The price cap and the smaller move ./poc/runs/effect-1.txt:72; ./evidence/variants.md:15
E18 The ways out ./poc/runs/release/cure-donation-1.txt:100-105, :109-112, :146; accountExcess; ./poc/runs/release/cure-recap-1.txt:100-105; ./poc/runs/release/trade-loss-1.txt:144-150; ./poc/runs/release/trade-roundtrips-gaslimit.txt:110-115; ./poc/runs/release/trade-open-1.txt:113-118
E19 Why nothing catches it packages/perps/test/perps/accounting/waterfall/HousePoolWaterfall.t.sol:177-220; ./poc/runs/effect-1.txt:141-153
E20 The fix and its evidence ./fix/fix.patch:86-94, :96-100, :147-148, :88-93; ./evidence/variants.md:13; ./fix/poc-with-fix.txt:7-20; ./poc/runs/release/with-fix-nofreeze-1.txt:98; ./fix/HuntFix3.t.sol:4-5; ./fix/FIX-NOTE.md:23-26; ./evidence/fuzz-regression.md
E21 Known issues, SC-L1, pull request 29, MED-24, tracker searches ./evidence/duplicate_check.json:7, :16-17, :63-68, :98-103, :126, :128; ./evidence/program-rules.md:43
E22 What was re-run on the fresh clone ./poc/runs/clean-copy/exits.txt:2-11 (effect, control, release effect and control, both owner cures, trade open, trade loss, the refill-first variant, the Junior parameter check); ./poc/runs/clean-copy/effect.txt:239; ./poc/runs/clean-copy/control.txt:62
E23 A settlement between refill and payout HousePoolAccountingLib.sol:60-78 (distributable is cash minus trader claims); CfdEngine.sol:627-630 (the refill itself does not reconcile); ./poc/runs/supporting/h13-run6.txt:118-166 (burn wipe, claim 49,820 against a 99,000 refill: reconcile 1 credits Senior 49,180 and leaves 49,820 pending; reconciles 2 and 3 drain it to 640 and 0; the payout then leaves Senior 49,180 backed by 49,180 of cash)
E24 What the owner sees; what the docs say ./poc/runs/effect-1.txt:158-169; packages/perps/ACCOUNTING_SPEC.md:303-304; `packages/perps/SEC

The original report as published on Immunefi, by Pleiades. Images and videos are our own copies; raw HTML is shown as text. View it on Immunefi.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the pending recapitalization is not reduced when cash is paid out to a trader, so a leftover with no cash behind it blocks settlements.

Impact

Senior LPs cannot withdraw 29,957.08 USDG that sits in the pool and is booked as their principal, and the freeze is not permanent but needs an outside action to end.

What the attacker needed

A total loss wipes both LP groups; owner refills the pool; trader collects a large claim; a Senior LP files a redemption request

The fix

The patch caps the leftover at the pool cash that is not distributable, so a leftover may wait behind cash in the pool, not behind cash that has left.

How it was found

  1. A price path wipes out both LP groups, leaving the pool with almost no cash and a trader claim.
  2. The owner refills the pool with recapitalizePool, which records the amount as pending recapitalization.
  3. The trader collects the claim from that cash, leaving less cash than the pending amount.
  4. The next reconcile credits Senior only with the remaining cash and carries the rest forward as pending.
  5. A Senior LP files a redemption request that matures and cannot be cancelled.
  6. Every settleLpEpoch call reverts with HousePool__NoLpEpochProgress, freezing the funds.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

Liquidity providers put money into a pool. After a wipeout, the owner adds money back, but a trader takes a big payout from it. The pool's records still say the full refill is owed to the Senior providers, so when they try to withdraw, the system cannot pay and keeps failing.

What is Business logic?

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.

More from Plether

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Business logic flaws

The lesson behind this report.

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.