LogoLogo
TwitterWebsiteTestnet
  • Introduction
    • About B3X
  • World Market
    • Introduction
    • Problems with Current Markets
      • DeFi's Never-Ending Cold Start Problem
      • Limited Utility for Existing Assets
      • CeFi Dominates with 100x Volume
      • Outdated DeFi Perps Offerings
      • Consistent Battle for Liquidity
      • Stablecoins with No Use-case
      • Unfair LP Treatment
      • No Settlement Venue is Best
  • Introducing: The World Market
    • Solving the Crypto UX Nightmare
    • Purposeful Stablecoins
    • Unlimited Open Interest
    • Enabling Deep Liquidity
    • LPs as 1st Class Citizens
    • First-Principle Orderbook Design
  • World Modules
    • Delta-Neutral Stablecoin
    • Yield-Bearing Stablecoin
    • Long-Only Vault
    • Short-Only Vault
    • Long vs Short Vault
    • Lending
    • Funding Rate Collector
  • Future: Supercharged DeFi
    • User-Centric Intent, Action, and Execution Marketplace
    • Yield Trading
    • Simplified Market Experience
    • LPs as First-Class Citizens: Mini DAOs
    • Building Distribution for all — Chains, Protocols and Users
    • Resolving Cold-start Problem
    • Launching New Markets
    • Building Solutions with Derivatives as a First Principle
    • Bootstrapping TVL Growth: Unlocking DeFi’s True Potential
    • Boosting Token Utility
    • Meaningful Second-order Incentives
    • Boosting Economical Security of DeFi protocols
  • Our Call to Action
  • Technical Specs
    • Architectural Design
    • Pricing Mechanism
    • Risk Management
      • Risk Factors
      • Price Protection
      • Auto Deleverage
      • Liquidation
    • Settlement Design
    • Asset Management
    • Market Management
  • Fees
  • Testnet
    • World Market (Rise)
  • World Fund
    • Introduction
    • The Problem
    • Architecture
      • User Layer
      • Human-driven Application Layer
      • AI-driven Application Layer
      • Infrastructure Layer
    • Core Components
      • Fund Builder
      • Quant Agent
      • Strategy Framework
    • Decentralized Architecture
    • Execution Layer
    • Conclusion
    • References
    • Original Whitepaper PDF
  • Economics
    • World Market
    • World Fund
  • External Links
    • Website
    • Twitter
    • Discord
Powered by GitBook
On this page
  • Price Manipulation Protection
  • Price Source Deviation Check
  • Price Source Outlier Check
  • Price Feed Fault Check

Was this helpful?

Export as PDF
  1. Technical Specs
  2. Risk Management

Price Protection

PreviousRisk FactorsNextAuto Deleverage

Last updated 9 days ago

Was this helpful?

Several price protection mechanisms have been implemented in the off-chain and on-chain infrastructure to ensure robust, tamperproof, fair and transparent pricing for all the end-users. Some of them have been mentioned below:

Price Manipulation Protection

There have been cases where a few market participants have manipulated the price and generated profits. On the other hand, there have been several oracle attacks across DeFi each year resulting in loss of millions of dollars of users' assets.

To address such issues, B3X will use a black box function to ensure tamper-proof pseudo-deterministic price for fair trade execution. This function takes a real world source as seed which is consistently changing and generates a random number using Mersenne Twister, a pseudo-random number generator.

Price Source Deviation Check

The prices of all the real-world and decentralized sources are checked for deviations as defined in the asset manager for the asset, and such factor is called Deviation Factor, DfD_{f}Df​which can be unique for each asset.

Let nnn be the number of the real-world sources with prices, P1,P2,....,PnP_{1}, P_{2},....,P_{n}P1​,P2​,....,Pn​ and PdP_{d} Pd​ be the price from a decentralized source such as Chainlink or Pyth, then if

Pi−PdPd<Df\frac{P_{i}-P_{d}}{{P_{d}}} < D_{f}Pd​Pi​−Pd​​<Df​

then ithithith price source is valid and acceptable and will be considered for final price computation.

Sample Price Feed for BTC/USD:

Binance: 45125.89, OKX: 45100.45, Coinbase: 45156.34, MEXC: 45900.90, Kucoin: 45146.22, Bybit: 45116.78, Chainlink: 45110.45, Pyth: 45111.23

In this sample, MEXC's BTC price is out of acceptable deviation (>1.5%) as compared to decentralized sources, hence will be rejected.

Price Source Outlier Check

Once all the real-world sources pass the deviation check, the off-chain infrastructure checks all the prices from these sources for outliers to ensure fair pricing for all.

In order to process this, we can define deviations of 1st1st1st price feed against other n−1n -1n−1 sources, as

D1−i=Pi−P1P1D_{1-i} = \frac{P_{i}-P_{1}}{P_{1}} D1−i​=P1​Pi​−P1​​

Hence, the deviation of 1st1st1st price feed against others can be written as D1−2,D1−3,....,D1−nD_{1-2}, D_{1-3},....,D_{1-n}D1−2​,D1−3​,....,D1−n​ and similarly for 2nd2nd 2nd price feed, we can define D2−1,...,D2−nD_{2-1},...,D_{2-n}D2−1​,...,D2−n​ and so on.

Then we compute variance of this dataset to fine-tune the sources, as

V=σ2=1J∑j=1n(Dj−σ)2V = \sigma^2 = \frac{1}{J} \sum_{j=1}^n (D_j - \sigma)^2V=σ2=J1​j=1∑n​(Dj​−σ)2

The maximum acceptable value of VVVis defined in the Asset Manager for an asset. If the VVVis not under acceptable value, the dataset is sorted in ascending order and the first and last element is removed. This process is continued until V is under acceptable value. One must note that with each elimination, the underlying price feed is also eliminated and not considered from final computation.

In the previous example, if MEXC's price feed by any chance passes the deviation check, it will fail in the outlier check since the deviations of MEXC's price feed will be highest amongst other feeds.

Price Feed Fault Check

B3X deploys an additional check of the price feed sources to monitor their uptime. Let a price feed report price, PtP_tPt​ at time ttt then the off-chain infrastructure computes, RfR_fRf​, relative price difference as

Rf=Pt−Pt−1Pt−1R_f = \frac{P_t-P_{t-1}}{P_{t-1}}Rf​=Pt−1​Pt​−Pt−1​​

If Rf=0R_f = 0Rf​=0, the price feed is considered faulty, invalid or dead, and hence will not be included to compute final off-chain price. But this check depends upon the asset, some asset may skip the fault check for example: RWA assets on off-market hours.

Since FTX Saga and several API incidents , it is important to implement fault checks for the price feed sources.

[1]
[2]