XTrading.exchange
  • ⭐Getting Started
    • šŸ‘‹Overview
    • šŸ“–Perpetual Basics
  • šŸ”„XTrading Alpha
    • šŸ¤–AI Terminal
    • 🦾AI-Enabled Support
    • šŸ› ļøMCP(Model Context Protocol) ready
    • āŒØļøKeyboard Shortcuts
    • šŸ“ŠChange layout
    • 🌟Lite Mode
    • šŸ‘†Fat Finger Protection
    • šŸ˜ŽPro Mode
    • šŸ””Notification in TG
  • šŸ’”Product Fundamentals
    • šŸ’øMargin Specs
    • šŸ’°Funding Payments
    • šŸ”»Liquidation
    • šŸ–¼ļøNFT Selection Criteria
  • šŸ“‘Core Contracts
    • šŸ“–OrderBook
    • šŸ“ŠMargin
    • šŸ’»Protocol Vault
    • šŸ“ƒSmart Contract Details
  • šŸ““Developer Docs
    • šŸ“‰Liquidation Doc
    • šŸ“œWhitepaper
  • šŸŽ“Legal Docs
    • šŸ”Privacy Policy
    • šŸ”Terms and Conditions
  • šŸ“šAdditional Resources
    • šŸ”–Glossary
    • ā“FAQs
    • šŸ›£ļøRoadmap
  • šŸ¤Community
    • šŸ”ŽFeature Request Form
    • 🤚Product Feedback Form
  • šŸ’°EARN $XTRA
    • šŸ¤1,000,000 $XTRA Community Activity Pool
    • ⭐XTrading Ambassador Program - Batch 1
    • šŸ“ˆTrade on XTrading and Earn Points
  • šŸ—£ļøSocials
    • šŸ”—Website
    • šŸ‘½Discord
    • 🐦Twitter
    • šŸ”ŠTelegram
    • šŸ“ŗYouTube
Powered by GitBook
On this page
  • The Significance
  • Funding Rate
  • Global Index(G)
  1. Product Fundamentals

Funding Payments

The Significance

The SNV index price is calculated on the floor prices of the compositions and is essentially independent of our perpetual market. The SNV Mark Price, on the other hand, is discovered by the participants' trading activity.

During trading, the participants may deviate the Mark Price of the SNV away from the Index Price (which is taken as the underlying).

To de-incentivize the deviation of the Mark Price away from the Index Price, Funding Payment is introduced, which flows from long position holders to short position holders if the Mark Price deviates higher and vice versa.

Funding Rate

The funding rate is a determining factor at which the deviation between mark and index prices converges.

FundingRate=(MarkPriceTwapāˆ’IndexPriceTwap)/IndexPriceTwapFundingRate = (MarkPriceTwap - IndexPriceTwap)/IndexPriceTwapFundingRate=(MarkPriceTwapāˆ’IndexPriceTwap)/IndexPriceTwap

FundingAmount=FundingRateāˆ—PositionSizeFunding Amount = Funding Rate * PositionSizeFundingAmount=FundingRateāˆ—PositionSize

The funding rate is bound to be kept between [-0.75% and 0.75%] at the protocol level.

Global Index(G)

Instead of sending out funding payments every hour, we are accumulating the funding of each user and settling whenever he/she interacts with the contracts.

We are maintaining a global Accumulator defined by the following:

Gt=Gtāˆ’1+(Ī”t)(Markāˆ’Index)/86400G_t = G_{t-1} + (\Delta_t) (Mark - Index) / 86400Gt​=Gtāˆ’1​+(Ī”t​)(Markāˆ’Index)/86400

Say, with 5 mins as the Delta,

Gt=Gtāˆ’1+(Markāˆ’Index)/288where(Ī”n)=5mins=5āˆ—60G_t = G_{t-1} + (Mark - Index)/288 \quad where(\Delta_n) = 5 mins=5*60Gt​=Gtāˆ’1​+(Markāˆ’Index)/288where(Ī”n​)=5mins=5āˆ—60

Where Ī”t\Delta_tĪ”t​ = Time in seconds between GtG_tGt​ and Gtāˆ’1G_{t-1}Gtāˆ’1​

Thus,

Gi=(āˆ‘iMarkiāˆ—Ī”iāˆ’āˆ‘iIndexiāˆ—Ī”i)/86400G_i=(\sum_i Mark_i*\Delta_i-\sum_iIndex_i*\Delta_i)/86400Gi​=(āˆ‘i​Markiā€‹āˆ—Ī”iā€‹āˆ’āˆ‘i​Indexiā€‹āˆ—Ī”i​)/86400

We also maintain a relative accumulator for each account with a position opened.

Whenever a user interacts with the account, funding to be paid is:

Funding=(Giāˆ’Ii)āˆ—PositionFunding = (G_i - I_i) * PositionFunding=(Giā€‹āˆ’Ii​)āˆ—Position

Where IiI_iIi​ is the Cached Index maintained for each participant, this is reset as GiGiGievery time after the funding is settled.

PreviousMargin SpecsNextLiquidation

Last updated 1 year ago

šŸ’”
šŸ’°