arrow-left

All pages
gitbookPowered by GitBook
1 of 3

Loading...

Loading...

Loading...

WBTC

Learn more about f(x) V2 oracle mechanism.

The f(x) 2.0 price oracle mechanism for WBTC/USD combines multiple data sources, including Chainlink, Uniswap and Curve, to calculate spot prices and anchor prices. It defines Max and Min Price for WBTC/USD based on these sources and uses a governance-adjustable threshold (default 2%) to decide whether to rely on the Anchor Price or the Max/Min Price for operations like rebalancing, minting, or redeeming. This ensures accurate and stable pricing while accommodating market fluctuations. Below is the detailed breakdown of the WBTC Spot Price Oracle Mechanism:

hashtag
BTC/USD Spot oracle:

  1. []

  2. []

  3. [] * []

hashtag
WBTC/BTC Spot oracle:

  1. []

hashtag
WBTC/USD Anchor Price oracle:

  • [] * []

hashtag
The Algorithm of WBTC/USD Max and Min Price:

  • Max: WBTC/USD Price=Max(Anchor Price, [WBTC/BTC Spot Max Price ]*[BTC/USD Spot Max Price ])

  • Min: WBTC/USD Price=Min(Anchor Price, [WBTC/BTC Spot Min Price ]*[BTC/USD Spot Min Price ])

hashtag
Price Checking Mechanism:

  • Anchor Price is used, while the price difference between Anchor Price and Max/Min Price exceeds the threshold

  • The threshold is a governed parameter, 2% in default

hashtag
Conclusion:

  • Min WBTC/USD Price is used for Open/Close of xPOSITION risk control, Rebalance and Liquidation if the price difference between Anchor Price and Min Price doesn’t exceed the threshold. Anchor Price is used otherwise.

  • Max WBTC/USD Price is used for Redeeming fxUSD if the price difference between Anchor Price and Max Price doesn’t exceed the threshold. Anchor Price is used otherwise.

  • Max WBTC/USD Price is used for Open/Close of sPOSITION risk control, Rebalance and Liquidation if the price difference between Anchor Price and Max Price doesn’t exceed the threshold. Anchor Price is used otherwise.

Min WBTC/USD Price is used for Redeeming sPOSITIONs when the system runs out of leverage long collaterals to meet xPOSITIONs’ closing and risk management options if the price difference between Anchor Price and Min Price doesn’t exceed the threshold. Anchor Price is used otherwise.

Chainlink BTC/USD Spotarrow-up-right
Uniswap V3 WBTC/USDC 0.3% Spotarrow-up-right
Uniswap V3 WBTC/ETH 0.3% Spotarrow-up-right
Uniswap V3 USDC/ETH 0.05% Spotarrow-up-right
Chainlink WBTC/BTC Spotarrow-up-right
Chainlink WBTC/BTC Spotarrow-up-right
Chainlink BTC/USD Spotarrow-up-right

stETH

Learn more about f(x) V2 oracle mechanism.

The f(x) 2.1 price oracle mechanism for stETH/USD combines multiple data sources, including Chainlink, Uniswap, Curve, and Balancer, to calculate spot prices and anchor prices. It defines Max and Min Price for stETH/USD based on these sources and uses a governance-adjustable threshold (default 1%) to decide whether to rely on the Anchor Price or the Max/Min Price for operations like rebalancing, minting, or redeeming. This ensures accurate and stable pricing while accommodating market fluctuations. Below is the detailed breakdown of the stETH Spot Price Oracle Mechanism:

hashtag
ETH/USD Spot oracle:

  1. []

  2. []

  3. []

hashtag
stETH/ETH Spot oracle:

  1. []

  2. []

  3. [

hashtag
stETH/USD Anchor Price oracle:

  • [ ]*[]

hashtag
The Algorithm of stETH/USD Max and Min Price:

  • Max: stETH/USD Price=Max(Anchor Price, [stETH/ETH Spot Max Price ]* [ETH/USD Spot Max Price ])

  • Min: stETH/USD Price=Min(Anchor Price, [stETH/ETH Spot Min Price ]* [ETH/USD Spot Min Price ])

hashtag
Price Checking Mechanism:

  • Anchor Price is used, while the price difference between Anchor Price and Max/Min Price exceeds the threshold

  • The threshold is a governed parameter, 1% in default

hashtag
Conclusion:

  • Min stETH/USD Price is used for Open/Close of xPOSITION risk control, Rebalance and Liquidation if the price difference between Anchor Price and Min Price doesn’t exceed the threshold. Anchor Price is used otherwise.

  • Max stETH/USD Price is used for Redeeming fxUSD if the price difference between Anchor Price and Max Price doesn’t exceed the threshold. Anchor Price is used otherwise.

  • Max stETH/USD Price is used for Open/Close of sPOSITION risk control, Rebalance and Liquidation if the price difference between Anchor Price and Max Price doesn’t exceed the threshold. Anchor Price is used otherwise.

Min stETH/USD Price is used for Redeeming sPOSITIONs when the system runs out of leverage long collaterals to meet xPOSITIONs’ closing and risk management options if the price difference between Anchor Price and Min Price doesn’t exceed the threshold. Anchor Price is used otherwise.

https://data.chain.link/feeds/ethereum/mainnet/eth-usdarrow-up-right
https://app.uniswap.org/explore/pools/ethereum/0x88e6A0c2dDD26FEEb64F039a2c41296FcB3f5640arrow-up-right
https://app.uniswap.org/explore/pools/ethereum/0x8ad599c3a0ff1de082011efddc58f1908eb6e6d8arrow-up-right
stETH/ETH Curve Spotarrow-up-right
stETH/ETH Univ3 Spotarrow-up-right
stETH/ETH Curve2 Spot]arrow-up-right
stETH/ETH Curve EMAarrow-up-right
ETH/USD Chainlink Spotarrow-up-right

Oracle

Learn more about f(x) V2 oracle mechanisms.

WBTCchevron-right
stETHchevron-right