# 预言机

价格预言机的角色是为期货交易对提供价格。该平台根据货币的流动性将其分类为 CEX 货币和 DEX 货币。接下来，我们将描述这两类币种的预言机实现。<br>

### 中心化(CEX) 币种

我们把流动性集中在中心化交易所的币种统称为CEX币种。下面以 BTC 为例，解释喂价机制。

1. **计算USDT/USD价格**

平台选取了coinbase, kraken, bitfinex , crypto.com 4家交易所的USDT/USD价格，选取中位数作为公允的USDT/USD价格。

2. **计算BTC/USDT 价格**

平台选取了Binance, Okx, Coinbase , Bitget, Gate 5家交易所的BTC/USDT价格，计算出中位数价格， 然后对与中位数价格差距大于3%的数据做异常处理(大于中位数1.03倍按1.03倍计算，小于0.97倍按0.97倍计算），最后计算均值作为公允BTC/USDT价格。

3. **计算BTC/USD价格**

平台从四家交易所(Coinbase、Kraken、Bitfinex、Crypto.com)中选择 USDT/USD 的价格，并取其中位数作为公允的 USDT/USD 价格。&#x20;

我们使用 Chainlink 链上价格喂价进行预言机风险管理。当 预言机价格偏离一定阈值（根据不同的交易对和市场进行调整）时，价格将被拒绝。这种风险管理措施有效防止预言机数据异常的风险。

### 去中心化(DEX)币种

\
我们把币种流动性主要集中在去中心化交易所的币种统称为DEX 币种。下面将以 UNIBOT 为例，解释价格喂价机制。

* **计算UNIBOT/USD价格**

平台选择 Uniswap 上流动性最高的池子（例如，UNIBOT/WETH v2 pool），获取 UNIBOT 价格，并换算为 USD 价格。

###


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.substancex.io/zh/yong-xu-he-yue/yu-yan-ji.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
