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
  1. Concepts

Margin Engine

PreviousRisk FactorNextLiquidation

Last updated 1 day ago

The Margin Engine is the off-chain, high-performance risk computation core of Arkis. It operates as a horizontally scalable service responsible for enforcing portfolio-level margin requirements, calculating Risk Factors, and preparing liquidation plans when thresholds are breached. While Arkis is a decentralized trading ecosystem, the Margin Engine plays a centralized but transparent role in maintaining system solvency and lender capital protection.

Core Responsibilities

  1. Real-Time Portfolio Evaluation

    • Continuously monitors all active (across chains).

    • Aggregates data on borrowed assets, collateral balances, and open protocol positions.

    • Calculates portfolio market value and stress-tested value based on configurable rules.

  2. Risk Factor Computation

    • Calculates the Risk Factor for every Margin Account as:

    • Triggers margin call alerts when Risk Factor < pre-defined thresholds.

    • Triggers liquidation execution when Risk Factor < liquidation threshold (e.g. 1.0).

  3. Liquidation Planning & Execution

    • Generates a deterministic liquidation plan.

  4. Stress-Test Evaluation

    • Applies custom stress scenarios per asset class and pool.

    • Supports:

      • VaR-based simulations

      • Curve LP slippage models

      • Pendle PT maturity modeling

    • Stores and reuses calculated stress values for efficient re-evaluation every 30 seconds.

Margin Accounts