Skip to content
Business logic Audit finding Advanced

Junior LP exit is priced on a refundable VPI charge and takes remaining LPs' principal

A positive VPI charge from a skew-increasing open is booked as arrived revenue and credited to Junior principal, but it is refundable to the trader on close. A Junior LP can therefore redeem at a price that includes the refundable charge, leaving remaining LPs to absorb the rebate when the trader closes.

ChaseTheLight Follow

Originally disclosed on Immunefi

Critical View original
  • Disclosed after under an hour

#99964 [SC-Critical] Junior LP exit is priced on a refundable VPI charge and takes remaining LPs' principal

Submitted on Nov 15th 2026 at 22:31:14 UTC by @ChaseTheLight for Audit Competition | Plether

Description

Brief/Intro

A positive VPI charge is a trader prepayment. A close at the same skew generates a rebate of up to the whole positive accrual, paid to the extent free pool cash is available; any unfunded portion is waived (ACCOUNTING_SPEC.md:1061-1063). CloseAccountingLib floors lifetime VPI at zero, which is what makes the whole accrual reclaimable (CloseAccountingLib.sol:112-118, CfdEngineSettlementSidecar.sol:621-624), and the specification states the rule for the mirror quantity outright: a VPI reserve "cannot be extracted by LPs before its account obligation settles" (ACCOUNTING_SPEC.md:821-822). That reserve exists only on the negative side, and it is held against the trader's own collateral.

On the positive side the charge is booked as arrived revenue the moment the open executes (CfdEngineSettlementSidecar.sol:454-464), the waterfall credits it to Junior principal whenever Senior sits at its high-water mark (HousePoolWaterfallAccountingLib.sol:140-159), and LP epoch settlement then prices Junior redemptions on that same storage slot five lines after the reconcile that credited it (HousePool.sol:835, :840-841). No liability bucket for the pending refund exists anywhere in pool accounting: neither the terminal-NAV snapshot nor the withdrawal reserve carries a VPI term (HousePoolAccountingLib.sol:46-55, :60-78). So a Junior LP can request a redemption while a skew-increasing position is open, settle the epoch through OrderRouter.settleLpEpoch, which is permissionless and payable (OrderRouter.sol:479-484), and claim real settlement token at a price containing a refund it will not fund.

When the trader closes at the same mark, the rebate is paid out of pool cash (CfdEngineSettlementSidecar.sol:621-624) and the next reconcile absorbs it from Junior principal first (HousePoolWaterfallAccountingLib.sol:167-184), from the holders who stayed. The exiting LP's shares are already burned and the settlement token is already in its wallet (TrancheVault.sol:1211).

The attacker is not a privileged party and does not need anyone's cooperation: it buys into the Junior tranche through the vault's ordinary asynchronous deposit, waits the one hour cooldown, and redeems, and the charge sits in the tranche's equity against a one hour LP epoch, so there is no block to win and no trade to foresee.

The proof of concept runs locally and offline, in process inside a network namespace whose only interface is loopback, with nothing dialled, signed or broadcast (Proof of Concept). The 2026-11-15 run passes both measurements against the audited source at the pinned commit, and the Proof of Concept section carries the figures the capture printed.

Vulnerability Details

Root cause

The open side folds the signed VPI charge into trade cost and loses the distinction between the refundable part and the non-refundable fee. OpenAccountingLib.sol:135:

Solidity
        state.tradeCostAssets = state.vpiAssets + int256(state.executionFeeAssets);

CfdEngineSettlementSidecar.executeOpen then books the whole non-fee remainder as revenue that has already arrived in cash (:454-464):

Solidity
        if (delta.tradeCostAssets > 0) {
            uint256 poolCashInflowAssets = uint256(delta.tradeCostAssets) - protocolFeeCreditedAssets;
            if (poolCashInflowAssets > 0) {
                IHousePool(host.pool())
                    .recordClaimantInflow(
                        poolCashInflowAssets,
                        IHousePool.ClaimantInflowKind.Revenue,
                        IHousePool.ClaimantInflowCashMode.CashArrived
                    );
            }
        }

ClaimantInflowKind.Revenue is distributable. The waterfall restores any Senior high-water-mark deficit and credits the whole remainder to Junior (HousePoolWaterfallAccountingLib.sol:140-159), so with Senior whole, which is the ordinary state, the next reconcile raises juniorPrincipal by the entire charge:

Solidity
        if (nextState.seniorPrincipal > nextState.seniorHighWaterMark) {
            nextState.seniorHighWaterMark = nextState.seniorPrincipal;
        }

        nextState.juniorPrincipal += remaining;

HousePool._settleLpEpoch reconciles and then takes the Junior redemption price from that slot in the same call (:835, :840-841):

Solidity
        _reconcile(accountingSnapshot, statusSnapshot);
        _checkpointEngineCarryIndexes();

        result.cutoffEpoch = cutoffEpoch;
        RedemptionPhase memory juniorPhase;
        juniorPhase.pricingPrincipal = juniorPrincipal;

pricingPrincipal is the numerator the redemption sidecar divides by share supply, both for the full head quote and for the partial-funding quote (:957-959, :992-1000). The ordering is the defect: the credit arrives, and five lines later it is the price a leaver is paid at.

The refund then lands on whoever is still there. The close returns up to the whole accrual because the lifetime clamp is written to permit exactly that (CloseAccountingLib.sol:112-118):

Solidity
        // Clamp so lifetime VPI (accrued + delta) never goes negative. Prevents LP sandwich attacks
        // where an attacker opens at high depth, reduces pool depth, then closes to extract a
        // net-negative lifetime VPI rebate. This rule is identical in live and oracle-frozen markets; frozen-market
        // stale-price risk is priced separately through frozenSpreadAssets.
        if (state.proportionalAccrualAssets + state.vpiDeltaAssets < 0) {
            state.vpiDeltaAssets = -state.proportionalAccrualAssets;
        }

The rebate is paid from pool cash to the clearinghouse (CfdEngineSettlementSidecar.sol:621-624) and the resulting loss is absorbed Junior first, Senior second (HousePoolWaterfallAccountingLib.sol:167-184). The holders who stayed therefore fund the whole of a refund they previously shared pro rata with the leaver.

What the code reserves, and what it leaves unreserved

The project reserves the mirror quantity and says so in its own security notes: "gross negative lifetime VPI is backed by a dedicated nonwithdrawable reserve equal to max(-vpiAccrued, 0)" (SECURITY.md:866-867). That reserve is implemented as _negativeVpiReserveTarget (CfdEngineSettlementSidecar.sol:373-379), it is a lock on the trader's collateral rather than a pool liability, and it is inert while lifetime VPI is positive.

negative lifetime VPI positive lifetime VPI
Who will owe the value later the trader the pool
Is a reserve held yes, max(-vpiAccrued, 0), nonwithdrawable no
Can an LP exit holding the value no, the specification forbids it at ACCOUNTING_SPEC.md:821-822 yes, it is priced into pricingPrincipal
Where the value sits meanwhile locked collateral at the clearinghouse juniorPrincipal, distributable

Both halves of a signed, reversible charge are treated as final in the direction that favours the party who can leave. The second column is settled at the three quantities that produce a redemption price rather than at the point one is consumed. The terminal book's distributable is physicalAssets plus the signed terminal delta minus trader claims (HousePoolAccountingLib.sol:60-78). The withdrawal reserve's base is maxLiabilityAssets + traderClaimBalanceAssets + supplementalReservedAssets (:46-55), and its supplemental term is a basis-point share of maxLiabilityAssets and nothing else, at both of its two call sites (HousePool.sol:1252-1253 and CfdEngineProtocolLens.sol:67-69, into libraries/SolvencyAccountingLib.sol:77-85). And vpiAccrued occurs in TerminalNavBookV2.sol exactly once, in a locally declared engine-view interface at :28, and in none of its arithmetic. No pending-refund term exists in any of the three.

Trigger and preconditions

The firing state, in the protocol's own terms: a positive VPI charge from a skew-increasing open is outstanding and unreserved, that position is still open when the epoch carrying the attacker's Junior redemption request settles, Senior is at its high-water mark so the whole charge lands on Junior, and free pool cash covers the exit.

What is attacked is the shared pool's Junior tranche, specifically the Junior LP shares held by somebody other than the attacker, and behind them the Senior tranche, which absorbs the remainder once Junior principal is exhausted (HousePoolWaterfallAccountingLib.sol:167-184).

The attacker occupies its position by its own act, and that is the whole precondition. It joins the tranche later, through TrancheVault.requestDeposit (:562, :569), waits for the deposit epoch to activate, claims shares with claimDeposit (:968), waits the one hour DEPOSIT_COOLDOWN (TrancheVault.sol:38, enforced at :617), and requests redemption of its whole balance (:606-631). The minimum deposit is 1 USDG (HousePool.sol:176) and the size is the attacker's choice, which is what sets its share of the charge. No invitation, no allowance, no counterparty consent, and no privilege at any step.

A co-holder always exists while trading is live, by protocol invariant rather than by survey. activateTrading cannot be called until both tranche seeds are initialized (HousePool.sol:532-536), seed shares are permanently non-redeemable and non-transferable below the floor (TrancheVault.sol:322, :1630-1637), and Senior is capped at 80% of the pool (DEPLOYMENT.md:155). So on any pool with trading active there is at least one Junior holder other than the attacker, and when Junior equity is thin the shortfall reaches Senior. The release seed is 1 USDG (DEPLOYMENT.md:156, :249), so the seed holder alone is a dust-sized counterparty: the magnitude of the transfer scales with the other holders' share of the tranche, which the programme's own rule makes an amount question rather than an impact question.

The one step that is caller-restricted is open to any caller. With open positions and a live oracle, HousePool.settleLpEpoch admits only the Router, only with the Engine's exact current mark, and only with a publish time inside the current epoch (HousePool.sol:809-819):

Solidity
        if (accountingSnapshot.hasOpenPositions && !statusSnapshot.oracleFrozen) {
            if (
                msg.sender != ENGINE.orderRouter() || ENGINE.lastMarkPrice() != expectedMarkPrice
                    || statusSnapshot.lastMarkTime != expectedPublishTime
            ) {
                revert HousePool__Unauthorized();
            }

OrderRouter.settleLpEpoch(bytes[]) is permissionless and payable (OrderRouter.sol:479-484), and the logic it delegates to installs that exact mark on the Engine and then calls the pool in the same frame (router/OrderLiquidationBatchLogic.sol:549-581), so it satisfies all three conditions on behalf of whoever calls it. The order side is the same: commitOrder (OrderRouter.sol:85-90) and executeOrder (:240-247) are both open calls, and the programme's scope statement puts this surface in scope explicitly, since keepers hold no special privileges and anyone may execute orders and price updates.

The programme's own active-features statement puts the in-scope code on Arbitrum One with USDG as the settlement token, and every parameter the state depends on is at the release value the programme nominates for severity assessment (packages/perps/DEPLOYMENT.md at this commit): vpiFactor 0.01e18 (:131), maxSkewRatio 0.4e18 (:133), executionFeeBps 4 (:142), settlementBufferBps 25 (:143), Senior limits 40_000_000e6 and 8_000 bps (:154-155), and juniorMaintenanceFeeAprBps 0 (:152), so nothing erodes the attacker's shares while it waits. LP_EPOCH_DURATION and DEPOSIT_COOLDOWN are compiled constants of one hour (HousePool.sol:178, TrancheVault.sol:38) rather than deployment inputs. Trading on the basket, both tranches and permissionless keepers are active at launch; nothing on this path touches the one feature that is not.

Nothing on the exit path offsets the extraction. The LP settlement fee is zero whenever the oracle is not frozen (HousePool.sol:1147-1155):

Solidity
    function _settlementFeeBps(
        bool isSenior,
        bool oracleFrozen
    ) internal view returns (uint256) {
        if (!oracleFrozen) {
            return 0;
        }
        return isSenior ? poolConfig.seniorFrozenLpFeeBps : poolConfig.juniorFrozenLpFeeBps;
    }

so the configured frozen tranche fees are inert in the live regime, and the exit is funded in full from free cash after maxLiabilityAssets, trader claims and the settlement buffer have been reserved (HousePool.sol:842-843, :881).

The charge is held in accountedAssets from the moment the open executes (HousePool.sol:640-642), and shows up at once in the tranche's pending waterfall equity, which getPendingTrancheState recomputes from it (:1295, :1311); the reconcile inside HousePool._settleLpEpoch (:835) is what writes it into stored juniorPrincipal, five lines before the exit is priced on it (:840-841). The trader's outstanding accrual carries no time decay: it changes only when the position does. The Junior share of it is not static, though. Every reconcile pays the senior coupon out of junior principal, capped by it (HousePoolWaterfallAccountingLib.sol:56-77), and losses and other LP flows move the same slot, so on a large Senior tranche the charge erodes as time passes. The window the attack needs is therefore one LP epoch, a compiled one hour, falling inside the life of a position that carries an outstanding positive charge. The attacker does not have to act within a block or predict a trade.

Recommended fix

Treat an outstanding positive lifetime VPI accrual as a pool liability for as long as the position that can reclaim it is open, which is what the negative side already does from the other direction.

The structural change is to carry the aggregate max(vpiAccrued, 0) over open positions into the pool's accounting snapshots, deducting it in HousePoolAccountingLib.buildReconcileSnapshot from distributable and in buildWithdrawalSnapshot from freeAssets, and to subtract it from the pricing principal that LP entry and exit both read. The value is already available to the pool: the Engine's terminal snapshot is fetched on every settlement, and the interface getter for vpiAccrued already exists.

The minimal change that closes this path alone is to stop pricing a redemption on a principal that includes an unsettled prepayment. In HousePool._settleLpEpoch, set juniorPhase.pricingPrincipal to juniorPrincipal reduced by the outstanding positive VPI accrual rather than to juniorPrincipal itself, and apply the same reduction to the deposit phase's pricingAssets at :915 so entry and exit stay symmetric, which the project's own invariant requires (SECURITY.md:392).

Either change can be made without touching the open-side booking. If the booking is changed instead, the clean form is a ClaimantInflowKind for a refundable prepayment that credits accountedAssets without entering the waterfall, released into revenue only when the position closes and the lifetime balance is final.

Impact Details

The in-scope impact this maps to

The governing entry, quoted from the programme's Impacts in Scope list:

Critical: direct theft of any user funds (at-rest or in-motion) other than unclaimed yield; permanent freezing of funds; protocol insolvency.

This report files at Critical on direct theft of at-rest user funds. A remaining Junior holder's deposited principal moves to the exiting holder's wallet. The transfer is not a share of a gain the pool made and not a timing artefact on a mark: the pool's cash went up by a prepayment the closing trader can reclaim out of free pool cash, and the leaver was paid its fraction of that prepayment in settlement token while the obligation stayed behind.

The test in the Proof of Concept section takes both arms of that claim from one snapshot: the attacker is strictly better off exiting than holding the same shares through the close, and the holder who stayed is strictly worse off than in the hold control, with the attacker's gain and that holder's loss asserted to agree within the test's two percent relative tolerance. The holder who stayed is asserted to end below its deposited principal, not merely below its accrued yield, which is what distinguishes this from the tier below, where "theft of unclaimed yield" sits.

Loss mechanism and its bound

Whose balance moves, by how much, and through which path:

  • The attacker's balance moves through TrancheVault.claimRedeem (:1014) into _consumeRedeemClaim, which transfers settlement token out of the vault to the receiver (:1211). After that call the value is an ERC-20 balance in an ordinary wallet, which is why permanence is asserted on that balance rather than on a share price.
  • The remaining holder's redeemable claim on pool assets falls below its deposited principal when the next reconcile absorbs the rebate from juniorPrincipal (HousePoolWaterfallAccountingLib.sol:167-184), the slot its own redemption price is computed from.
  • The trader is whole either way. It pays the charge on the open and receives it back on the close, net of its own execution fees, and it is not the beneficiary.

The driver of the size is the attacker's tranche share of the refund it escaped, with the charge as the ceiling, since the clamp bounds the refund by the accrual. The per-event ceiling follows from the charge curve and the open cliff, both of which are fixed at the release parameters. CfdMath.tryGetSkewCost is cost = vpiFactor * skew^2 / depth / 2 (:134-139), and an open is rejected with SKEW_TOO_HIGH when post-open skew exceeds maxSkewRatio of economic depth without strictly reducing it (libraries/CfdEnginePlanLib.sol:473-480), so one event's charge tops out at vpiFactor * maxSkewRatio^2 / 2, which at 0.01e18 and 0.4e18 is 8 basis points of pool depth. Depth is the Engine's own economic depth, canonical assets net of outstanding trader claims (libraries/CfdEnginePlanLib.sol:487, documented at SECURITY.md:391 and :1438), so the figure scales linearly with the size of the pool rather than being a property of a fixture. Eight basis points bounds the charge, not the extraction. The take is the attacker's Junior-tranche share of that charge, so the realized extraction sits below the charge ceiling; the ceiling the test checks the accrual against is taken on gross pool assets, which is the looser of the two bounds, and the economic-depth figure is not read anywhere in the test. On the 2026-11-15 run the one event booked a charge of 5,780 USDG on a 10,000,002 USDG pool, which is 5.78 basis points of gross assets, under the 8,000 USDG release ceiling because the open sits below the skew cap; the attacker was paid 2,646 USDG more by exiting than by holding the same shares through the close, while the remaining holder lost 2,650 USDG, the two agreeing to within 0.13 percent.

Whether that loss reaches deposited principal, which is what separates this from the tier below, depends on the exiting holder's share of the Junior tranche, and that share is the attacker's own lever: it is set by the deposit size the attacker chooses, and the programme does not treat recoverable attacker capital as a downgrade reason. In the Proof of Concept the exiting holder holds about 60 percent of the tranche, and of the remaining holder's 2,650 USDG loss, 2,102 USDG is capital taken below its deposited principal and 548 USDG is yield it would otherwise have kept. A smaller exiting share moves less principal, and a sufficiently small one would confine the loss to yield, but nothing obliges the attacker to choose one.

The programme's own rule governs what that bound means for the rung:

Impact is calculated first, separately from feasibility. Feasibility does not change impact/severity, only the amount paid. A large-impact but infeasible finding keeps its impact and severity, paid reduced.

A second victim on the same root cause

The same unreserved prepayment reaches the deposit side. A Junior LP that deposits while a positive charge is outstanding enters at a NAV built from that charge, then absorbs its share of the refund after entry, Junior first. In the Proof of Concept's second measurement the entrant deposits 2,000,000 USDG and ends at 1,999,426 USDG, 574 USDG below its own deposit, which is the clean, measured loss this case rests on. The incumbent holders do end ahead when the entrant's cash is present, but only part of that gain is the entrant's funded loss; the rest is the trader's smaller close rebate against the deeper pool the entrant's deposit creates, which is the separate, already-known depth effect discussed below. The finding here is therefore the entrant's sub-deposit loss, not the incumbent-side figure. The case runs with Senior at its high-water mark and ordinary tranche deposits open, so it needs no prior loss event of any kind.

A heavier instance sits on top of it. If a bad-debt event has already wiped Junior and left Senior just below its high-water mark, a positive VPI charge restores Senior exactly to the mark through the same distributeRevenue call and creates temporary Junior principal. The senior-impairment term in HousePoolTrancheGateLib.trancheDepositsAllowed is projectedSeniorPrincipal < projectedSeniorHighWaterMark alone (src/libraries/HousePoolTrancheGateLib.sol:36-38), so once the charge has restored the mark that gate stops blocking and ordinary tranche deposits reopen. The gate then treats a refundable prepayment as permanent Senior capital and admits the depositor it exists to keep out. That instance needs the prior wipe; neither the general case above nor the headline redemption path needs it, or the gate.

Both reach the same defective quantity: a refundable positive VPI accrual booked as Revenue with CashArrived and no offsetting liability.

Why not lower, and the out-of-scope entries to weigh

The competing reading is the tier below, which reads "theft of unclaimed yield". It fails on the quantity the loss lands in: the rebate the close reclaims is absorbed from juniorPrincipal itself (HousePoolWaterfallAccountingLib.sol:167-184), which is the slot the remaining holder's own redemption price is computed from, so what moves is not the yield it had accrued but the capital behind it. That is the Critical rung this report claims, and the 2026-11-15 run measures it: the remaining holder ends 2,102 USDG below its deposited principal, not merely below its accrued yield, against a hold control in which the same holder ends above its deposit. The Medium entry for griefing is explicitly for damage with "no profit motive", which is not this case either: the attacker's own gain against the alternative of holding the same shares is the point of the path, and it is what the first measurement is built to compare.

The exclusion entries that touch this report, each checked against what the path actually does:

  • "attacks requiring privileged-address access" and "malicious/compromised privileged role" do not apply. Every call on the attack path is open to any caller, and the Proof of Concept sets the steps out in order. No owner, pauser or guardian action is part of the attack. Privileged calls do appear elsewhere in the test, and none of them is an attack step. Its inherited setup performs the ordinary deployment, wiring, seeding and activation bootstrap that any live instance needs; the test file adds two timelocked Senior-limit updates that move the harness onto the committed release values, which is configuration parity, and the programme's own rule on that is that "Setting a parameter to a value the code allows is a trusted action, not a bug." Two further owner calls are taken after every measured figure has been read, and they test whether the owner can reverse the completed transfer rather than help it. The programme's scope statement also carves the execution surface in explicitly, on the ground that keepers have no special privileges and any caller may execute orders and price updates.
  • "incorrect third-party oracle data" does not apply. There is no price move at all: the position opens and closes at the same mark, and the transfer comes from the booking of the charge rather than from any oracle value.
  • "lack-of-liquidity" does not apply. The exit is funded in full out of free cash with the solvency reservations in place (HousePool.sol:842-843, :881).
  • "basic economic/governance attacks (51%)", "Sybil" and "centralization risks" do not apply. One ordinary address, one tranche, no voting weight and no second identity.
  • The containment clause reduces severity "ONLY where demonstrated monitoring coverage and response timing establish that containment limits the exploit", and adds that the existence of monitoring or a pause does not by itself justify a downgrade and that no detection or response deadline is assumed unless documented. No such deadline is documented anywhere in the repository. The clause also states that "already-funded claims remain available", which is the step that completes this transfer: once the redemption is funded and claimed, a later pause cannot reach it. The separate pre-impact monitoring clause, which allows a one-level downgrade for automated prevention with 100% certainty and requires objective certainty of both detection and prevention where a human acts, is not engaged either: every step of the path passes the protocol's own on-chain checks, and the guardian's three fixed actions are manual calls rather than automatic controls.
  • On attacker investment, the programme states that high capital is generally not a downgrade reason. The attacker's capital is its Junior deposit, which it recovers in the same exit.

Not a duplicate, and scope

Nothing in the four limitation sets the programme declares known carries this root cause. In SECURITY.md, ## Known Limitations runs from :1328 to :1457, with ## Emergency Procedures opening at :1458. The seven ### VPI limitations bullets (:1436-1444) cover liquidation's missing fresh delta, depth being computed net of trader claims, behaviour at zero depth, the clamp applying identically across regimes, the frozen-market spread, the clamp zeroing rebate-only round trips, and partial-close linearity. None of them says an LP may exit at a price carrying an outstanding refundable charge, and none mentions a liability for positive VPI. The nine ### LP accounting limitations bullets (:1382-1399) are about mark currency, book non-upgradeability, frozen-exit policy, backlog passes, coupon caps, Senior limit changes, grandfathered reservations and cooldown mixing. The nearest one runs the other way: "a positive marked receivable is not cash, so share NAV can exceed immediately redeemable liquidity" (:1384) warns that NAV can exceed redeemable liquidity, not that NAV may contain somebody else's refund. Of the other two sets, the Router and keeper bullets (:1343-1375) are queue, cleanup, client-id and retry-lane limitations, and the live basket component selection limitation (:687-699) is about which component mark a caller may choose within the permitted window, which this path does not turn on, since both legs execute at one mark.

The project also states a design intent that reads as if it could cover this, and it does not. ACCOUNTING_SPEC.md:730-740 sets a "collection-time ownership policy": LP ownership follows collection time, with no entry or exit barrier, so revenue collected while an LP is present is that LP's to keep. That policy is written about carry, which the same passage calls trader debt that "becomes pool revenue" once collected, and CloseAccountingLib excludes carry from close economics entirely (:43, :56). Carry is not refunded to the trader through close economics, and once collected it is pool revenue, so its timing moves yield between LP cohorts. A positive VPI accrual is the opposite kind of quantity: the close clamp returns it to the trader up to the whole accrual (CloseAccountingLib.sol:112-118), so pricing an LP's exit on it moves principal, not yield. That reversibility is why the project reserves the mirror negative-VPI quantity and forbids LPs from extracting it before the account settles (ACCOUNTING_SPEC.md:821-822), while reserving nothing for carry timing. The collection-time policy governs the non-refundable quantity; it says nothing about pricing an exit on a refundable one. The stated LP invariant runs the other way: new LPs "do not inherit old trader obligations at a higher deposit NAV" (SECURITY.md:859-860), which is exactly what the deposit-side case makes them do.

The two VPI close items in the AI scan are both execution-time depth manipulation. The first is titled "Temporary pool liquidity can reduce a skew-increasing close charge" and its claim is that "An unprivileged trader who can temporarily supply HousePool liquidity before executing that close can inflate pool depth, reduce the positive VPI charge, and remove the liquidity afterward." The second is titled "Temporary pool-liqui

The original report as published on Immunefi, by ChaseTheLight. 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 open side books the refundable VPI charge as arrived revenue credited to Junior principal, with no liability bucket for the pending refund, so redemption pricing includes value the pool may have to pay back.

Impact

A remaining Junior LP's deposited principal can be transferred to the exiting LP, with the loss reaching Senior once Junior is exhausted; the text measures a 2,102 USDG loss below deposited principal in its test.

What the attacker needed

A Junior tranche deposit; one hour deposit cooldown; an open position with positive VPI charge; epoch settles while position open

The fix

The text recommends carrying the aggregate positive VPI accrual as a pool liability, deducting it from distributable and free assets and from the pricing principal used for LP entry and exit.

How it was found

  1. Deposit into the Junior tranche through the vault's ordinary asynchronous deposit and wait for the deposit epoch to activate.
  2. Claim the shares and wait the one hour deposit cooldown.
  3. While a skew-increasing position with a positive VPI charge is open, request redemption of the whole balance.
  4. Settle the LP epoch through the permissionless OrderRouter.settleLpEpoch so the redemption is priced on juniorPrincipal that includes the charge.
  5. Claim the redemption to receive settlement token at the inflated price.
  6. When the trader closes, the rebate is paid from pool cash and absorbed from the remaining LPs' Junior 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.

When a trader opens a position, the pool charges them a fee-like amount called VPI. Part of that charge can be refunded when the trader closes. The bug is that the pool treats the whole charge as real profit straight away and uses it to price LP withdrawals, so an LP can cash out at an inflated price and the refund later comes out of the LPs who stayed.

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 ChaseTheLight

View all

8 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.