How It Works
Function:SettlementEngine.reducePosition(uint256 positionId, uint256 reductionNotional)
When reducing a position, the protocol splits it conceptually into two parts: the portion being closed (the reductionNotional) and the portion remaining open. The closed portion is settled at the current forward price, and the remaining portion continues as an open position with proportionally reduced margin and MM threshold.
If
reductionNotional equals the position’s full notional, the reduction is treated as a full close with CloseReason.EARLY_TERMINATION. There is no separate “reduce to zero” path — it seamlessly converts to early termination.Preconditions
| Condition | Error on Failure |
|---|---|
Position status is OPEN | PositionNotOpen |
| Position is not liquidatable | EarlyTerminationNotAllowed |
| Caller is the position owner | NotPositionOwner |
reductionNotional > 0 | ZeroAmount |
Remaining notional >= minPositionNotional (unless full close) | NotionalTooSmall |
Reduction Mechanics
Calculate Proportional Margin at Risk
The margin at risk is the proportional share of the position’s locked margin:For example, reducing 40% of a position with 20 USDC locked margin puts 8 USDC at risk for the reduction.
Get Forward Price
The current forward price for the position’s fixing timestamp is fetched from the OracleModule. An oracle fee is collected from the trader’s collateral.
Compute PnL on Reduced Portion
PnL is calculated only on the
reductionNotional, not the full position:- LONG:
pnl = reductionNotional * (forwardPrice - entryStrike) / PRICE_PRECISION - SHORT:
pnl = reductionNotional * (entryStrike - forwardPrice) / PRICE_PRECISION
marginAtRisk (isolated margin guarantee).Compute Fee on Reduction
The trading fee is calculated on the reduction amount only:No liquidation penalty is applied. The fee is capped at available margin after PnL.
Update Remaining Position
If this is a partial reduction (not full close), the position is updated:
notionaldecreases byreductionNotionalimLockeddecreases bymarginAtRiskmmThresholdis reduced proportionally- Position remains
OPENwith the same entry strike, fixing timestamp, and all other parameters unchanged - Pool exposure counters are updated to reflect the reduced notional
Worked Example
Partial reduction walkthrough
Partial reduction walkthrough
Initial position:Step 2 — PnL on reduced portion:Step 3 — Fee:Step 4 — Settlement of reduced portion:
- Side: LONG
- Notional: 1,000 USDC
- Entry strike: 1.0800
- IM locked: 20 USDC (2%)
- MM threshold: 10 USDC (1%)
- Snapshotted trading fee: 5 bps
- Margin at risk: 8 USDC
- Profit: 2 USDC (paid by pool)
- Fee: 0.20 USDC (from margin)
- Net to trader: 8 + 2 - 0.20 = 9.80 USDC returned to free collateral
- Notional: 600 USDC
- Entry strike: 1.0800 (unchanged)
- IM locked: 12 USDC (20 - 8)
- MM threshold: 6 USDC (proportionally reduced)
- Status: OPEN
Use Cases
Take Partial Profits
Close a portion of a winning position to realize gains while keeping the remainder open for further upside. Useful when you want to de-risk but maintain exposure.
Reduce Exposure
Decrease your position size in response to changing market conditions without fully exiting. This reduces your notional risk while preserving the original entry price.
Free Up Margin
Reduction returns proportional margin to your free collateral, which can then be used to open new positions, add margin elsewhere, or withdraw.
Incremental Risk Management
Scale out of a position gradually over time rather than making a single all-or-nothing close decision.
Reduction vs Full Close
| Aspect | Partial Reduction | Full Close (Early Termination) |
|---|---|---|
| Notional after | Reduced (must be >= min notional) | Zero |
| Position status after | OPEN | CLOSED |
| Entry strike | Unchanged | N/A |
| CloseReason | N/A (position stays open) | EARLY_TERMINATION |
| Fee | On reduction amount only | On full notional |
| PnL realized | On reduced portion only | On full notional |
Mode Restrictions
Like early termination, position reduction is allowed in NORMAL, DEGRADED, and REDUCE_ONLY modes. It is only blocked in PAUSED mode:| Mode | Position Reduction |
|---|---|
| NORMAL | Allowed |
| DEGRADED | Allowed |
| REDUCE_ONLY | Allowed |
| PAUSED | Blocked |