pvpAMM overview
Understand v24 accounting, custody, and recovery.
Core idea
The pvpAMM is a single-collateral perpetual pool. Traders hold signed long or short exposure; LPs supply backing and take counterparty risk. The current documentation describes v24, including its position, liquidity, margin-account, and recovery interfaces.
Pool-level psi converts signed effective mass into collateral value when both mass and active backing are positive. Technical details explains the components and rounding. Price exposure, funding, fees, and pool solvency all affect your result.
Accounting and custody
Active backing, Safety Reserve, settlement escrow, LP fee reserves, external fee liabilities, and position bounty bonds are separately accounted balances. A raw token balance is not all withdrawable LP backing. Deferred exit and recovery capital claims are mass entitlements rather than fixed reserved collateral.
Quotes distinguish accounting, custody, configuration, and execution-binding digests. Use the matching v24 contracts and current action-specific guards. A matching version number alone is insufficient; see Factory and Lens.
Recovery
A new Recovery episode starts through checkpointRecoveryState when total effective mass is non-positive, with an acceptable oracle sample and custody checks. Zero backing, an out-of-range psi, uncovered loss, oracle failure, or a custody incident can block actions, but must not all be described as this same entry trigger.
Recovery state transitions
Transitions require successful guarded transactions. A healthy Frozen checkpoint can enter Observation directly; Repairing is not a mandatory intermediate state.
Recapitalization transfers collateral into the pool and records recovery capital mass claims. Successful recapitalization enters Observation and restarts its timer, including when already in Observation. These claims do not promise an immediate refund or automatic return to Active.
The process has Frozen, Repairing, and Observation states:
- Normal trading stops. Dedicated operations can settle negative mass with measurable progress, close eligible zero-mass positions, or accept guarded recapitalization.
- Recapitalization issues recovery capital claims. It is not an LP deposit with an immediate withdrawal promise. Deferred position exits have their own eligibility and do not bypass Recovery restrictions.
- Returning to Active requires positive mass, sufficient backing, no uncovered loss or custody incident, usable live oracle data, current and stressed risk targets, a valid completed cleanup proof, and the configured observation period. Passing time alone is insufficient.
If health deteriorates, Observation does not establish a guaranteed reopening time. An unavailable oracle read cannot be treated as a healthy checkpoint or as permission to use an arbitrary historical price.
Debt and loss
Negative settlement uses debtor coverage, then Safety Reserve, then records uncovered loss. Loss coverage and recapitalization are distinct operations. Neither protocol support nor a funded reserve guarantees that every claimant receives their expected amount.