You want leverage. You want lots of leverage. Big, spicy, heart-attack-probability leverage, but you also prefer the rails to stay on the roller-coaster long enough to cash out while you’re busy tweeting your P&L.
Traditional finance figured this out a century ago with clearing—the dull middle-office machinery that nets trades, yanks excess margin, and quietly stops the world from financial annihilation every afternoon.
Meanwhile, DeFi, in its infinite meme-powered wisdom, shipped everything except clearing. We built unicorn AMMs, perps, cow pools, and JPEGs with magical ponies, then left risk management to “DYOR” and vibes. Cute. Also unstable.
Pascal Protocol exists to fix that mess. We’re the clearing layer. We implemented portfolio margining on-chain, without the hand-waving. We turn your BIG BEAUTIFUL trading chaos into deterministic probabilities—so you can lever up without blowing up the chain.
We’re standing between your portfolio and the liquidation feed.
Calculation of portfolio margin, brought to you by the Pascal Protocol (formerly CVEX—yeah, we changed the name, deal with it).
Alright, before we start swimming in Greek letters, let’s clear the air: leverage is a result, not a strategy.
While degens brag about ×50 like it’s a personality trait, real traders—and I mean the ones who don’t blow up once a quarter—don’t think in “leverage”.
They think in margin terms—the capital buffer that decides whether you’re a responsible adult or tomorrow’s liquidation tweet.
Leverage is merely the ratio of position size to that buffer—the output of a risk model, not the input.
Your position size is the notional risk you’re taking; the required margin is the amount of collateral the clearing system demands you lock to keep your positions alive; and leverage is just the quotient of those two:
$L = N / E$, where $N$ is notional and $E$ is portfolio equity.
Mis-size the denominator against required margin, and you don’t have a position; you have an involuntary market order—better known as liquidation.
That’s why Pascal’s risk engine talks exclusively in required-margin terms.
When markets move, leverage doesn’t save you—margin does.
How much money do you actually need to cover your bets?
Spoiler: the villain in every liquidation tweet is not leverage; it’s margin mis-pricing.
So start thinking in margin terms, not just X’s next to your P&L, and welcome to grown-up risk management.
Now, whether every derivatives venue (dressed up as an exchange, a perp DEX, or a yield unicorn) lives or dies boils down to just two questions:
- How much margin is required?
- What happens when equity falls below that?
Everything else—chart skins, staking points, gamified badges, anime mascots, or whatever else—exists to distract you from those two lines in the docs. It’s ornamental fluff.
Get those two wrong and your exchange is an uninsured casino with prettier fonts.
It doesn’t matter how good your UI is or how many Discord mods you have. You’re dead. Get it right and you’re a clearing house with a user interface.
And we believe DeFi deserves better.
Margin calculation itself has a small evolutionary tree. Traditionally, each margin system evolves in a few stages:
- Isolated margin – every position is its own little panic room. Easy on the brain, inefficient, dumb.
- Cross margin – same logic, but a shared bucket of funds that can cover multiple positions. That’s better, but still basic: it assumes all positions are equally risky and ignores correlations.
- Portfolio margin – the only model that actually understands how portfolios work, using the Value-at-Riskmeasure. It looks at all positions together, understands how they offset or reinforce each other, prices them as a single probability distribution, and sets margin accordingly.
Welcome to TradFi 1998. They figured out the final stage decades ago.
DeFi, bizarrely, is still celebrating Stage Two as innovation. But hey, we were busy launching meme coins.
For those who slept through Quant 101, the Value-at-Risk measure asks a single question:
“What is the worst-case loss I should expect over a given time window at a given confidence?”
or
“How much could you lose on a bad day—say, with 1% probability?”
or
“Given 100 different days, how does the worst one look for my P&L chart?”
or
“With 99% confidence, I won’t lose more than $X$ in a day. What is $X$ equals to?”
or
“What’s the worst I lose tomorrow with only a 1% chance of embarrassment?”
You get the idea.
Do it for a single position or for the entire portfolio with whatever crazy combination of positions and orders you’ve got cooking—the same math, but with the covariance matrix included.
Imagine you’re long $400k BTC and short $350k ETH.
Each leg has a 10% one-day VaR, so the back-of-a-napkin crowd says:
“Lock $40k + $35k = $75k of cross margin.”
Easy to understand, but wrong.
BTC and ETH don’t implode in perfect sync; their daily returns wobble together with only ≈ 0.5 correlation.
Feed that into a proper covariance matrix and the portfolio VaR comes out around $47k. Same protection, 32% less capital, because properly calculated VaR recognizes your hedge.
That’s what hedging feels like in dollar terms. Now you get to keep more capital for trading, yield farming, or whatever questionable altcoin you’re rotating into next. And it gets better.
A VaR margin engine doesn’t just stop at hedging—it also recognizes diversification.
You might have ten long positions that, in isolation, look scary.
But they offset each other, and your portfolio risk is lower than the simple sum of individual risks. That’s not charity. That’s precision.
You’re not penalized for having a diverse portfolio. You’re rewarded. Other systems overcharge you just to be safe.
But Pascal understands VaR.
Whatever your portfolio looks like, Pascal applies a much more precise calculation—one that captures the actual variance and covariance between everything you have.
Think of it as the shift from Newtonian mechanics to Einstein’s general relativity. More complex? Definitely. Way more accurate? Absolutely.
So we never lock more margin than necessary—we ask exactly what’s needed—and that’s always less.
Sounds simple in theory. Brutally hard to implement correctly. But we did it.
…which brings us to the formula. Yes, there’s math:
Where:
* $M_i^{+} = \alpha_i^{+}{N}_i^{+}$ — long‑side exposure for index $i$.
* $M_i^{-} = \alpha_i^{-}{N}_i^{-}$ — short‑side exposure for index $i$.
* ${N}_i^{+/-}$ — combined notional value of long/short positions of index $i$ in your portfolio.
* $\alpha_i^{+/-}$ — direction‑specific volatility scaled to a 99% tail—how crazy the market swings. Markets punish shorts harder than longs, so we keep them separate.
* $\beta_{ij}$ — correlation *across* indexes; how positions move together.
* $\gamma_i$ — long‑short correlation *within* one index.
Basically, $N_i^{+/-}$ describes your portfolio, alpha tells you how volatile, beta tells you how correlated, and gamma tells you how liquid (or illiquid) each market is. Plug, square‑sum, square‑root. Voilà—margin that *actually* matches risk. Easy, huh?
We’ll decode it piece by piece.
Perhaps this is the best time to ask the question:
Why do we need to lock margin at all?
Two things can kill your position:
- The market moves and your P&L tanks
- Liquidation friction: oracles lag, spreads widen, slippage eats the rest of your savings
The formula neatly brings all these factors together.
Open the brackets, squint, and you’ll notice that the alphas and betas assemble a variance–covariance matrix; our formula essentially boils down to the standard deviation of a linear combination of a multivariate normal distribution.
Simply put, it answers:
“How volatile is your entire portfolio?”
Using the correlation matrix and the volatility factor of each index.
“Wait, but crypto returns aren’t normal,” you protest.
Hi, Taleb—you’re correct.
Returns have fat tails, black swans, Musk tweets, and surprise hard-forks.
Crypto prices don’t follow nice Gaussian distributions. That’s why our risk oracles don’t pretend they do.
They ingest those horrors and fatten the alphas & betas accordingly.
However, at the margin-calculation stage, when the input parameters are calibrated properly, this neat little formula provides the best signal-to-noise ratio given real-world noise and data imperfections.
Complicated enough to capture reality, simple enough for anyone to audit on-chain.
- Anything more exotic devolves into noise
- Anything simpler ignores hedge effects and burns capital
Pick your poison.
Imagine a perfect world with a perfect hedge:
+1 BTC, −1 BTC.
No fees, no spreads, infinite liquidity. In theory: zero risk, zero margin.
Back on Earth:
Oracles lag, spreads widen, contracts desync, liquidity gaps emerge—and that opens the gates to infinite leverage.
Deposit $0, open $1 trillion in open interest, sit back and relax.
What could possibly go wrong?
Gamma exists to stop that.
It reflects:
- Liquidity spreads
- Price ticks
- Oracle update frequency
- All those pesky real-world annoyances
There’s always a hard floor on margin—a minimum safety buffer even for a “perfectly hedged” delta-neutral portfolio.
No free lunch.
If you’re wondering about the max leverage available per asset—yes, that’s tied to gamma too.
Today we tune gamma so that maximum leverage is about ×50—a number that balances capital efficiency with realism(and, you know, not having everything blow up).
Want more? We do too.
Our ongoing quest is improving the precision of inputs (think faster oracle refresh rates) to enable even more capital-efficient trading.
And you can help by improving the parameters, especially liquidity.
There’s a bunch of other beautiful properties baked into this formula that we won’t fully unpack here:
- No wonky piecewise curves
- No rounding errors when you expand the brackets
- Fully convex—continuous and differentiable—so quants can optimize without tripping
- Index-level aggregation that scales whether you clear ten positions or ten thousand
- Handle arbitrary combinations of contracts before the gas limit hits
- Futures and options on the same asset treated with elegance and no extra costs
- Gamma has a physical, measurable meaning—finally a hedging haircut that isn’t just the fudge factor “0.3 felt right”
- Correlation matrix stays compact—we avoid quadrupling it despite valuing longs and shorts separately
The logic scales, and the result is a system that actually reflects real portfolio behavior.
It’s elegant.
It’s powerful.
And it works now.
You don’t have to understand any of this.
We did the math homework so you don’t need:
- A PhD in quantitative finance
- Five years of Python notebooks about martingale stress tests
To assess your portfolio. The system does it for you:
- Calculates your portfolio risk
- Adjusts and updates it automatically
- On-chain
- Transparently
You just trade.
If DeFi is serious about becoming the global settlement layer, clearing must graduate from side quest to core mechanic.
Pascal Protocol is that mechanic—armored, fully automated, transparently rude.
It lets:
- Traders trade
- Protocols innovate
- Risk stay exactly where it belongs: quantified, collateralised, and nobody else’s problem
Still curious? Good, because we’re just warming up.
We haven’t even discussed:
- What happens to margin calculations when you have limit orders open (spoiler: conditional exposure matters)
- How the oracles ingest chaos and still output sane risk parameters
- How liquidation protocols and deleverage queues keep the lights on