Skip to content
Business logic Audit finding Advanced

VPI LP sandwich: refundable VPI is counted in Junior NAV, so an attacker redeems it and the LPs who stay pay the refund

Positive VPI paid when a trader opens a skew-increasing position is booked straight into Junior NAV, but the pool later refunds that VPI in full when the position closes. An attacker holding Junior shares can redeem at the inflated NAV before the close, leaving the remaining Junior LPs to fund the refund.

RowanDamisch Follow

Originally disclosed on Immunefi

Critical View original
  • Disclosed after under an hour

#99266 [SC-Critical] VPI LP sandwich: refundable VPI is counted in Junior NAV, so an attacker redeems it and the LPs who stay pay the refund

Submitted on Nov 12th 2026 at 18:29:56 UTC by @RowanDamisch for Audit Competition | Plether

Description

Brief/Intro

Positive VPI paid on a skew-increasing open is booked into Junior NAV at once, and the same position gets it back in full when its close reverses the skew. LP share pricing keeps no reserve for that refund. A Junior LP that redeems between the open and the close leaves with its share of the refundable VPI, and the LPs that stay pay the refund. One actor holding a Junior lot and a trader account runs the sequence around an LP epoch boundary with public calls only: queue the redemption, open on the heavier side minutes before H, settle epoch H, close. The profit is taken out of the Junior balances the remaining LPs already hold. On a fork of the v2.0.0 deployment at a real boundary (2 Nov 2026 10:00 UTC), with the signed Pyth payloads the Plether oracle worker posted and no mocks, the attacker nets +39 640.62 and the other Junior LPs lose 76 708.50 (control: +578.56 and −65.76). Replayed over 9.5 days of the deployment's real history (60 cycles every 3 hours, real prices and real user activity), the attacker profits in 59 of 60 cycles and nets +2 157 762 (+2 110 086 above ordinary LP income). It takes VPI from the LPs who stay in all 60 cycles, and they end 3.7 % lower. Put simply: every cycle the attacker gets paid, the Junior LPs who stay foot the bill, and nothing in the protocol stops it or gives the money back. We suggest reserving refundable positive VPI as a pool liability; in our check with a minimal patch the attacker loses 761.12 per cycle and the honest LP keeps its balance.

Vulnerability Details

A skew-increasing open pays positive VPI into HousePool. The pool books it as claimant revenue with CashArrived, so it raises accountedAssets and, through reconcile, Junior NAV at once. A later skew-reducing close of the same position refunds that VPI from the pool. The lifetime clamp only stops the refund from exceeding what the position paid (proportionalAccrual + vpiDelta >= 0), so a round trip refunds the full amount.

While the position is open, Junior NAV therefore contains value that the pool will pay back to the trader. LP share pricing does not reserve it. An LP that redeems in this window is paid its pro-rata share of that value. When the position closes, the refund is paid by the LPs that stayed.

One actor controls every step with three permissionless roles: a Junior LP address, a trader address, and the settleLpEpoch keeper call. Around a single epoch boundary H:

  • H − 10 min. The LP address requests redemption of all its Junior shares (before the 5-minute cutoff, so it targets H).
  • H − 5 min … H. The trader address opens on the heavier side of the book and pays VPI. Size: the largest that keeps the attacker's own redemption fundable.
  • H + 1 min. Anyone (the attacker as keeper in the PoCs) settles epoch H; the redemption is funded at the inflated NAV.
  • Right after. The trader closes; the full VPI is refunded from a pool that now belongs only to the other LPs.

The PoCs request at H − 10 min to leave a margin before the cutoff. A request lands in epoch H while block.timestamp < lpEpochStart(H) − 5 minutes (TrancheVault.sol:548-551), so any time from the end of the 1-hour cooldown up to H − 301 s works. The epoch follows the timestamp of the block that includes the request.

The position is open for a few minutes. The trader leg loses its two execution fees and the price move over those minutes. The LP leg gains its share of the VPI, and that gain is paid out of the Junior balances of the remaining LPs. The cycle repeats every ~3 hours with the same capital (activation epoch + 1-hour cooldown + exit epoch).

Put simply: every cycle the attacker gets paid, the Junior LPs who stay foot the bill, and nothing in the protocol stops it or gives the money back.

One real cycle. A Foundry test forks the v2.0.0 deployment on Arbitrum Sepolia at block 325 251 437 and runs the cycle around the boundary of 2 Nov 2026 10:00 UTC. It uses the signed Pyth payloads the Plether oracle worker posted at those moments and mocks nothing. The attacker holds 57.75 % of Junior and opens 93.9M LONG. It nets +39 640.62 (control +578.56), and the other Junior LPs lose 76 708.50 (control −65.76).

Every cycle over 9.5 days of real history. A replay re-executes the deployment's real transactions with the attacker inserted, using real signed prices and real user activity. The attacker runs one cycle every 3 hours while the basket trades: 60 cycles from 2 to 11 Nov 2026.

  • The other Junior LPs lose 3 717 330 (3.7 % of their balance), in all 60 cycles.
  • The attacker gains +2 110 086 from the attack (+2 157 762 in total, including +47 676 of ordinary LP income).
  • The rest of their loss (1 607 244) matches the open execution fees collected by the protocol treasury (1 612 889).
  • 59 of 60 cycles are profitable for the attacker.

Suggested fix. We suggest reserving refundable positive VPI as a pool liability until the position settles it. We checked the idea with a minimal patch on the repository suite: the attacker loses 761.12 per cycle instead of making 516.04, the honest LP keeps its balance, and the trader still gets its VPI back.

Root cause

  1. Positive VPI becomes LP equity on open. CfdEngineSettlementSidecar.executeOpen routes the open's trade cost (VPI + fee, minus the protocol-credited fee) into the pool as recordClaimantInflow(Revenue, CashArrived) (CfdEngineSettlementSidecar.sol:454-463), which increments accountedAssets (HousePool.sol:640-641).
  2. LP pricing has no term for refundable VPI. Reconcile and share pricing use physicalAssets − traderClaims ± terminalLpPriceDelta (HousePoolAccountingLib.buildReconcileSnapshot, HousePoolAccountingLib.sol:60-78). Open positions' accrued positive VPI is not a liability anywhere in this sum.
  3. The close refunds it in full. CloseAccountingLib.buildCloseState computes a fresh curve delta and clamps it only so that lifetime VPI stays non-negative (CloseAccountingLib.sol:103-118). Reversing the same skew therefore returns the accrued amount. The planner pays it from free pool cash (CfdEnginePlanLib.sol:973-978) and the sidecar transfers it out of the pool (CfdEngineSettlementSidecar.sol:621-623).
  4. Redemption is priced between the two. HousePool._settleLpEpoch funds matured redemptions at the reconciled principal of the moment it runs (HousePool.sol:824-942). Any LP that exits after (1) and before (3) leaves with its share of the refundable amount.

What the code and documentation state

  • LP sandwich in the code. CloseAccountingLib.sol:112-114 introduces the lifetime clamp with: "Prevents LP sandwich attacks where an attacker opens at high depth, reduces pool depth, then closes to extract a net-negative lifetime VPI rebate." The clamp bounds the trader leg to the VPI it paid. The LP leg of open → LP withdrawal → close redeems its share of that VPI, and with the clamp active the sequence is net-profitable.
  • Close-time rebate. SECURITY.md:871-872 and WHITEPAPER.md:885-886 define the rebate as paid from free pool cash and keep anticipated VPI out of terminal K. They contain no transfer from the LPs who stay to the LPs who leave.
  • VPI reserve. The VPI reserve "cannot be extracted by LPs before its account obligation settles" (ACCOUNTING_SPEC.md:821-822; same rule in WHITEPAPER.md:887-888). The code holds it for negative VPI on the trader's account (vpiRebateReserveAssets). Positive VPI awaiting refund has no reserve and leaves with LP exits before the close settles.
  • Known limitations. The VPI limitations (SECURITY.md:1434-1444) and LP accounting limitations (SECURITY.md:1380-1399) contain no LP value transfer through refundable VPI.

Known issues and prior audits

  • Audits and known issues. The published audits (Cantina, pre-audit, collaborative review, Cecuro AI, Scan) and the program's known issues contain no finding on LP pricing of refundable positive VPI.
  • Trader side. The project's VPI round-trip tests (accounting/close/VpiRoundTripAccounting.t.sol) cover the trader leg: the trader does not profit from a VPI round trip. That holds in this attack too.
  • LP side. The LP fixtures shared/HousePoolTestBase.sol and shared/AtomicLpEpochSettlementFixture.sol, and the LP NAV tests DeltaNeutralDepositNavTest, AsyncLpEpochSettlementTest, SymmetricNavEntryCancellationTest and PerpValueConservationInvariantTest, run with vpiFactor = 0. They price LP entry and exit without VPI.

Impact Details

Critical — Direct theft of user funds. The attacker's profit is taken out of the Junior balances that the remaining LPs already hold.

What is taken. A Junior LP's funds are its share of juniorPrincipal. Junior TrancheVault.totalAssets is the Junior principal (TrancheVault.sol:510-513); revenue is credited to it at reconcile and losses are debited from it (HousePoolWaterfallAccountingLib.sol:140-158, :167-178). A Junior share has no separate yield to claim. _settleLpEpoch reconciles first (HousePool.sol:835), so the VPI booked on open is in juniorPrincipal when the attacker's redemption is funded (HousePool.sol:886-887). The close refunds the VPI out of the pool, and the next reconcile debits it from juniorPrincipal, now held only by the remaining LPs.

One cycle. Both PoCs assert that the remaining LPs lose against the control.

PoC other LPs before the open end, no attack end, attack change with the attack
fork, real cycle of 2 Nov 2026 10:00 UTC 101 003 496.03 101 003 430.27 100 926 787.53 −76 708.50
repository suite (honest LP bob) 2 000 898.63 2 000 898.63 2 000 002.39 −896.24

60 cycles over 9.5 days of real history. The replay (PoC section 3) is compared with the same history, deposits and redemptions without the trades.

who USDG
other Junior LPs −3 717 330 (3.7 % of their balance)
attacker +2 110 086
protocol treasury (open execution fees) +1 612 889

The other LPs lose in 60 of 60 cycles; the attacker profits in 59 of 60. Against the real history without the attacker at all, the other Junior LPs end 3 823 522 lower.

The one losing cycle (4 Nov 01:00 UTC, −5 997) lost on the price move: −23 844 of price against +17 847 for the rest of the cycle (its share of the VPI minus fees). It had the smallest expected profit of the cycles on the large pool (+12 073). An attacker removes such cycles by hedging the position's price for the few minutes it is open, or by trading only when the expected profit is well above the usual price move (median 4 590, 90th percentile 10 321 per cycle). In this history, trading only at an expected profit of at least 15 000 leaves 56 cycles, all 56 profitable, with a total of +2 158 600.

Repeated, the loss reaches the deposit. After three cycles (9 hours) bob holds 1 998 209.83 against his 2 000 000 deposit (asserted in test_vpiSandwich_repeats).

Who loses. Junior LPs that are in the pool when the position closes, including LPs that deposit while it is open. Senior is shielded by the waterfall.

The loss grows with the pool. The VPI an attacker can make refundable in one cycle scales with pool depth, so every new LP deposit enlarges what is taken from all Junior LPs. On the deployment, cycles earned 1 190–2 120 on a pool of about 1M and up to 111 640 on a pool of about 100M.

The profit is the VPI of the LPs who stay, not the price. The price moved against the attacker in 30 of 60 cycles, and it still profited in 29 of them. Over all 60 cycles the price cost it 76 871; with the price move removed it nets +2 234 633.

Refundable VPI moves between LPs without an attacker too. Junior NAV carries the refundable VPI of all open positions: 34 091 (3.4 bps of Junior) at block 325793624, 110 212 (10.9 bps) at 326411898 and 127 134 (12.6 bps) at 326469861 on the live deployment. Every redeeming LP takes its share of it, and the LPs that stay pay the part that is refunded when those positions close. The attack concentrates this transfer and repeats it.

Why Critical. The finding is the program's Critical impact "Direct theft of any user funds, whether at-rest or in-motion, other than unclaimed yield":

  • User funds. The loss is taken from the Junior LPs' principal, the balance they deposited and hold. Repeated cycles take an honest LP below its deposit.
  • At rest. The victims do nothing; they only hold Junior shares while the attacker runs the cycle.
  • Direct theft. The attacker receives the money in the same cycle, through public calls only, with no trusted role and no action by the victims.
  • Not unclaimed yield. A Junior share has no separate yield; the money comes out of juniorPrincipal.
  • Real and repeatable. On 9.5 days of real history the other Junior LPs lose 3 717 330 (3.7 %), in 60 of 60 cycles, and the attacker takes 2 110 086, profitable in 59 of 60. The amount grows with every new deposit into the pool.

Attack economics

Profit per cycle, exact:

profit = c + ⌊shares × (VPI + U) / supply⌋ − F_open − F_close − L − K − B
  • shares / supply: the attacker's fraction of Junior shares at the settlement of H;
  • VPI = C(S₀ + N) − C(S₀), C(S) the floor-rounded k·S²/(2D) (CfdMath.sol:118-139); N is the notional opened, S₀ the existing skew on that side, D the VPI depth;
  • U = lots × |P_H − P_open|: the open's adverse execution shift, carried in Junior NAV at the settlement mark;
  • F_open, F_close = ⌊lots × P_exec × executionFeeBps / 10 000⌋ (OpenAccountingLib.sol:133-134, CloseAccountingLib.sol:118-119);
  • L = lots × |P_close − P_open|: the realized price loss from the adverse shift on both trades;
  • K: carry over the position's lifetime; B: the execution bounty (zero when the attacker executes its own orders);
  • c: the same LP lot's result over the window without the trade (the control run).

Each term was read from the events of the repository PoC run (PositionOpened, PositionClosed, CarryRealized, ActionRebateSettled, BountyCredited); their sum equals the measured profit to one atom (516.038345 vs 516.038346). With the same shift σ on both trades it reads profit ≈ s·VPI − 2·f·N − (2 − s)·N·σ/P, with s = shares/supply and f = executionFeeBps / 10 000. VPI is quadratic in N and the fees are linear, so the attacker fills the remaining maxSkewRatio room.

Where the attacker's profit starts. The cycle is profitable once the attacker's share of Junior exceeds s* = 2f · N / VPI. At release parameters that is about 42 % of Junior on a balanced book, 33 % at 15 % existing skew and 24 % at 37 % skew, never below 20 %. On the real deployment the attacker's trades turned profitable from 26.7–42.4 % of Junior, median 31.3 % (0.0008 × notional / VPI paid, from replay_cycles.csv). The attacker held 48.5–73 %, above that point in all 60 cycles.

Where the attacker's result comes from (60 cycles of real history, USDG):

VPI taken from the LPs who stayed (share × VPI) +5 485 417
execution fees, open and close (4 bp each on 4.03B notional) −3 225 778
price move on its positions −76 871
remainder: ordinary LP income, execution shift, carry, rounding −25 006
attacker net +2 157 762
less the ordinary LP income of the same deposits without the trades −47 676
attack effect +2 110 086

Per cycle: worst −5 997, median +36 565, best +111 640.

Bound per cycle. VPI depth is D = physicalAssets − traderClaims and the skew cap is maxSkewRatio × D (CfdEnginePlanLib.sol:473,487), so the refundable VPI added in one cycle is at most C(0.4D) = 0.0008 × D (8 bps of depth at release parameters).

Capital. Capital is relative to the pool.

  • The profit-maximizing share of Junior after the deposit, chosen per cycle by the replay's formula, was 48.5–73 % (median 57.6 %). A 57.6 % share means a deposit of 1.36× what the other LPs hold: 2.5–2.7M while the pool was 1M, and about 135M at the 99M pool.
  • The profit is bounded by the pool, not by the attacker's capital: the open must keep the attacker's own redemption fundable from the other LPs' capital, so capital above the optimum adds nothing.
  • The capital is not spent; it comes back at every exit, every 3 hours.
  • Per Attack Investment Amount, capital is not a reason to downgrade. No flash loan is needed or possible (asynchronous LP epochs).

Return on investment. +2 110 086 above ordinary LP income in 9.5 days on a median deposit of 135.5M (1.6 %, 2.7 bps per cycle). Per Attacks With A Financial Risk To The Attacker, low ROI alone is not sufficient for a downgrade; on real prices 59 of 60 cycles were profitable.

Execution. Only public entry points: requestDeposit/claimDeposit/requestRedeem/claimRedeem on TrancheVault, commitOrder and executeOrder/executeOrderBatch on OrderRouter, and the permissionless settleLpEpoch and updateMarkPrice. Orders execute with the first signed Pyth payload published after their commit; the oracle worker posts one every 6–30 s. If another keeper settles epoch H first, the result is the same, because the open executes before H. No trusted role is involved. Time only advances to the epoch boundaries the protocol defines (activation, the 1-hour cooldown, the next settlement), and no owner action reverses the transfer.

Suggested fix

We suggest reserving refundable positive VPI in the pool, in the same way the protocol already reserves refundable negative VPI on the trader's account (vpiRebateReserveAssets in MarginClearinghouse, target CfdEnginePlanLib._negativeVpiReserveTarget):

  1. The Engine tracks positiveVpiReserveAssets, the sum of max(vpiAccrued, 0) over live positions. It updates the sum in the two functions that store a position: settlementWritePosition (opens and partial closes, which apply posVpiAccruedDelta and posVpiAccruedReduction) and settlementDeletePosition (full closes and liquidations).
  2. The HousePool input snapshot (CfdEngineProtocolLens.getHousePoolInputSnapshot) counts the sum together with the trader claims (traderClaimBalanceAssets). In HousePoolAccountingLib that field is terminalLiabilities of buildReconcileSnapshot and part of reserved in buildWithdrawalSnapshot. The reserve is therefore outside the equity that reconcile distributes to the tranches, outside share pricing on deposit and redemption, and outside getFreeAssets.
  3. A close pays its rebate out of the reserve. The part of the reserve that a close or a liquidation releases without a refund becomes LP revenue at that moment.

With this change the VPI part of an open no longer raises Junior NAV, and its refund no longer lowers it. An LP that redeems between the open and the close receives no part of the refundable VPI. The s × VPI term leaves the profit formula, and the attacker's result over the sequence is its execution fees and the price move. The clamp's guarantee for traders stays as it is.

A regression test can check that, at an unchanged price, the redemption value of a Junior share is the same before the open and after the close of any position.

How we checked it. fix.patch (in the gist) is a minimal 14-line patch of points 1 and 2 in CfdEngine.sol and CfdEngineProtocolLens.sol, written only to check the suggestion. VpiLpSandwichFixCheck.t.sol (in the gist) runs the attack of VpiLpSandwichPoC.t.sol against it with the same scenario, release parameters and public path. From the repository root, with the gist files in the parent directory:

Bash
git apply ../fix.patch
cp ../VpiLpSandwichFixCheck.t.sol packages/perps/test/perps/poc/
forge test --root packages/perps --match-path test/perps/poc/VpiLpSandwichFixCheck.t.sol -vv
a82d4fef with fix
NAV step on open +2 555.54 −0.0014
attacker LP exit 2 001 277.15 1 999 999.99
attacker LP exit, control 1 999 999.99 1 999 999.99
trader leg after close 99 238.88 99 238.88
attacker net per cycle +516.04 −761.12
bob per cycle vs control −896.24 +380.29
bob after 3 cycles 1 998 209.83 2 001 140.90
VpiLpSandwichFixCheck fail pass
VpiLpSandwichPoC pass fail

Without the fix the NAV step on open equals the VPI paid. In both cases the trader leg gets its VPI back and pays only the two fees. With the fix bob gains the close fee, which stays in the pool, and ends above his 2 000 000 deposit.

We also ran five of the project's test files for VPI round trips, close accounting and LP NAV with fix.patch; all 46 tests pass: VpiRoundTripAccounting (2), TerminalNavCloseConservation (3), LpEntryExitNavParity (4), AsyncLpEpochSettlement (28) and EntryAndActivationBehavior (9). We did not run the full test suite.

References

Link to Proof of Concept

https://gist.github.com/w64267685-afk/15356f492a9959c415dfee0b29b3c7a4

Proof of Concept

Proof of Concept

Three parts, each answering one question. The tests are Foundry tests under packages/perps/test/perps/poc/ of a clean a82d4fef checkout; no file under src/ is changed.

  1. VpiLpSandwichRealCycle.t.sol: one real attack cycle on a fork of the live v2.0.0 deployment, with the prices actually published, no mocks; about 1 min, needs an RPC with historical state. Shows: the attack works on the deployed contracts: attacker +39 640.62, other Junior LPs −76 708.50.
  2. VpiLpSandwichPoC.t.sol: the same attack in the project's own test suite, no network; about 1 min. Shows: the mechanism step by step, and that repeated cycles take an honest LP below its deposit.
  3. replay_cycles.csv: results of replaying 9.5 days of the deployment's real history with the attacker inserted. Shows: the attack repeats on real prices and real user activity: 59 of 60 cycles profitable, the other LPs lose in 60 of 60.

fix.patch and VpiLpSandwichFixCheck.t.sol are our check of the suggested fix (Suggested fix).

All five files are in the secret gist.

Setup

The test files, replay_cycles.csv and fix.patch are in the secret gist; VpiLpSandwichPoC.t.sol is also inlined at the end. Download the gist files into an empty directory, open a shell in that directory and run:

Bash
git clone https://github.com/immunefi-team/audit-comp-plether && cd audit-comp-plether
git checkout a82d4fefb02768e5b3bddcc97dee371eee24fea8
git submodule update --init --recursive
mkdir -p packages/perps/test/perps/poc
cp ../VpiLpSandwichPoC.t.sol ../VpiLpSandwichRealCycle.t.sol packages/perps/test/perps/poc/

All commands below run from the repository root (audit-comp-plether).

1. VpiLpSandwichRealCycle.t.sol — one real cycle on a fork of the v2.0.0 deployment, no mocks

What it shows: the attack works on the deployed contracts at a real moment, with the prices that were actually published. The attacker nets +39 640.62 and the other Junior LPs lose 76 708.50.

The fork starts at the real state of Arbitrum Sepolia block 325 251 437 (2 Nov 2026 07:50 UTC). That is 2 h 10 min before the LP epoch boundary H = 10:00 UTC.

Every price is a real signed Pyth payload (all six basket feeds). The Plether oracle worker 0x1329a7fa975f2f8aa2cac86a833f03655201d34f posted each one on-chain at that moment through Router.updateMarkPrice. The six payloads are constants in the file, each with its transaction hash.

Every step is a public call:

time (UTC) step payload published
07:50:05 Router.updateMarkPrice; Junior requestDeposit of 138 110 704.45 (activates at B = 08:00) 07:50:03
08:01:08 Router.settleLpEpoch (epoch B); claimDeposit 08:01:06
09:50:05 Router.updateMarkPrice; requestRedeem of all shares (epoch H) 09:50:03
09:55:00 / 09:55:03 commitOrder LONG / executeOrderBatch with the payload 09:55:01
10:01:07 Router.settleLpEpoch (epoch H); claimRedeem 10:01:05
10:01:10 / 10:01:13 commitOrder close / executeOrderBatch with the payload 10:01:11

How the attack is set up:

  • Deposit. It is the one the replay's formula (section 3) chose at this moment: 57.75 % of Junior.
  • Open size. The largest on the heavier side that keeps the attacker's own redemption fundable, i.e. pool free assets ≥ 105 % of its Junior assets. The test searches it in snapshots and then executes it once.
  • Execution. The attacker executes its own orders.
  • Control. The same window runs again without the trade.

Three things are test-side only:

  • the attacker's USDG comes from deal;
  • time moves with vm.warp/vm.roll;
  • a one-line stub at the ArbSys precompile 0x64 returns block.number. The local EVM has no Arbitrum precompiles, and the Router reads arbBlockNumber() for its same-block check.

Real transactions of other users inside the 2 h 10 min are not replayed here; section 3 covers them.

The test needs an RPC that serves historical state, for example the public Tenderly gateway:

Bash
FORK_RPC=https://arbitrum-sepolia.gateway.tenderly.co forge test --root packages/perps --match-path test/perps/poc/VpiLpSandwichRealCycle.t.sol -vv

Expected: 1 test passes, in about a minute on a first run (compilation and fork reads included). The log shows:

  • LONG opened at 09:55:03: 93 949 930.41 notional, 98.7 % of the remaining maxSkewRatio room; VPI paid 187 233.61.
  • Pool free assets after the open: 145 316 591.40, against the attacker's Junior assets of 138 219 802.56.
  • Redemption 100 % funded (asserted).
  • Attacker net +39 640.62, against +578.56 in the control (asserted above zero and above the control).
  • Other Junior LPs: 101 003 496.03 before the open. With the attack they end at 100 926 787.53 (−76 708.50); without it, at 101 003 430.27

The original report as published on Immunefi, by RowanDamisch. 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 pool treats refundable positive VPI from open positions as claimant revenue in accountedAssets and share pricing, with no liability reserve for the amount it will later refund on close.

Impact

The attacker could take value directly from the Junior principal of LPs who stay, with the replay showing other Junior LPs losing in all 60 cycles and the attacker profiting in 59 of 60.

What the attacker needed

A Junior LP position; a trader account; public calls only; no trusted role

The fix

Refundable positive VPI should be reserved as a pool liability, outside reconcile equity and share pricing, until the position settles it.

How it was found

  1. Request redemption of all Junior shares before the 5-minute cutoff so it targets epoch H.
  2. Open a position on the heavier side of the book to pay VPI, sized so the redemption stays fundable.
  3. Settle epoch H so the redemption is funded at the inflated NAV.
  4. Close the position so the full VPI is refunded from the pool now owned by the other LPs.

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 and get shares whose value should reflect what the pool really owns. Here the pool counted money it had only borrowed temporarily as if it were profit, so a share looked worth more than it was. Someone could cash out at that inflated value, and when the borrowed money had to be given back, the providers who stayed lost out.

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 RowanDamisch

View all

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