Skip to main content
Portfolio margin evaluates the portfolio holistically. The portfolio’s options, perpetuals and (risk cancelling) collateral are revalued under a range of expected and “tail” scenarios, with the worst outcome taken as the margin requirement. Extra contingency margin is added for risks the scenarios do not capture. Compared to standard margin, this can substantially increase a portfolio’s capital efficiency.
📘 [New!] Portfolio margin is now cross-currency. In V2 a portfolio margin subaccount was restricted to a single market, e.g. an ETH account could not hold BTC options. In V3 a portfolio margin subaccount can hold every currency its risk universe lists. A Prime account holds BTC and ETH derivatives; an Alt account holds SOL, ADA, XRP, ZEC and CC.
Netting stops at the universe boundary. One portfolio margin manager runs per universe: it evaluates each currency’s scenario grid independently, sums the per-currency worst-case losses, adds the contingencies, and then applies the universe’s collateral haircut table. Losses in one currency never offset gains in another. If a portfolio margin account’s collateral falls below its maintenance margin requirement, the account will be liquidated.

Margin Calculation

A user’s initial and maintenance margin requirements are calculated as follows:
Formula
Where:
Formula
and
  • Portfolio MtM is the mark-to-market value of the portfolio. This includes the account’s cash balance, all collateral (marked to current value), all option positions and all perpetual funding and PNL.
  • mm_factor = 0.8 and im_factor = 1.0 are the loss factors applied to the worst-case loss. They are set per currency.
  • depeg_factor is extra initial margin conditionally required to protect against the cash asset depegging.
  • maxLoss is the greatest PNL loss the currency’s positions will endure under a set of scenarios: “regular scenarios”, “tail scenarios”, “skew scenarios” and the “forward scenario”.
  • Regular Loss is the maximum PNL loss the portfolio will endure under 23 scenarios comprised of various forward and volatility shocks.
  • Tail Loss is similarly the worst PNL the portfolio will endure under a number of “tail scenario” moves involving substantial price shocks (and a volatility increase). These PNLs are dampened to ensure users are not over-margined.
  • Skew Loss is the maximum loss resulting from a change in the skew of the volatility surface. This can involve the skew rotating about the at-the-money or the smile widening/narrowing.
  • Forward Loss accounts for the forward basis for each expiry moving unfavourably against the trader.
  • Collateral Contingency is extra margin applied to each collateral asset held — or borrowed — in the account (i.e. a risk based haircut). Risk cancelling collateral is charged inside its currency’s bucket; everything else is charged at account level.
  • Perp Contingency is extra margin added for each perp position held by the account.
  • Option Contingency is extra margin added for each naked short option held by the account.
  • Oracle Contingency is extra initial margin conditionally required to protect against inaccurate oracle data feeds.
📘 Oracle Contingencies are typically zero and only add to initial margin requirements, i.e. they do not change margin requirements for already open positions, but may block opening new positions.
As described in Standard Margin, an account is subject to liquidation if Maintenance Margin falls beneath 0 and can only open new positions if the final state has Initial Margin above 0.

Collateral and Risk Cancellation

Every collateral token a universe accepts is supported by its portfolio margin manager. For each universe, some assets are risk cancelling: they are attached to a currency and shocked inside that currency’s scenario grid, so a short BTC call delta can be offset by cbBTC. Everything else earns credit through its haircut alone.
Formula
Where:
  • n(collateral) is the balance of a given collateral asset in the account, negative if borrowed.
  • Spot is the spot price of the collateral asset.
  • HAIRCUT_LONG is the fraction of mark value not credited. MM_LONG = 0.126 for cbBTC in Prime means a long balance counts at 87.4% of mark towards maintenance margin. Initial margin haircuts are larger than maintenance ones.
  • HAIRCUT_SHORT means that a borrow increases the margin required by more than the mark value of the borrowed asset.

Option Mark Values

All options are marked with a dynamic discounting rate, so long dated options are not over-margined. The price of a call is given by
Formula
where
  • r_T is the discounting rate for the expiry T, typically marked to US T-bills.
  • T is the time to expiry in years
  • F is the forward price
  • K is the strike
  • N() is the cumulative normal distribution function

Regular Loss

To compute Regular Loss, a currency’s options, perpetuals and risk cancelling collateral are evaluated under 23 forward and volatility shocks. The largest loss is set as Regular Loss. The grid is the same shape in every market with 9 spot steps, with up/down/static vol shocks at every step except the two outermost, which are evaluated vol-up only. The size of the steps is set per currency. For BTC the grid runs from -14% to +14% in steps of 3.5%:

Shocked Risk Cancelling Asset Value

The account’s risk cancelling collateral is shocked by a constant factor under scenario k:
Formula
Where:
  • Collateral is the balance of the risk cancelling asset (e.g. cbBTC, LBTC in the BTC bucket)
  • Spot Shockₖ is the shock to the spot price for scenario k.
  • collateral_spot is the spot price of the underlying risk cancelling asset.
  • The sum is taken over all risk cancelling assets of that currency.

Shocked Perpetual Value

The account’s perpetual position value is shocked by a constant factor under scenario k:
Formula
Where:
  • Perp Position is the number of perpetual contracts (this number is negative for shorts).
  • Spot Shockₖ is the shock to the spot price for scenario k.
  • Perp Price is the mark-to-market value of the perpetual.

Shocked Option Value

The account’s option positions are grouped and shocked per expiry. Each expiry i is evaluated for a given shock scenario k. The shocked value for an expiry i is the value of each option position with strike price j calculated with shocked forward and volatility values. The forward is shocked to:
Formula
The IV shock is multiplicative. The magnitude of the shock depends on time to expiry and whether or not the shock is positive or negative. We have:
Formula
Where:
  • IV is the implied volatility of strike j.
  • Time To Expiry is the number of years until expiry.
  • VOL_RANGE = -VOLRANGEDOWN if IV is being shocked down and VOLRANGEUP if it is being shocked up (see the table above).
  • VEGA_POWER = SHORTTERMPOWER = 0.3 if time to expiry ≤ 30 days.
  • VEGA_POWER = LONGTERMPOWER = 0.13 if time to expiry > 30 days.
  • DTE_FLOOR = 1 day floors the term scaling so the shock does not blow up at expiry.

Discounting

Net positive sub-portfolios are discounted and net short sub-portfolios are anti-discounted (marked up), so that neither side is under-margined. For an expiry i, suppose the rate is r_i (clamped at zero) and time to expiry in years is tau_i. The mark discounting is
Formula
The discount applied to the sub-portfolio of expiry i is
Formula
Where
  • STATIC_DISCOUNT = 0.98
  • STATIC_DISCOUNT_NEG = 1.02
  • RFR_FACTOR1_POS = RFR_FACTOR1_NEG = 0.0
  • RFR_FACTOR2_POS = RFR_FACTOR2_NEG = 0.10
An expiry group’s shocked value is then the sum of the shocked value of each option in the expiry using Black76, with the discount applied:
Formula

Scenario Analysis

The portfolio’s loss under scenario k is the sum of perpetual, risk cancelling collateral and each option expiry’s shocked value minus its unshocked value:
Formula
Regular Loss is then the smallest (i.e. most negative) portfolio loss under all 23 scenarios:
Formula

Tail Loss

To ensure sufficient collateral is posted for very out-of-the-money options, we also consider “tail scenarios”. These involve substantial spot shocks up and down and always occur with a volatility increase. To prevent over margining of positions, a dampening_factor specific to each tail scenario is applied to the PNL for that scenario:
Formula
The BTC tail ladder is: The “effective shock” column is dampening x |spot shock| / max grid shock with the size of the shock actually charged at that node, expressed as a fraction of the main grid. A falling effective shock is deliberate: the further into the tail a scenario goes, the less of it is charged.

Skew Loss

Portfolios that are vega neutral can still lose money if the shape of the volatility surface moves. The skew scenarios charge for that.

Motivation

Plotted in log moneyness space (k = log[K/F]), an SVI surface has a minimum at k = m and a tilt about it. This means vols with k > m may be higher than those with k < m. That tilt can change: the surface can rotate (one wing’s vols rise while the other’s fall), or it can widen and narrow (both wings move the same way). Ordinarily skew is not a significant risk, because the regular grid already applies large parallel volatility shocks. The skew scenarios exist to make sure the portfolios those shocks miss are still adequately margined.

[New!] Four directional rails

V2 tested two skew shapes. V3 tests four, by giving each shape both directions: For each strike K_i in an expiry T_j, the rail applies a multiplicative shock
Formula
The multiplier is capped by
Formula
with LINEAR_SCALE_CAP = ABS_SCALE_CAP = 0.25 and LINEAR_CBASE = ABS_CBASE = -0.1, so the cap shrinks with tenor. k_star sets the log-moneyness beyond which the shock is capped:
Formula
with MIN_K_STAR = 0.01, MIN_WIDTH_SCALE = 4, VOL_PARAM_1 = 0.6 and VOL_PARAM_2 = 0. The multiplier is then
Formula
where direction is +1 for LINEAR_CW / ABS_UP and -1 for LINEAR_CCW / ABS_DOWN.

[New!] Decoupled aggregation

The shocked PNL of an expiry under a rail is
Formula
V2 assumed one coherent smile move across the whole book and summed each rail separately. V3 charges each expiry its own worst rail, floored at zero, and sums:
Formula

Forward Loss

The forward loss accounts for the forward basis for an account’s options moving unfavourably against the trader. We consider an up and down scenario where the forward moves by FWD_CONT_SHOCK (3.5% for BTC, 4% for ETH, and larger in the higher-volatility markets). For each expiry i, we calculate the basis loss, or the worse of the up and down scenario:
Formula
The forward loss is then the weighted sum of each expiry’s basis loss:
Formula
Where:
  • ADD_FACTOR = 0.5
  • MULT_FACTOR = 2.0
  • Time To Expiryᵢ is the number of years until expiry.
Note that the forward loss is one of the four candidates inside maxLoss, not an addition on top of them: only the single worst of the four is charged.

Contingencies

The contingencies are typically small extra margin requirements to ensure adequate collateral is posted under all conditions.

Perp Contingency

The account’s perpetual position has a small amount of margin associated with it, based on the number of perpetual contracts and spot price:
Formula
Where PERP_STATIC_MARGIN is 0.0075 (maintenance) and 0.015 (initial) for BTC and ETH, rising to 0.025 / 0.04 for ADA.

Option Contingency

For each strike with a net short position, a small amount of margin is charged:
Formula
Where:
  • Net Option Sizeⱼ is the net number of option contracts held at strike j within an expiry (negative for net short).
  • OPTION_STATIC_MARGIN is 0.0015 (maintenance) and 0.0025 (initial) for BTC and ETH.
Because the skew scenarios do most of this work, the option contingency is small.

Oracle Contingency

This works as in the Standard margin, but with three differences:
  1. The option contingency counts the total (absolute value of the) number of long and short option contracts at a strike, not just short contracts.
  2. The perpetual feed’s confidence also enters the option contingency: min(Spot, Forward, Vol, Perp).
  3. The threshold is strict and extra margin is added when confidence is below THRESHOLD_CONFIDENCE = 0.55, not at it.
Formula
Where CONFIDENCE_SCALE = 0.4 and Options Size is the total number of long and short option contracts for a given strike/expiry. For example, if there are 4 long calls and 3 short puts on the $2000 3 weekly strike, then Options Size = 4 + 3 = 7. Risk cancelling collateral takes the minimum of its own token confidence and the confidence of the currency it cancels against, and is charged inside that currency’s bucket.

Depeg Contingency

When the cash asset depegs from $1, the initial margin loss factor increases in proportion to the depeg:
Formula
where
  • PEG_LOSS_FACTOR = 4.0
  • PEG_LOSS_THRESHOLD = 0.99

Open Interest Caps

Each universe caps the open interest, spot supply and spot borrow of every instrument its portfolio manager supports. See Supported Products.

Risk Reducing Trades and Risk Assessors

As is the case with the standard manager, on the smart contract level the portfolio margin risk manager will allow any trade to be conducted so long as it satisfies either of the following conditions:
  • the initial margin of the portfolio after the transaction is conducted is positive (IM(post) > 0) OR
  • the trade is risk reducing (see the description in Standard Margin).
A subtle but key difference is that closing perpetual positions for portfolio margined accounts is not considered a risk reducing transaction. This is because perpetuals could act as a delta hedge and so removing these positions might increase the risk of the portfolio. As with the standard manager, the portfolio margin manager will also support risk assessors. In addition to the aforementioned benefits of allowing general risk reducing trades, risk assessors are necessary because computing all scenarios for portfolio margin on chain is expensive. In order to minimise such gas costs and offer traders large portfolio margined accounts, risk assessors only have to compute 3 scenarios on chain: the “mark-to-market” (mtm) scenario (where spot and vol are static) and the two scenarios used to compute the forward loss. This means that the risk assessors cannot allow insolvent positions to be opened. They can, however, allow liquidatable positions to be opened.

Example

Consider an account in the Prime universe comprised of the following:
  • 0.1 x SHORT BTC $100,000 CALL
  • 0.1 x LONG BTC $115,000 CALL
  • 0.1 cbBTC
  • $2,000 USDC
Both options share an expiry 30 days out. BTC spot is 100,000,the30dayforwardis100,000, the 30 day forward is 100,500, implied volatility is 55% at both strikes and the risk free rate for the expiry is 5%. The unshocked option value is -$468.86, so the portfolio’s mark-to-market value is
Formula

Computing Regular Loss

The volatility shocks for this expiry are, with tau = 30/365 so VEGA_POWER = 0.3:
Formula
The down shock is a good illustration of MIN_VOL_EVAL_SHOCKED: the arithmetic gives 41.25%, but BTC’s floor of 50% binds, so the vol-down scenarios are priced at 50%. The discount factors are
Formula
The expiry’s value is negative in every scenario below, so neg_disc applies throughout. The cbBTC balance is risk cancelling, so it is shocked alongside the options.
Formula
The account is long 0.1 BTC of spot against a call spread that only covers it above $100,000, so the worst regular scenario is the bottom of the grid.

Computing Tail Loss

Running the same calculation over BTC’s 8 tail nodes and applying each node’s dampening:
Formula
The -66% node’s raw loss is -6,131.14; dampened, it charges -751.80.

Computing Skew Loss

With tau = 30/365, k_star = max(0.01, 4 * sqrt(30/365) * 0.6) = 0.6881 and mult_cap = 0.25 - 0.1 * sqrt(30/365) = 0.2213. The four rails give:
Formula

Computing Forward Loss

Shocking the forward by ±3.5% with volatility unchanged:
Formula

Putting it together

Formula
The contingencies are the option contingency (one net short strike, 0.1 contracts) and the risk cancelling collateral haircut on the cbBTC:
Formula
And finally:
Formula
Had this account also held ETH positions, their own 23-cell grid, tail ladder, skew rails and contingencies would be computed independently and the resulting maxLoss added to the BTC one. Losses in ETH would not be offset by gains in BTC.