📘 [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
Formula
Portfolio MtMis 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.8andim_factor = 1.0are the loss factors applied to the worst-case loss. They are set per currency.depeg_factoris extra initial margin conditionally required to protect against the cash asset depegging.maxLossis 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 Lossis the maximum PNL loss the portfolio will endure under 23 scenarios comprised of various forward and volatility shocks.Tail Lossis 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 Lossis 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 Lossaccounts for the forward basis for each expiry moving unfavourably against the trader.Collateral Contingencyis 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 Contingencyis extra margin added for each perp position held by the account.Option Contingencyis extra margin added for each naked short option held by the account.Oracle Contingencyis 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
n(collateral)is the balance of a given collateral asset in the account, negative if borrowed.Spotis the spot price of the collateral asset.HAIRCUT_LONGis the fraction of mark value not credited.MM_LONG = 0.126for 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_SHORTmeans 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 byFormula
r_Tis the discounting rate for the expiryT, typically marked to US T-bills.Tis the time to expiry in yearsFis the forward priceKis the strikeN()is the cumulative normal distribution function
Regular Loss
To computeRegular 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 scenariok:
Formula
Collateralis 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 scenariok.collateral_spotis 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 scenariok:
Formula
Perp Positionis the number of perpetual contracts (this number is negative for shorts).Spot Shockₖis the shock to the spot price for scenariok.Perp Priceis the mark-to-market value of the perpetual.
Shocked Option Value
The account’s option positions are grouped and shocked per expiry. Each expiryi 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
Formula
IVis the implied volatility of strikej.Time To Expiryis the number of years until expiry.VOL_RANGE = -VOLRANGEDOWNif IV is being shocked down andVOLRANGEUPif it is being shocked up (see the table above).VEGA_POWER = SHORTTERMPOWER = 0.3if time to expiry ≤ 30 days.VEGA_POWER = LONGTERMPOWER = 0.13if time to expiry > 30 days.DTE_FLOOR = 1day 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 expiryi, suppose the rate is r_i (clamped at zero) and time to expiry in years is tau_i. The mark discounting is
Formula
i is
Formula
STATIC_DISCOUNT = 0.98STATIC_DISCOUNT_NEG = 1.02RFR_FACTOR1_POS = RFR_FACTOR1_NEG = 0.0RFR_FACTOR2_POS = RFR_FACTOR2_NEG = 0.10
Formula
Scenario Analysis
The portfolio’s loss under scenariok 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, adampening_factor specific to each tail scenario is applied to the PNL for that scenario:
Formula
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
Formula
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
MIN_K_STAR = 0.01, MIN_WIDTH_SCALE = 4, VOL_PARAM_1 = 0.6 and VOL_PARAM_2 = 0.
The multiplier is then
Formula
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 isFormula
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 byFWD_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
Formula
ADD_FACTOR = 0.5MULT_FACTOR = 2.0Time To Expiryᵢis the number of years until expiry.
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
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
Net Option Sizeⱼis the net number of option contracts held at strikejwithin an expiry (negative for net short).OPTION_STATIC_MARGINis0.0015(maintenance) and0.0025(initial) for BTC and ETH.
Oracle Contingency
This works as in the Standard margin, but with three differences:- The option contingency counts the total (absolute value of the) number of long and short option contracts at a strike, not just short contracts.
- The perpetual feed’s confidence also enters the option contingency:
min(Spot, Forward, Vol, Perp). - The threshold is strict and extra margin is added when confidence is below
THRESHOLD_CONFIDENCE = 0.55, not at it.
Formula
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
PEG_LOSS_FACTOR = 4.0PEG_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).
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
Formula
Computing Regular Loss
The volatility shocks for this expiry are, withtau = 30/365 so VEGA_POWER = 0.3:
Formula
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
neg_disc applies throughout. The cbBTC balance is risk cancelling, so it is shocked alongside the options.
Formula
Computing Tail Loss
Running the same calculation over BTC’s 8 tail nodes and applying each node’s dampening:Formula
Computing Skew Loss
Withtau = 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
Formula
Formula
maxLoss added to the BTC one. Losses in ETH would not be offset by gains in BTC.