Javsphere Docs
Open AppJoin Trading Competition
  • Open Javsphere App
  • Welcome to Javsphere
  • Javsphere Stats
  • Fundamentals
    • Javsphere Set Up
      • Base Chain
      • Connect Wallet
      • Add Tokens
      • New to Crypto
    • Buy & add JAV
  • Products
    • LeverageX
      • Assets
        • Cryptocurrencies
        • Stocks
        • Forex
        • Commodities
      • Fees & Spread
      • Trader
        • Open Trade
        • Edit & Close Trade
      • Earn LLP Pool
        • Buy LLP
        • LLP Price & APY
      • xJAV Vault
        • FAQ
      • Limitations
      • Testing
      • Trading Competitions
      • Referral
    • StakeX
    • CryoVault
  • Trading Competitions
    • Current Competition
      • Create Profile
      • Create Community
      • Old competitions
        • Competition Vol. 3
        • Competition Vol. 2
        • Competition Vol. 1
        • Tournament
    • Zealy Campaign
      • Old Airdrops
        • Infinity Pass
        • CFR
        • UPT
        • DTL
        • RNG
        • DPM & Baby Dana
        • GRWV
    • Become a Sponsor
  • JAV Token
    • Utility
    • Whitepaper
      • Javsphere and JAV Token
        • JAV Token
          • Javsphere Fee Structure
          • Tokenomics
        • Added Value for Holders
        • Javsphere Technology
          • StakeX
          • CryoVault
          • LeverageX
      • Disclaimer
    • Governance
      • Onchain Proposals
      • Migration to Base
      • Offchain Proposals
      • Submit a Proposal
    • Base Migration
    • JAV Burn
  • JAVLIS
    • The Ultimate AI Agent
      • Ecosystem
      • USPs
      • Boost for LeverageX
      • Business Model
      • Roadmap
      • Virtuals as Infrastructure
      • More than a hype
      • Hiring
    • Buy JAVLIS
  • Engineering
    • Oracle System
    • Smart Contracts
      • LeverageX
        • JavBorrowingFees
        • JavFeeTiers
        • JavPairsStorage
        • JavPriceAggregator
        • JavPriceImpact
        • JavReferrals
        • JavTradingInteractions
        • JavTradingProcessing
        • JavTradingStorage
        • JavBorrowingProvider
        • LLPToken
        • Feeds
      • JavPriceAggregator
      • JavFreezer
      • JavStakeX
    • Github
    • Bug Bounty Program
  • Community & More
    • Content Library
      • Logos
      • UI Mockups
    • Social Content
    • Socials
      • Telegram Guidelines
  • LEGAL
    • Privacy Policy
    • Terms of Use
      • Excluded Jurisdictions
    • Migration Terms
    • Cookie Policy
    • Trading Competition Terms
    • Bug Bounty Terms
Powered by GitBook
On this page
  • General Description
  • Core Functionalities
  • initializeTradingProcessing
  • updateVaultClosingFeeP
  • claimPendingGovFees
  • getVaultClosingFeeP
  • getPendingGovFeesCollateral
  • openTradeMarketOrder
  • closeTradeMarketOrder
  • executeTriggerOpenOrder
  • executeTriggerCloseOrder

Was this helpful?

  1. Engineering
  2. Smart Contracts
  3. LeverageX

JavTradingProcessing

General Description

The JavTradingProcessing contract used for manages various trading-related functions, primarily focused on processing and handling market orders, trigger orders, and associated fees. It includes functionality to initialize trading processing, manage the vault's closing fees, and claim pending governance fees related to collateral. Additionally, the contract allows users to open and close market orders, as well as execute trigger-based open and close orders. It provides important getter functions to retrieve current system states, such as the vault closing fee percentage and pending governance fees for specific collaterals.

Core Functionalities

initializeTradingProcessing

  • Initializes the trading processing system with a specified parameter.

  • Parameters:

    • _valueP: A parameter to initialize the trading system (value type depends on the context, but expected to be a percentage).

  • Access Control: Public.

updateVaultClosingFeeP

  • Updates the percentage of the closing fee that will be sent to the vault.

  • Parameters:

    • _valueP: The percentage of the closing fee going to the vault.

  • Access Control: Public.

claimPendingGovFees

  • Claims the pending governance fees for all collaterals.

  • Access Control: Public.

Getter Functions

getVaultClosingFeeP

  • Retrieves the current vault closing fee percentage.

  • Returns: uint8 – The percentage of the closing fee going to the vault.

  • Access Control: Public.

getPendingGovFeesCollateral

  • Retrieves the current pending governance fees for a specified collateral index.

  • Parameters:

    • _collateralIndex: The index of the collateral for which pending fees are being retrieved.

  • Returns: uint256 – The pending governance fees for the specified collateral (collateral precision).

  • Access Control: Public.

Market Order Management

openTradeMarketOrder

  • Opens a market order based on the specified pending order data.

  • Parameters:

    • _pendingOrder: A structure containing the details of the pending order to be processed.

  • Access Control: Public.

closeTradeMarketOrder

  • Closes a market order based on the specified pending order data.

  • Parameters:

    • _pendingOrder: A structure containing the details of the pending order to be closed.

  • Access Control: Public.

executeTriggerOpenOrder

  • Executes a trigger to open an order based on the specified pending order data.

  • Parameters:

    • _pendingOrder: A structure containing the details of the trigger open order.

  • Access Control: Public.

executeTriggerCloseOrder

  • Executes a trigger to close an order based on the specified pending order data.

  • Parameters:

    • _pendingOrder: A structure containing the details of the trigger close order.

  • Access Control: Public.

Last updated 5 months ago

Was this helpful?