Arkis
  • Overview
    • Introduction
    • Arkis Overview
  • Concepts
    • Liquidity Pool
    • Interest Rate Model (IRM)
    • Lender
    • Asset Manager
    • Margin Account
    • Whitelisted Assets
    • Collateral Asset
    • Margin Trading
    • Overcollateralized Loan
    • Undercollateralized Loan
    • Stress-Tested Value
    • Risk Factor
    • Margin Engine
    • Liquidation
    • Margin Call
    • Vault
    • Credit Manager
    • arkisUSD
  • Quickstart
    • Sign Up
  • Arkis Portal
  • Protocol Mechanics
    • Arkis Protocol
      • How it Works
      • Liquidation
    • Arkis Risk Management
      • Introduction
      • Margin Engine v1
      • CEX-DEX Portfolio Margin v2
  • For Lenders
    • Lending
    • Monitoring Lending Position
  • Video Tutorial
  • For Borrowers
    • What can I do with Arkis?
    • Borrowing Overview
    • Working with Margin Account
    • Loan Repayment
    • CEX-DEX Portfolio Margin
    • Examples of Trades [WIP]
      • Pendle Margin Trading
      • CEX-DEX Delta-Neutral Trade [WIP]
      • Overcollateralised Loan [WIP]
      • Non-EVM Asset as Collateral [WIP]
    • Non-EVM Assets as Collateral
    • Whitelisted assets, protocols, and actions
  • Video Tutorials
    • Lending on Arkis
  • Pendle Margin Trading
  • Troubleshooting
    • Margin Account and Wallet Connect
    • Closing Margin Account
  • Prime Brokerage 101
    • Why prime brokerage?
    • What is portfolio margin?
  • FAQs
    • General FAQ
    • Glossary
  • Security
    • December 2023 Audit
    • December 2025 Audit
  • Important Links
    • Use Cases
    • GitHub
  • Brand Assets [WIP]
  • Connect With Us
    • LinkedIn
    • Telegram
    • X
    • Blog
    • Website
Powered by GitBook
On this page
  • Why centralized?
  • Margin Engine v1 Whitepaper
  1. Protocol Mechanics
  2. Arkis Risk Management

Margin Engine v1

PreviousIntroductionNextCEX-DEX Portfolio Margin v2

Last updated 24 days ago

Making the margin calculations too simple and strict leads to a problem of over-collateralized leverage and low capital efficiency. In contrast, simplistic calculations without restrictions will lead to even worse consequences - creditors take a huge risk providing the leverage. Ideally, the margin engine should take into account the following:

  1. Trading and asset management specifics.

  2. Underlying asset dynamics and risks.

  3. Aggregated portfolio risk.

In traditional finance, there are several methodologies to approach margin calculations for a multi-asset portfolio. is one of them.

In Arkis, our goal is to create a margin engine that takes into account DeFi and CeFi trading specifics and new types of asset classes (liquidity pools, exotic derivatives) as well as the volatile nature of crypto-assets, and we use the SPAN model as a starting point in our process.

Why centralized?

Proper portfolio risk estimation requires complex computations and scenario simulations that consider asset dependence and correlation. Currently, it’s not feasible to perform these intricate calculations on the blockchain due to computational and cost constraints.

Therefore, while our margin calculation remains centralized, we ensure transparency and accessibility.

At its core, the Margin Engine operates by:

  • Estimating Stress-Tested Portfolio Value (STPV): Each asset within a Margin Account has a configurable stress-test(ST)—a discount-adjusted factor that adjusts its market price based on historical volatility, liquidity conditions, and other risk parameters.

  • Calculating the Risk Factor (RF): The Risk Factor is computed as the ratio of the stress-tested portfolio value to the total borrowed amount:

  • A Risk Factor greater than 1.0 indicates that even under stress, the portfolio covers the liabilities; a value below 1.0 signals a critical risk of default, triggering margin calls or liquidation.


Estimating Stress-Tested Value

Methodology

For each asset (i) in a Margin Account, the engine determines its stress-tested value (STV_i) as:

STV_i = Market_Price_i * (1-Stress-Tested_Multiplier_i)
  • Market_Price_i is the current on-chain price for asset i.

  • Stress-Tested_Multiplier_i is a configurable parameter for asset iwithin a Liquidity Pool that reflects its risk characteristics.

The Portfolio Stress-Tested Value (STPV) is the sum of these values across all assets:

STPV = Sum for all i of (Balance_i * STV_i)

This approach provides a conservative estimate of the total collateral value under stressed market conditions.

Example

Consider a Margin Account holding two assets:

  • Asset A (ETH):

    • Market Value: $100,000

    • Stress-Tested Multiplier: 0.30

    • Therefore,STV_A = 100,000 * 0.70 = $70,000

  • Asset B (Pendle PT):

    • Market Value: $50,000

    • Stress-Tested Multiplier: 0.40

    • Therefore, STV_B = 50,000 * 0.60 = $30,000

Then, the total Portfolio Stress-Tested Value (STPV) is:

iSTPV = $70,000 + $30,000 = $100,000

Calculating the Risk Factor

The Risk Factor (RF) is calculated using the following formula:

Risk Factor (RF) = Portfolio_STPV / Total_Borrowed_Value
  • If RF > 1.0: The portfolio’s stress-tested collateral covers the borrowed value (the account is healthy).

  • If RF = 1.0: The account reaches the margin call threshold.

  • If RF < 1.0: The collateral under stress is insufficient relative to the debt, and liquidation is triggered.

Margin Engine v1 Whitepaper

Margin Engine v1 whitepaper can be found here:

https://github.com/ArkisXYZ/arkis_margin_engine_whitepaper/tree/main/margin_engine_v1
Standard Portfolio Analysis of Risk (SPAN)