# Makers can lose funds from price movement even when no long and short positions are opened, due to incorrect distribution of adiabatic fees exposure between makers

Adiabatic fee exposure in Perennial V2.3 is distributed by maker position size, not individual exposure, so makers lose funds on price moves with no longs/shorts open.

- Payout: Contest reward
- Severity: medium
- Program: Perennial V2 3
- Credited: panprog
- Disclosed: 2024-02-28
- Write-up quality: 7/10
- Original: https://github.com/sherlock-audit/2024-02-perennial-v2-3-judging/issues/9
- Library page: https://bugbountylibrary.com/r/sherlock%3A2024-02-perennial-v2-3%3AM-2
- Tags: domain:web3 impact:funds-loss kind:contest platform:sherlock sev:medium tech:evm tech:solidity technique:source-review vuln:business-logic vuln:precision-loss vuln:reward-distribution

**Target:** Perennial V2 market contract adiabatic fee accounting (VersionLib)
**Root cause:** Global maker exposure adjustment is weighted by each maker's position size rather than their individual adiabatic fee exposure, so per-maker exposure no longer nets to zero on close.
**Steps:**
1. Configure makerFee/takerFee with adiabaticFee=0.01, scale=50, zero linear/proportional fees.
2. Alice opens maker=10 at price=1 (collateral +0.9 from adiabatic fee).
3. Bob opens maker=10 at price=1 (collateral +0.7).
4. Move price to 2; total exposure +1.6 split evenly (+0.8 each) instead of 0.9:0.7.
5. Bob closes: final collateral +0.1; Alice closes: final collateral -0.1.
6. Repeat at price=0.5 to show reversed sign; with Bob maker=40 Alice loses ~2% of notional.
**How found:** Reasoned about adiabatic fee netting: noticed fees net to zero only for the aggregate maker pool, then constructed a two-maker scenario with no longs/shorts to show individual PnL depends on price, and traced it to exposure weighting by position size in VersionLib.
**Insight:** When a global accumulator is split among users, check whether the split weight matches the quantity that generated the accumulator; here exposure was split by position size instead of by exposure, breaking per-user netting.
