TEE-enabled Aggregated source oracle
Introduction: Resilient and Verifiable Aggregated Feeds
Our aggregated price feeds are designed to provide the high level of accuracy and resilience. They build upon the cryptographic security of our single-source Trusted Execution Environment (TEE) architecture, combining it with statistically robust multi-source models to create a price feed that is both verifiably accurate and highly resistant to manipulation.
Core Security: Verifiable Inputs
The integrity of our aggregated feeds begins with the integrity of their components. Each individual price (e.g. from Binance, Kraken, or Coinbase) is first processed through our TEE-based system.
This means that before any aggregation occurs, each input price is:
Sanity Checked: The price is validated against other independent sources to reject immediate outliers.
Attested: A TEE attestation is generated, providing cryptographic proof of the data's origin and that it has not been tampered with.
Crucially, our system can provide the individual TEE attestations for every price used in an aggregation. This open approach is a unique security feature. Instead of a "trust us" black-box median, we provide a statistically resilient price and the auditable, end-to-end proof that every component of that price originated from its verified source.
Accuracy: Statistical Resilience and Purpose-Built Logic
Our aggregation engine is built for two distinct types of accuracy: statistical resilience and contextual, purpose-fit logic.
1. Statistical Resilience (Median)
For standard market feeds, such as the aggregated ETH/USDT price, the system calculates a median from five independent, high-volume sources. This model is inherently resilient to common attack vectors:
Single-Source Manipulation: A single malicious or faulty source is statistically ignored by the median calculation. An attacker would need to compromise a majority of the sources (e.g., 3 out of 5) simultaneously to influence the price.
Flash Loan Attacks: Sudden, artificial price swings on a single exchange are rejected as outliers and do not affect the final medianised price.
2. Bespoke Accuracy (Index and Mark Prices)
We recognise that "accuracy" depends on the use case. Our system can be configured to compute bespoke calculations on demand, providing the specific price data our users need.
Index Price: Used for calculating funding rates, this is typically the median of spot market prices from a set of exchanges (e.g.,
median(Binance_spot, Coinbase_spot, ...)).Mark Price: Used for calculating PnL and liquidations, this is a more complex, bespoke formula.
This flexibility allows us to provide a verifiably secure price that is contextually correct for its specific on-chain purpose.
Liveness and Multi-Layered Validation
The aggregated feeds are protected by the same multi-layered validation framework as our single-source feeds, ensuring data is both timely and secure.
Intelligent Liveness: To ensure data is fresh and efficiently published, the system designates one source (e.g., Binance) as a 'leader' to trigger new aggregate calculations. If this leader source becomes unavailable, the system automatically fails over to other sources, guaranteeing high availability.
Stale Price Removal: Outdated prices are automatically removed from the system and are never used in an aggregation. When the leader source triggers an update, the system calculates the aggregate using the new leader price and the latest available prices from the other sources.
Layered Validation: The final aggregated price undergoes a final, critical check. While individual inputs are checked off-chain, the aggregated price is validated again by the smart contract. Any update that deviates beyond a set threshold is automatically flagged as 'pending' and requires curator validation before it can be activated.
Resilience Against Common Attack Vectors
This multi-source, multi-layered architecture provides defence against common oracle exploits, offering significantly more resilience than a single-source feed.
Data Manipulation / Malicious Sources: This is the primary strength of the aggregated model. To manipulate the price, an attacker cannot simply compromise one source.
Statistical Rejection: By using a median (from 5 sources), a single malicious source reporting an incorrect price is statistically ignored.
High-Cost Attack: An attacker would need to compromise a majority of the sources (e.g. 3 out of 5) simultaneously to skew the median.
On-Chain Backstop: Even if an attacker achieved this, the resulting price would likely be a large deviation, which would be caught and flagged as 'pending' by the on-chain fluctuation check.
Flash Loan / Volatility Attacks: These attacks, which cause sudden, artificial price swings on a single exchange, are inherently defeated by the aggregation logic.
Outlier Rejection: The anomalous price from the one affected exchange is fed into the medianiser as a severe outlier.
Median Stability: The median calculation discards this outlier by default, and the aggregated feed reports the true, stable market price, completely mitigating the attack.
Code Tampering and Man-in-the-Middle (MITM) Attacks: Our defence here is layered. While an attacker might target the data inputs or the calculation, both are secured.
Input Security (TEE): An attacker cannot perform a MITM attack on the component feeds (e.g. Binance, Kraken) because each one is secured by a TEE, providing cryptographic proof of connection to the original source.
Auditable Aggregation: The system provides the individual TEE attestations for each input used in the calculation. This allows any user to verify that the data fed into the medianiser was untampered.
Stale Data Attacks: The system is actively protected against the use of stale data for manipulation.
Active Removal: Stale prices are automatically removed from the system and are not included in an aggregation calculation.
Liveness Failover: The leader/failover mechanism ensures that the aggregated feed itself remains live and continues to update, even if the primary trigger source goes down.
Compromised Admin Keys: The aggregated feed contracts are protected by the same robust, on-chain governance mechanisms as our single-source feeds.
Role-Based Access: Contracts limit permissions, preventing a single compromised key from causing significant damage.
Multisig Administration: All critical functions—such as changing the list of sources, adjusting the fluctuation threshold, or updating the contract—require a multisig transaction. This prevents a single point of failure and makes a rogue administrative action exceptionally difficult.
Last updated