CVEX Docs
WebsiteAffiliate DashboardTestnet
  • Website
  • Trading Terminal
  • Introduction
    • CVEX Overview
    • Component Breakdown and Definitions
    • Use Cases and Applications for Futures and Options
  • Background
    • The State of Cryptocurrency Trading and Problems Faced
    • Perpetual Contracts and Their Limitations
    • Options Trading in Crypto Markets
    • Conclusion
  • Protocol
    • Overview
    • Protocol Owner
    • Platforms
    • Price & Risk Oracles
    • Contracts
    • Order Types
    • Positions
    • Range Orders
    • Matching Engine
    • Collateral Token (USDC)
    • Frontends
    • Clearance Bots
    • CVEX Token
    • Fees & Rewards
  • Margin & Liquidations
    • Overview
    • Futures Mark Price
    • Black Scholes Model
    • Implied Volatility Surface
    • Premium Mark Price
    • Options Hedge Ratio
    • Value-at-Risk Model
    • Risk Parameters
    • Initial & Required Margin
    • Liquidation Protocol
    • Default Fund
    • Deleverage Queue
    • Default Prevention
  • Crypto Valley Exchange Platform
    • Overview
      • Case Studies
    • Contracts
    • Margin Model
    • Fees & Rewards
    • Go To Market Strategy
    • Affiliate Marketing
    • Market Makers
    • Brokers & Structured Product Providers
    • Front End & Builder Incentives
    • Price & Risk Oracles
  • Building on CVEX
    • Development Resource
  • Strategy
    • Security measures & Risk Prevention
    • Future Work
    • Legal & Compliance
    • Team and Advisors
    • Conclusion
  • Disclaimer
  • Credits
Powered by GitBook
On this page
  1. Protocol

Overview

PreviousConclusionNextProtocol Owner

Last updated 1 year ago

This section covers the operation and structure of the protocol, to find specifics on the first implementation, and information on dynamics such as fees please see the section on platform.

Multiple platforms can be created on the protocol and each is a distinct operation, the protocol is about providing the infrastructure, the platform a specific instance.

The CVEX Protocol is the structural core of the CVEX ecosystem, functioning as a comprehensive smart contract deployed on the Arbitrum chain. It facilitates the decentralised execution of all essential operations for the platforms. Developed in Rust and implemented via Stylus, a novel approach for writing EVM-compatible smart contracts, the CVEX Protocol leverages the advantages of WebAssembly (WASM). This setup benefits from Arbitrum's EVM equivalence, ensuring that Stylus contracts are fully interoperable with Solidity contracts.

Notably, Stylus contracts executed in WASM provide a much more efficient alternative to Solidity, with over 10x improved computation and memory usage. This efficiency is primarily due to the decades of compiler development for Rust and LLVM and the faster runtime of WASM compared to the EVM. Additionally, Stylus integrates with Arbitrum Nitro's fraud-proving technology, enabling deterministically proven arbitrary WASM, forming the CVEX Protocol's technological basis​​.

The key responsibilities of the CVEX Protocol include:

  • Collateral Management: Handling deposits and withdrawals of trader collateral;

  • Order Execution: Operating the matching engine and maintaining order books;

  • Platform Management: creation of platforms and contracts, setting up price and risk oracles;

  • Risk Assessment: Validating portfolio margins and executing liquidations when necessary;

  • Financial Management: Controlling Collateral, Operational, Default, and Protocol Funds;

  • Money flow: Ensuring a fair distribution of P&L, fees, rebates, and rewards among participants;

  • Token Management: Defining the behaviour of the $CVEX token, including aspects like staking.

Roles defined by CVEX Protocol

For its effective functioning, the CVEX Protocol defines several roles, each interacting with the protocol in distinct ways:

  • Protocol Owner: Configures the global settings of the protocol and oversees the deployment of upgrades;

  • Platform Operators: Manage individual trading platforms, including their configuration, indexes, contracts, and oracles;

  • Price Oracles: Provide reliable index prices as specified by platform owners;

  • Risk Oracles: Assess and deliver volatility and correlation parameters for indexes;

  • Traders: Engage in trading activities and manage their portfolio of positions by creating orders;

  • Frontends: Facilitate the delivery of trader orders to the protocol using a meta-transaction mechanism and provide data from the protocol to end users;

  • Clearance Bots: Initiate and execute essential functions such as liquidations and order clearing to maintain market integrity.

Drawing