How price markets work

Understand signed mass, psi, funding, and v24 settlement.

Signed pool accounting

v24 keeps active backing separate from signed effective mass. Conceptually, at the current oracle price:

effectiveMass = lpNeutralMass + fundingPoolMass
              + totalDeferredExitMass + recoveryCapitalMass
              + traderInterceptMass
              + traderNetSlopeSharesWad * price / 1e18
              - traderFundingMass
psiWad = effectiveMass * 1e18 / activeBacking

The psi conversion requires positive effective mass and backing. Integer rounding is part of the implementation. Trader settlement uses the difference between pool mass before and after removing the actual position slice; summing independently rounded position values can differ from the executable result.

Position value and payout

With positive pool effective mass, a positive removed mass converts to gross collateral as removedMass * activeBacking / effectiveMass, rounded down. Protocol fees are deducted from the payout. Negative removed mass converts to debt with upward rounding, followed by authorized debtor coverage, Safety Reserve use, and uncovered-loss accounting.

If a positive close would leave insufficient effective mass, it requires your permission to defer. The position's directional exposure is removed and replaced by owner and protocol-fee mass claims. The owner's later collateral amount depends on the future conversion and claim headroom. It is not fixed at exit time.

Funding accounting

The 0.5.1 / V24 Revision 2 development baseline uses modelVersion = 2. Trader funding is paid to LPs, with a common utilization fee, a net-exposure premium for the majority side, and a quadratic reduction for the minority side. Balanced exposure can still incur the common fee; a minority-side reduction never becomes a funding receipt.

For a nonzero gross exposure and sufficient eligible LP value, the model computes these WAD integers (W = 10^18, L and S are long and short exposure values, V is eligible LP value):

U = min(floor((L + S) * W / V), maxUtilizationWad)
D = min(floor(abs(L - S) * W / V), maxNetExposureRatioWad)
s = floor(abs(L - S) * W / (L + S))
C = baseRateWad + floor(utilizationSlopeWad * U / W)
H = floor(netExposureSlopeWad * D / W)
F = floor((W - s) * (W - s) / W)
majorityRate = min(C + H, maxRateWad)
minorityRate = min(floor(C * F / W), maxRateWad)

D is capped independently from U; it is not derived from already-capped utilization. C is not capped before the side adjustments. At equal exposure, both side rates are the capped common fee. Disabled funding, zero gross exposure, or insufficient eligible LP value produces no active rate. Annualized rates are not amounts already charged or claimable LP returns.

Chargeable time

Normal scheduled closure and valid reopen grace can remain chargeable. The protocol must prove continuous oracle, calendar, and sequencer coverage; an old price number alone is insufficient evidence. Unknown or invalid coverage is permanently discarded rather than charged later, and calendar-version changes conservatively re-anchor coverage.

A checkpoint charges at most the configured maxAccrualInterval (itself no more than one day), discarding excess elapsed time. A caller's maxChargeElapsed may reject that protocol interval; it cannot shorten it. Funding-clock state, recipient eligibility, and Risk booking headroom still constrain actual booking. These source rules do not establish keeper or indexer integration for the new chargeable windows.

Booking adds equal Funding Pool mass and trader funding liability, preserving effective mass at that step. An LP funding claim is a later conversion into collateral and has its own risk limit. Do not equate a quoted annualized rate with an unconditional realized LP yield.

To read the current rates, clock state, and effective leverage cap in one call, use poolMarketPolicyV24() on the pool. See Factories and lenses.

Admission and exits

The risk engine checks current and stressed effective mass, psi, exposure and collateral limits, leverage, and margin requirements. Stress shocks and thresholds come from the pool's risk profile; they are not universally fixed at 20%.

Ordinary exits, deferred exits, LP exits, and Recovery actions have different conditions. Read the action-specific quote and Recovery explanation. An unavailable or stale read cannot establish that an action is safe.

On this page