# 預言機

## **多重預言機 (規劃中)**

Scallop 價格模組以 **Pyth、Switchboard、Supra Oracles** 組&#x6210;**。**&#x9019;些價格預言機對於評估帳戶健康狀況和決定清算至關重要。每個預言機根據其數據源有不同的刷新率，我們使用它們的 **TWAP（時間加權平均價格）預言機**來提高安全性，您可以通過以下鏈接進一步了解這些內容。

* **Pyth**: <https://pyth.network/price-feeds>
* **Switchboard**: <https://switchboard.xyz/explorer>
* **Supra Oracles**:  <https://supraoracles.com/data>

🔔 **提醒：目前在 Sui 網路上，僅有 Pyth 提供相對完整且穩定的價格資料。因此，Scallop 現階段僅依賴 Pyth 作為價格數據來源。多重預言機將作為未來的發展方向，以進一步提升系統的韌性與安全性。**

## **聚合多預言機策略 (規劃中)**

為了降低借貸協議中價格操縱的風險，預言機（負責提供價格）增加了一層額外的安全措施。我們使用多個預言機並評估它們發布的價格。如果檢測到任何異常情況，我們將中止操作。主預言機被選為主要數據來源，而額外的預言機則作為對主預言機價格的補充證明。

## **\*TWAP 預言機 (開發中)**

區塊鏈預言機為 DeFi 智能合約提供現實世界的數據，例如資產價格或選舉結果。為了保護 DeFi 智能合約免受價格操縱，已實施了時間加權平均價格（TWAP）預言機來提高安全性。

TWAP 預言機提供在特定期間內資產的平均價格，使得價格操縱對攻擊者來說變得成本高昂且困難。TWAP 預言機使用加權平均法計算資產價格，其中時間作為權重。這種方法比簡單的平均值更為準確，因為它賦予分佈中某些值更高的重要性。

TWAP 預言機首次在 Uniswap v2 中引入，並在 Uniswap v3 中得到了改進，提供了一種比現貨價格或鏈下預言機更安全的替代方案。它們不易受到合謀的影響，並且對短期價格波動和閃電貸款具有更強的抵抗力。因此，TWAP 預言機對於 DeFi 的安全性至關重要。


---

# 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.scallop.io/zh/protocol/oracles.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.
