Reya
  • Start Here
    • Why Reya?
  • REYA PRODUCTS
    • Reya DEX
      • Navigating Reya DEX
        • Dashboard: getting started
          • Creating your margin account
          • Moving funds
          • Checking your account
        • The Trading Screen
          • Trade form
          • Market Data Panel
        • LP Pool
      • Trading on Reya DEX
        • Perpetual Futures
        • Margin
        • Auto-exchange and Liquidations
        • Specifications
        • Conditional Orders
        • FlashSwap
        • Collateral liquidations
        • Settlement and cross-collateralization
      • Docs: Reya DEX REST API
      • Docs: Reya DEX WebSocket
    • Reya Network
      • The structure of Reya Network
      • The Liquidity Layer
        • Reya’s pool for perpetual futures
        • Offering liquidity in the passive pool
        • Deepdive into passive perps
        • Network Owned Liquidity
      • Derivatives Clearing
        • Automatic leveraging of PnL across instruments
        • Cross-collateralization
          • Haircuts
          • Auto-exchange conditions
          • Auto-exchange mechanism
        • Cross-margining
          • The margin system
        • The liquidation engine
          • Ranked liquidations
          • Dutch auction
          • Backstop LPs
          • Insurance Funds
          • Page 1
        • Spot markets
        • Reya Governance
      • What's the roadmap
      • Who's Behind Reya Network
    • rUSD / srUSD
      • rUSD
      • srUSD
      • srUSD How to and FAQs
  • COMMUNITY
    • Join the Reya Community
    • Incentives Overview
      • Experience (XP)
        • Technical details
      • Boosts
      • Ranks and Seasons
    • x.com
  • Technical Docs
    • Reya Python SDK
    • Contract Functions
      • Core
      • Passive Perp Instrument
      • Passive Pool
      • Oracle Adapter
    • Contract Addresses
    • Smart Contract Withdrawals
    • Audits
  • REYA RESOURCES
    • Blog
    • Beginner's Guide to Better Trading with Reya
    • Block Explorer
    • Glossary (coming soon)
    • FAQ (coming soon)
Powered by GitBook
On this page
  • Exposures
  • The risk matrix
  1. REYA PRODUCTS
  2. Reya Network
  3. Derivatives Clearing
  4. Cross-margining

The margin system

Exposures

Instruments in REYA have linear exposures to these risk factors. Explicitly, this means that if risk factors are a multivariate random variable RtR_tRt​ of nnn factors, then each instrument determines a vector EtE_tEt​such that the price of the instrument is

Pt=Et′RtP_t=E_t'R_tPt​=Et′​Rt​

This means in particular that the entries of $E_t'$ transform the risk factors into token amounts. As a consequence, note that the exposure vector will often be a function of more than just time: for example, if a given risk factor is the relative (percentual) returns rt,ir_{t,i}rt,i​ of some asset, then et,ie_{t,i}et,i​ will generally have the price pt,ip_{t,i}pt,i​ as a factor to transform the percentual return rt,ir_{t,i}rt,i​ into an absolute return pt,irt,ip_{t,i}r_{t,i}pt,i​rt,i​ in token amount. For example, if a user holds exposure of two units of ETH when its price is $1500, then their exposure is $3000.

Finally, note that by linearity, exposures are additive, meaning that a portfolio’s exposure is simply the weighted sum (with portfolio weights) of the exposure vectors of each component.

The risk matrix

Having established the fundamental framework, pools in REYA take as risk parameters an n×nn\times nn×n matrix AAA, as well as two multipliers λM\lambda_MλM​ and λI\lambda_IλI​. Given this matrix, REYA computes the liquidation margin requirement for a portfolio exposure vector EEE as

LMR=E′AE\mathrm{LMR}=\sqrt{E'AE}LMR=E′AE​

and then MMR=λMLMR\mathrm{MMR}=\lambda_M\mathrm{LMR}MMR=λM​LMR and IMR=λILMR\mathrm{IMR}=\lambda_I\mathrm{LMR}IMR=λI​LMR.

The matrix AAAof course, must be carefully chosen and updated for the system to appropriately margin portfolios. The cases of multivariate normal and Student's t-distribution are instructive in getting intuition about the risk matrix.

However, REYA will generally rely on a more flexible version, where the components can be independently adjusted according to risk estimates mixing, e.g., Value-at-Risk and Expected Shortfall methods.

PreviousCross-marginingNextThe liquidation engine