Skip to content
Business logic Audit finding Advanced

LP ownership rotation lets a trader redeem positive VPI revenue and make a queued depositor fund the matching rebate

Plether credits a positive virtual price impact charge to the current LP cohort as revenue, but does not reserve the matching future rebate owed when the position closes. An attacker can rotate LP ownership so a queued depositor enters at a NAV that includes the charge, then redeem the inflated shares and close the position at an unchanged price, leaving the new depositor to fund the rebate.

Aditya Soni Follow

Originally disclosed on Immunefi

Critical View original
  • Disclosed after under an hour

#98114 [SC-Critical] LP ownership rotation lets a trader redeem positive VPI revenue and make a queued depositor fund the matching rebate

Submitted on Nov 5th 2026 at 07:34:51 UTC by @hetroublemakr for Audit Competition | Plether

Description

Summary

Plether immediately recognizes a positive virtual price impact (VPI) charge as revenue owned by the current LP cohort. That revenue raises Junior principal and is included when an existing Junior LP redeems. The same open position nevertheless retains a positive lifetime VPI balance that can produce an equal rebate when the position closes at the same price and economic depth. Plether does not reserve this future rebate in LP entry pricing or the withdrawal firewall.

An attacker can therefore age a Junior LP position, wait for a victim's async Junior deposit to be queued, open a maximum-skew position immediately before that deposit activates, and make the victim enter at NAV that includes the VPI charge. The attacker then redeems all old LP shares, including the charge, and closes the position at the unchanged price after the victim's principal has replaced the withdrawn liquidity. The close rebate is paid from the replacement LP's cash.

The exact release-configuration PoC uses only public Router, vault, and permissionless keeper entry points. With a 1,000,000 USDG attacker LP position and a 1,000,000 USDG queued victim deposit, it produces:

Text
Attacker LP deposit:             1,000,000.000000 USDG
Attacker LP redemption:          1,000,799.997578 USDG
Victim value before close:         999,999.999995 USDG
Victim value after close:          999,360.439757 USDG
Victim principal shortfall:            639.560243 USDG
Combined attacker profit:              479.360065 USDG
Open economic depth:              1,000,002.000000 USDG
Close economic depth:             1,000,002.000822 USDG
Open-to-close duration:                   3,601 seconds

The close depth is slightly higher than the open depth. The exploit therefore does not use the publicly known lower-depth VPI-rebate amplification. A control with the same open and close but no LP cohort change loses 160.200161 USDG.

Impact

An ordinary LP/trader can transfer a matching VPI repayment from itself to a later Junior LP cohort and take part of that cohort's deposited principal as profit. In the exact release-configuration PoC, the victim contributes 1,000,000 USDG, owns no historical VPI yield, and falls to 999,360.439757 USDG after an unchanged-price close, while the attacker gains 479.360065 USDG. This is not theft of unclaimed yield: the victim's post-activation shares are worth essentially exactly its deposited principal before the close and less than principal afterward. Repeating the same ownership rotation against future queued deposits progressively depletes Junior backing.

Link to Proof of Concept

https://gist.github.com/hetroublehacker/1fd4056425553a827df976a647bd5902

Proof of Concept

Steps to Reproduce

  1. Clone the frozen competition repository and check out the in-scope commit:

    Bash
    git clone https://github.com/immunefi-team/audit-comp-plether.git
    cd audit-comp-plether
    git checkout a82d4fefb02768e5b3bddcc97dee371eee24fea8
    
  2. Save the single gist-ready PoC vpi-cohort-rotation-theft.t.sol at this repository path:

    Text
    packages/perps/test/perps/accounting/close/VpiLpOwnershipRotationPublicPath.t.sol
    

    The PoC SHA-256 is:

    Text
    926a52d2cde6889c14d9f689cf15fdeac02b30d42d93570df52b099c4bf50cdb
    
  3. Run the two focused tests from the repository root:

    Bash
    forge test --root packages/perps \
      --match-path 'test/perps/accounting/close/VpiLpOwnershipRotationPublicPath.t.sol' -vv
    
  4. Confirm both tests pass and the exploit test prints these exact atom values:

    Text
    public max-skew position size: 400000000000000000000000
    public opening depth: 1000002000000
    public closing depth: 1000002000822
    public attacker LP payout: 1000799997578
    public victim value before close: 999999999995
    public victim value after close: 999360439757
    public victim principal shortfall: 639560243
    public open protocol fee: 160000000
    public close protocol fee: 0
    public attacker profit: 479360065
    public open-to-close seconds: 3601
    
  5. Confirm the static-cohort control also passes and prints:

    Text
    static-cohort attacker loss: 160200161
    
  6. Verify that the exploit test enforces the facts needed to distinguish the report from the known depth issue:

    Solidity
    assertGe(run.closeDepth, run.openDepth, "attack must not use the known lower-depth rebate amplification");
    assertApproxEqAbs(run.closeDepth, run.openDepth, 2e6, "the proof must preserve economic depth");
    assertEq(juniorVault.balanceOf(ATTACKER), 0, "attacker must own no LP shares when the rebate is paid");
    assertLt(run.victimValueAfterClose, VICTIM_LP_ASSETS, "unchanged-price close must consume the victim's deposited principal");
    assertGt(run.attackerEndWealth, attackerStartWealth, "combined attacker wealth must increase");
    

No RPC endpoint, fork, public testnet, production account, or real user funds are required.

The original report as published on Immunefi, by hetroublemakr. 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 protocol recognises a positive VPI charge as LP revenue immediately without reserving the matching close rebate in LP entry pricing or the withdrawal firewall.

Impact

An ordinary LP or trader could transfer a matching VPI repayment to a later Junior LP cohort and take part of that cohort's deposited principal as profit, with the PoC showing the victim falling below principal while the attacker gains.

What the attacker needed

Attacker holds an aged Junior LP position; victim async Junior deposit is queued; attacker opens max-skew position before activation; attacker redeems old LP shares

How it was found

  1. Clone the competition repository and check out the in-scope commit.
  2. Save the provided PoC test file at the specified repository path.
  3. Run the two focused tests with forge from the repository root.
  4. Confirm both tests pass and the exploit test prints the stated atom values.
  5. Confirm the static-cohort control test also passes and prints its loss value.
  6. Verify the exploit test asserts unchanged economic depth, zero attacker LP shares at rebate time, victim principal loss, and increased attacker wealth.

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 liquidity pool pays its current members a fee when someone opens a large trade, and later refunds part of that fee when the trade closes. The bug is that the refund is not set aside when new members join, so an attacker can collect the fee, leave, and let a newcomer's money pay the refund. The newcomer ends up with less than they deposited while the attacker profits.

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 Aditya Soni

View all

1 more disclosed report, 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.