Skip to content
Business logic Audit finding Advanced

Reserve-backed negative VPI is excluded from Junior deposit pricing, letting a new LP capture existing LP principal

The Junior LP share price is calculated from HousePool cash that excludes a negative-VPI rebate reserve already funded and held in the clearinghouse, so a new LP depositing while that reserve is outstanding buys shares too cheaply. When the position closes and the reserve returns to the pool, the new LP shares in a recovery funded by earlier LPs, letting the attacker capture value from existing Junior principal.

manvi Follow

Originally disclosed on Immunefi

Critical View original
  • Disclosed after under an hour

#99577 [SC-Critical] Reserve-backed negative VPI is excluded from Junior deposit pricing, letting a new LP capture existing LP principal

Submitted on Nov 14th 2026 at 10:28:19 UTC by @manvi for Audit Competition | Plether

Description

Brief / Introduction

I found a way to take value from existing Junior LPs by depositing while a negative-VPI rebate is outstanding. The rebate has already been paid out of HousePool cash, and the trader is required to lock the matching amount in a protected clearinghouse reserve. The reserve will be collected back from that position when the negative lifetime VPI is settled. Yet the reserve is absent from the NAV used to price new Junior shares.

That creates a short window in which an incoming LP receives more shares than it would receive if the already-funded recovery were recognized. When the position closes, the clearinghouse returns the reserved USDG to HousePool. The recovery is then shared with the new LP, even though the original LPs funded the rebate before the new LP joined.

I reproduced this at an unchanged Pyth price of 1.00, using normal V3 order submission and LP epochs. The attack and control open the same skew-reducing short at the same pool depth. Both create exactly 2,599.121038 USDG of negative VPI and lock exactly that amount as a reserve. In the attack, I let the LP deposit settle before the short closes. In the control, I close the short and recover the reserve before settling that same deposit. The only deliberate change is whether the new shares are priced before or after recovery of the outstanding reserve.

In the one-cycle comparison, the attacker gains 2,214.814920 USDG relative to control and the passive Junior LPs lose 2,214.814929 USDG relative to control. I also redeemed the same passive Junior shares in both branches. They received 221.481493 USDG less in real cash in the attack branch. The close emitted the clearinghouse AssetSeized event for actual USDG returned to HousePool; I checked that transfer against the protected reserve rather than relying only on NAV estimates.

Finally, I created the initial skew with the attacker's own long and repeated the cycle eight times. After including that long's opening and closing costs, the attacker finishes 8,032.720068 USDG ahead, while the passive Junior LPs' redeemable position value falls by 17,426.592038 USDG. No change in the oracle price, administrative action during exploitation, or cooperation from another trader is needed.

Vulnerability Details

1. A skew-reducing open sends cash out of HousePool before the position is closed

A trader can open a short against an outstanding long skew. That reduces aggregate skew, so OpenAccountingLib computes a negative VPI. CfdEnginePlanLib turns the negative net trade cost into a pool rebate payout:

Solidity
delta.poolRebatePayoutAssets =
    openState.tradeCostAssets < 0 ? uint256(-openState.tradeCostAssets) : 0;

CfdEngineSettlementSidecar.executeOpen() then executes the payout using HousePool.payOut(). HousePool.payOut() subtracts the transferred amount from accountedAssets and transfers USDG to the clearinghouse. Opening fees are handled separately within settlement, so the gross VPI and the immediate net rebate transfer should not be confused. In my test the combined result is a 2,599.127382 USDG fall in Junior NAV while the short's accrued VPI is -2,599.121038 USDG. The small difference is unrelated settlement accounting.

The consequence for LP entry pricing is that HousePool's live physical cash and reconciled Junior principal have already fallen before the new shares are minted.

2. The same negative-VPI obligation is fully reserved in the clearinghouse

At open, CfdEnginePlanLib sets the reserve target to the negative portion of the position's lifetime VPI. The sidecar then locks the reserve through MarginClearinghouse.lockVpiRebateReserve() or reclassifies already locked pledge. The reserve sits in the vpiRebateReserveBalances sub-ledger and is not available for withdrawal or unrelated action charges.

For the matched opening in both branches I observed:

Text
short lifetime VPI after open (atoms) -2599121038
vpiRebateReserve while open (atoms) 2599121038

The trader cannot simply withdraw the rebate and walk away. This is already funded value, held against a specific open-position settlement obligation, rather than a speculative VPI amount that the trader might owe in the future.

3. Full closing collects the reserve, but the recovery reaches a different LP cohort

CloseAccountingLib enforces the lifetime clamp:

Solidity
if (state.proportionalAccrualAssets + state.vpiDeltaAssets < 0) {
    state.vpiDeltaAssets = -state.proportionalAccrualAssets;
}

On a full close of the negative-VPI position, that rule prevents the trader from keeping a net negative lifetime VPI balance. CfdEngineSettlementSidecar consumes the protected reserve, and MarginClearinghouse.consumeVpiRebateReserve() transfers the USDG to HousePool and emits AssetSeized.

I read that event from the clearinghouse address and checked the trader, USDG token, amount, and HousePool recipient. For the attack branch:

Text
FINAL physical USDG recovered by HousePool (atoms) 2599121038
FINAL negative VPI reserve before close (atoms) 2599121038

The full reserve is actually paid back to the pool. The tested short closes with zero remaining reserve. In the control branch the close can collect slightly more than the original reserve because its close-time economics differ; the event records 2,601.196218 USDG returned against the same 2,599.121038 USDG opening reserve.

4. Junior deposit pricing ignores the amount held for that recovery

HousePool.totalAssets() counts USDG held by HousePool, not USDG held in the clearinghouse's protected negative-VPI sub-ledger. CfdEngineProtocolLens.getHousePoolInputSnapshot() supplies those physical pool assets and the terminal mark-price adjustment. HousePoolAccountingLib.buildReconcileSnapshot() then determines distributable LP equity from physical assets, trader claims, and the signed terminal price delta. There is no corresponding asset entry for the reserved negative-VPI recovery.

TerminalNavBookV2 likewise constructs its position valuation from lots, entry cost, and a collectible cap; it does not add vpiRebateReserveAssets to LP valuation. At HousePool._settleLpEpoch(), reconciliation writes the depressed value to juniorPrincipal, and the Junior deposit phase uses that principal as the share-pricing numerator:

Solidity
juniorDepositPhase.pricingAssets = juniorPrincipal;
juniorDepositPhase.pricingSupply = _juniorShareSupply();

The cash is absent from current LP equity when the entrant's shares are calculated, despite the protected account-level backing for its recovery. Once the short closes and the cash returns, the new shares participate in it. The existing Junior LPs end up with a smaller percentage of a recovery funded before the new LP joined.

5. The attack uses ordinary LP epochs and permissions

The entire sequence uses the released asynchronous LP process:

Stage Action
Before the epoch cutoff The new Junior LP requests a deposit. A long position already establishes the skew.
Before deposit pricing The attacker's short opens against that skew, receives negative VPI, and locks the matching reserve.
Epoch settlement Attack: settle the LP deposit while the reserve is outstanding. Control: close the short and recover the reserve first, then settle the deposit.
After deposit activation In the attack, close the short, returning the reserved USDG after the new Junior shares are issued.
After cooldown and the next funding epoch Redeem the attacking LP's shares and collect USDG.

The test calls the ordinary OrderRouter.commitOrder(OrderV3Types.OrderRequest), executeOrder, updateMarkPrice, settleLpEpoch, and tranche request/claim functions. The keeper actions are permissionless. The owner-side configuration in setUp() only applies the published Senior-cap parameters to the test fixture; the attacker does not need the owner to act during the sequence.

Impact Details

The loss is to the existing Junior LPs' principal value. It is not a trader-only VPI rebate, not a hypothetical claim, and not limited to unclaimed yield. The attacker owns both the short and the incoming Junior LP position, so the value captured through share pricing offsets trading charges and can leave the passive Junior cohort worse off.

Matched one-cycle comparison

Both branches start from the same checkpoint and open with the same 2,599.121038 USDG negative VPI. The opening reserve is also identical. The difference is the timing of the short's close relative to the deposit's pricing.

Result Deposit priced before reserve recovery (attack) Reserve recovered before deposit pricing (control)
Opening negative VPI -2,599.121038 -2,599.121038
VPI reserve at short close 2,599.121038 2,599.121038
Physical USDG returned to HousePool 2,599.121038 2,601.196218
Attacker PnL +1,130.627790 -1,084.187130
Passive Junior PnL -2,239.467136 -24.652207
Passive Junior cash received for the same redeemed shares 74,754.698817 74,976.180310

The attack-versus-control PnL shift is +2,214.814920 USDG to the attacker and -2,214.814929 USDG to the passive Junior LPs. The nine-atom difference is rounding-level. For the separately redeemed slice of passive shares, the actual payout difference is 221.481493 USDG. I do not equate that smaller slice with the full cohort's marked loss.

Four-cycle attack and control

Four cycles, 4.25 million USDG attacking Junior LP Attack Control
Attacker cumulative PnL +4,537.225587 -4,336.866036
Passive Junior cumulative PnL -8,973.630741 -99.539109

The incremental value transfer is 8,874.091623 USDG to the attacker, compared with 8,874.091632 USDG less value for the passive Junior LPs. Each attack cycle independently asserts that the short earned negative VPI, that the full negative accrual was reserved, that the short's close recovered the required amount, and that the attacking coalition made a profit. The control trades lose money instead.

Self-contained eight-cycle attack

I also removed dependence on a pre-existing honest skew by creating the long through a second attacker-controlled trader account. I kept that long open for the full sequence, ran eight negative-VPI entry cycles, and closed it at the end. The final figures include that long's opening and closing costs:

Eight-cycle result USDG
Attacker net PnL, including the long +8,032.720068
Passive Junior change in redeemable position value -17,426.592038
Passive Junior's starting capital 750,000.000000
Loss relative to that starting capital about 2.32%

These numbers come from a constant-price test under the release fee and risk parameters. The attacker must supply the LP capital and trader margin, but does not depend on moving the oracle price or having somebody else open the initial skew.

Trader-only control

Without the Junior LP entry, the same negative-VPI short round trip loses 1,042.683150 USDG after charges and leaves honest Junior slightly positive (+1.723447 USDG). The attacker profit therefore does not come merely from claiming the negative VPI as a trader. It requires buying Junior shares in the interval when the reserve exists but has not yet been reflected in entry pricing.

Why this is not the previously documented VPI liquidity-depth issue

The prior VPI depth issue concerns manipulating liquidity around a skew-reducing close to change the rebate computed by the curve. My test does not need to increase the curve rebate. The opening negative VPI and the protected reserve are identical in the matched attack/control branches. The attack is successful because the LP deposit is priced before the reserved cash comes back to the pool, while the control prices the deposit after that cash is recovered. The observed PnL shift is almost exactly equal and opposite between the attacker and passive Junior LPs.

This is also a different settlement path from the positive-VPI LP exit issue: that case involves recognizing a refundable positive charge as redeemable LP equity and withdrawing before the trader's rebate. Here the pool has already paid a negative-VPI rebate, and the clearinghouse holds a dedicated, nonwithdrawable reserve for the return. The attacker deposits before the reserved recovery is reflected in LP pricing. Correcting the positive side by deferring revenue or deducting refundable positive accrual does not, by itself, add this negative reserve to Junior deposit valuation.

The accounting documents explain that anticipated VPI is kept out of terminal price-PnL calculations. The issue here is narrower: the negative-VPI rebate has already moved real USDG out of HousePool and a precisely sized reserve has already been funded. This is not an attempt to capitalize a speculative future fee. It is an existing funded settlement balance whose recovery changes which Junior LP cohort owns the value. The matched-timing cash withdrawals show the result rather than relying only on that accounting interpretation.

Suggested Remediation

I would keep the negative-VPI reserve segregated and nonwithdrawable, but make sure its backed recovery is assigned to the LP cohort that funded the rebate when new shares are priced. One approach is to expose the aggregate recoverable negative-VPI reserve in the authenticated accounting snapshot and recognize it as a pricing receivable, without counting it as HousePool free cash or increasing redemption funding capacity before the transfer occurs. The receivable must be released exactly once as the reserve is consumed or otherwise settled, so it is never counted twice.

An alternative is to retain the funded rebate as a separately attributed pending settlement balance rather than remove it from LP-owned equity at open, then account for the actual transfer when the position settles. Either approach needs to preserve the existing trader reserve protection, mark-price terminal liabilities, and the Junior/Senior waterfall. Merely increasing the redemption cash budget would not correct the share-price dilution.

References

Proof of Concept

I wrote a Foundry PoC and placed the complete Solidity file at:

packages/perps/test/perps/insight/Cohort_negvpimirror_MatchedTiming.t.sol

The test inherits the repository's existing BasePerpTest fixture and uses direct V3 Router order submissions, actual LP epoch requests, claims and settlement, and actual clearinghouse transfers. I did not change any contract under packages/perps/src. The test fixture supplies USDG and signed Pyth updates, as permitted by the competition. The price remains fixed at 100000000 (1.00) throughout.

I used the release-style parameters: VPI factor 1%, maximum skew 40%, maintenance margin 0.1%, initial margin 0.2%, FAD margin 3%, execution fee 4 bps, Senior cap 40 million USDG and Senior share cap 80%. I funded 750,000 USDG of passive Junior liquidity and 2.5 million USDG of passive Senior liquidity. The attacker uses a 4.25 million USDG Junior deposit and funded trader accounts. Time advances only to satisfy the normal one-hour LP epoch, request cutoff and cooldown rules.

Reproduction Steps

  1. Set up the pool with the stated release parameters. Open the initial long to create the required skew.
  2. Record a checkpoint. In the attack branch, request the attacking Junior deposit and open a matching skew-reducing short before the deposit is priced. Confirm negative VPI, the matching clearinghouse reserve, and the decline in Junior NAV.
  3. Settle the LP epoch while the negative-VPI reserve is still outstanding, then claim the attacking LP shares. Close the short and confirm that the actual reserve is transferred to HousePool.
  4. After the cooldown, request and claim the attacking Junior redemption. Record attacker and passive Junior balances.
  5. Restore the checkpoint and run the control with the same short opening and reserve. This time, close the short and recover the reserve before the Junior deposit is priced. Complete the same LP exit and record balances.
  6. Redeem an identical slice of the passive Junior LP's shares in both branches. Compare the actual USDG received, not just the NAV quote.
  7. Repeat the comparison for four cycles. Separately, create the long through an attacker-controlled account and run eight cycles, then close the long and check final net attacker PnL.
  8. Confirm that all four tests pass and that packages/perps/src has no changes.

Complete Solidity PoC Source

Save as: packages/perps/test/perps/insight/Cohort_negvpimirror_MatchedTiming.t.sol

Solidity
// SPDX-License-Identifier: AGPL-3.0
pragma solidity 0.8.35;

import {BasePerpTest} from "../BasePerpTest.sol";
import {CfdTypes} from "@plether/perps/CfdTypes.sol";
import {ICfdEngineTypes} from "@plether/perps/interfaces/ICfdEngineTypes.sol";
import {OrderV3Types} from "@plether/perps/OrderV3Types.sol";
import {Vm} from "forge-std/Vm.sol";
import {console2} from "forge-std/console2.sol";

/// @notice Negative-VPI reserve-window Junior LP entry PoC.
///         A skew-reducing open earns a VPI rebate V that HousePool pays out of LP cash immediately, so Junior NAV
///         drops by V. The trader must lock V in a protected vpiRebateReserve, and the lifetime clamp
///         (CloseAccountingLib: proportionalAccrual + closeVpi >= 0) GUARANTEES that the position's close (or
///         liquidation) returns at least V to the pool. NAV however excludes that guaranteed receivable, so the
///         Junior share price is temporarily depressed by V. An attacker LP that DEPOSITS while the reserve is
///         outstanding buys Junior at the depressed price; when the attacker's trader closes, V flows back and is
///         shared pro rata, so the attacker LP captures f*V of value that belonged to the pre-existing Junior LPs.
///         The attacker trader's VPI nets to zero (rebate V, clawback V), so the coalition profit is f*V - fees.
///
///         Production entrypoints only; constant honest Pyth price 1.00; release risk params and Senior caps.
contract CohortNegVpiMatchedTimingPoC is BasePerpTest {

    uint256 internal constant PRICE = 1e8;
    uint256 internal constant LOT = 1e20; // 100 USDG notional at PRICE

    address internal constant HLONG = address(0x40E57); // honest trader holding the pre-existing long skew
    address internal constant ALONG = address(0xA7700); // attacker long (variant: attacker manufactures the skew)
    address internal constant TRADER = address(0xA7701); // attacker short: earns the skew-reducing rebate
    address internal constant ALP = address(0xA7704); // attacker Junior LP
    address internal constant KEEPER = address(0xA7705); // attacker keeper

    uint256 internal constant HONEST_JUNIOR = 750_000e6;
    uint256 internal constant HONEST_SENIOR = 2_500_000e6;

    uint256 internal nextClientOrderId = 1;
    uint256 internal attackerIn;
    uint256 internal longLots;

    struct CycleOut {
        uint256 f;
        int256 vpiOpen; // lifetime VPI of the short after its open (negative = rebate)
        uint256 reserve; // vpiRebateReserve held while open
        int256 juniorNavOnOpen; // Junior NAV change from the rebate open
        int256 closeVpi; // close VPI delta applied (positive = charge / clawback)
        int256 juniorNavOnClose; // Junior NAV change from the close
        uint256 lpRedeemed;
    }

    function _riskParams() internal pure override returns (CfdTypes.RiskParams memory) {
        return 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 HONEST_JUNIOR;
    }

    function _initialSeniorDeposit() internal pure override returns (uint256) {
        return HONEST_SENIOR;
    }

    function setUp() public override {
        super.setUp();
        _setSeniorCapacity(40_000_000e6, 8000);
        assertEq(engine.executionFeeBps(), 4, "release exec fee");
        vm.warp(SETUP_TIMESTAMP + 7 days); // Monday 10:00 UTC
        vm.roll(vm.getBlockNumber() + 1);

        _mintAttacker(TRADER, 400_000e6);
        vm.startPrank(TRADER);
        settlementToken.approve(address(clearinghouse), type(uint256).max);
        clearinghouse.deposit(TRADER, 400_000e6);
        vm.stopPrank();
        vm.prank(ALP);
        settlementToken.approve(address(juniorVault), type(uint256).max);
        _fundTrader(HLONG, 400_000e6);
    }

    // Direct V3 Router submission, using the same permissive execution bounds
    // the repository's legacy test adapter generates. The next public call is
    // router.commitOrder, executed as the actual trader.
    function _commitV3(
        address trader,
        CfdTypes.Side side,
        uint256 sizeDelta,
        uint256 marginDelta,
        bool isClose
    ) internal returns (uint64 orderId) {
        uint32 window = uint32(router.maxExecutionWindowSeconds());
        uint256 targetPrice = ((side == CfdTypes.Side.LONG) == isClose)
            ? type(uint256).max : 1;
        OrderV3Types.OrderRequest memory req = OrderV3Types.OrderRequest({
            clientOrderId: bytes32(nextClientOrderId++),
            side: side,
            sizeDelta: sizeDelta,
            marginDelta: marginDelta,
            targetPrice: targetPrice,
            isClose: isClose,
            bounds: OrderV3Types.ExecutionBounds({
                submitBy: uint64(_now()) + uint64(window),
                executionWindowSeconds: window,
                allowedExecutionModes: 7,
                expectedConfigHash: router.lifecycleBook().currentExecutionConfigHash(),
                maxExecutionBountyAssets: type(uint256).max,
                maxExecutionNotionalAssets: type(uint256).max,
                maxGrossAccountDebitAssets: type(uint256).max,
                maxActionChargeAssets: type(uint256).max,
                maxExplicitFeesAssets: type(uint256).max,
                maxPostPositionSize: type(uint256).max,
                minPostSettlementBalanceAssets: 0,
                minPostPositionEquityAssets: 0,
                maxPostLeverageBps: type(uint32).max
            })
        });
        vm.prank(trader);
        orderId = router.commitOrder(req);
        assertGt(orderId, 0, "direct V3 commit failed");
    }

    // ---------------------------------------------------------------- helpers

    function _now() internal view returns (uint256) {
        return vm.getBlockTimestamp();
    }

    function _warpTo(
        uint256 t
    ) internal {
        vm.warp(t);
        vm.roll(vm.getBlockNumber() + 1);
    }

    function _nextEpochStart() internal view returns (uint256) {
        return (_now() / 1 hours + 1) * 1 hours;
    }

    function _mintAttacker(
        address a,
        uint256 amt
    ) internal {
        settlementToken.mint(a, amt);
        attackerIn += amt;
    }

    function _settle() internal {
        bytes[] memory upd = _mockPythUpdateData(PRICE);
        vm.prank(KEEPER);
        router.settleLpEpoch(upd);
    }

    function _pokeMark() internal {
        bytes[] memory upd = _mockPythUpdateData(PRICE);
        vm.prank(KEEPER);
        router.updateMarkPrice(upd);
    }

    function _executeHead() internal {
        uint64 id = router.nextExecuteId();
        bytes[] memory upd = _mockPythUpdateData(PRICE);
        vm.prank(KEEPER);
        router.executeOrder(id, upd);
    }

    function _netDepth() internal view returns (uint256) {
        return pool.totalAssets() - engine.totalTraderClaimBalanceAssets();
    }

    function _attackerValue() internal view returns (uint256 v) {
        address[4] memory all = [TRADER, ALP, KEEPER, ALONG];
        for (uint256 i = 0; i < 4; ++i) {
            v += settlementToken.balanceOf(all[i]);
            v += clearinghouse.balanceAssets(all[i]);
            v += engine.traderClaimBalanceAssets(all[i]);
        }
        v += juniorVault.convertToAssets(juniorVault.balanceOf(ALP));
    }

    function _attackerPnl() internal view returns (int256) {
        return int256(_attackerValue()) - int256(attackerIn);
    }

    function _honestJuniorValue() internal view returns (uint256) {
        return juniorVault.convertToAssets(juniorVault.balanceOf(address(this)));
    }

    function _openLong(
        address who
    ) internal {
        longLots = (_netDepth() * 4 / 10) / 100e6 - 1;
        _commitV3(who, CfdTypes.Side.LONG, longLots * LOT, 60_000e6, false);
        _executeHead();
        (uint256 sz,,,,,,) = engine.positions(who);
        assertEq(sz, longLots * LOT, "long filled");
    }

    function _closeLong(
        address who
    ) internal {
        _commitV3(who, CfdTypes.Side.LONG, longLots * LOT, 0, true);
        _executeHead();
        (uint256 sz,,,,,,) = engine.positions(who);
        assertEq(sz, 0, "long closed");
    }

    /// @dev Attacker short of the same size as the standing long: skew -> 0, VPI rebate paid from pool cash.
    function _openRebateShort() internal returns (int256 vpi, int256 navDelta) {
        int256 j0 = int256(juniorVault.totalAssets());
        _commitV3(TRADER, CfdTypes.Side.SHORT, longLots * LOT, 60_000e6, false);
        _executeHead();
        (uint256 sz,,,,,, int256 acc) = engine.positions(TRADER);
        assertEq(sz, longLots * LOT, "short filled");
        vpi = acc;
        navDelta = int256(juniorVault.totalAssets()) - j0;
    }

    function _closeShort() internal returns (int256 closeVpi, int256 navDelta) {
        _commitV3(TRADER, CfdTypes.Side.SHORT, longLots * LOT, 0, true);
        ICfdEngineTypes.ClosePreview memory p = engineLens.previewClose(TRADER, longLots * LOT, PRICE);
        assertTrue(p.valid, "close preview valid");
        closeVpi = p.vpiDeltaAssets;
        // Check the actual clearinghouse-to-HousePool settlement transfer,
        // not merely a net LP NAV preview delta.
        uint256 reserveBefore = clearinghouse.vpiRebateReserveAssets(TRADER);
        assertGt(reserveBefore, 0, "VPI reserve absent before short close");
        int256 j0 = int256(juniorVault.totalAssets());
        vm.recordLogs();
        _executeHead();
        Vm.Log[] memory entries = vm.getRecordedLogs();
        uint256 cashRecoveredByPool;
        bytes32 assetSeizedSig = keccak256("AssetSeized(address,address,uint256,address)");
        for (uint256 i; i < entries.length; ++i) {
            Vm.Log memory entry = entries[i];
            if (e

The original report as published on Immunefi, by manvi. 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 LP equity snapshot used for Junior deposit pricing counts only physical HousePool cash and omits the clearinghouse's protected negative-VPI rebate reserve, which is a funded receivable owed back to the pool.

Impact

The attacker could shift value from passive Junior LPs, gaining about 2,214 USDG over control in one cycle and about 8,032 USDG net across eight self-contained cycles, while passive Junior redeemable value fell by roughly 17,426 USDG; the figures come from a constant-price test under release parameters.

What the attacker needed

Attacker supplies Junior LP capital; attacker funds trader margin; skew exists or attacker creates it; no oracle movement needed

The fix

The aggregate recoverable negative-VPI reserve should be exposed in the authenticated accounting snapshot and recognised as a pricing receivable, released exactly once as the reserve is consumed, without counting it as free cash or redemption capacity.

How it was found

  1. Set up the pool with the stated release parameters and open an initial long to create the required skew.
  2. Request the attacking Junior deposit and open a matching skew-reducing short before the deposit is priced, confirming negative VPI, the matching reserve and the Junior NAV decline.
  3. Settle the LP epoch while the reserve is outstanding, claim the attacking shares, then close the short and confirm the reserve is transferred to HousePool.
  4. After the cooldown, request and claim the attacking Junior redemption and record balances.
  5. Restore the checkpoint and run the control, closing the short and recovering the reserve before the deposit is priced, then complete the same LP exit.
  6. Redeem an identical slice of passive Junior shares in both branches and compare the actual USDG received.

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.

A pool lets people put money in and get shares representing their slice of the pool. When a trader's position creates a rebate, the pool pays cash out but the trader must lock the same amount in a side account that will be returned later. The share price ignores that locked money, so someone joining at that moment pays too little per share and later takes part of the returned cash that belonged to the earlier depositors.

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 by manvi

View all

26 more disclosed reports, best first.

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.