[ARFC] Pyth to support AAVE on Optimism as a secondary oracle

Thank you very much for all the replies — we much appreciate the feedback and questions.

Community Support

Working on this proposal has lead us to engage with many Aave stakeholders who have generally expressed an interest in having Pyth being tried out as a secondary oracle for Aave.

  • The initial forum post received 10+ positives replies, both from prominent Aave stakeholders (Flipside, LBS Blockchain, Index Coop, Wintermute, and Michigan Blockchain) and significant Optimism actors (Synthetix, OP Labs and Lido).
  • Which then translated in a positive snapshot vote with 66.9% For, 30.6% Abstain and 2.5% Against.

Cost and Benefits

We understand and value the work done by Chaos Labs for Aave on oracle risks and safety and would definitely dedicate time and resources to help them in their evaluation of the Pyth oracle. In regards to the general concerns around additional costs to be accounted for such integration, none of the financial costs will be bore by Aave. From the engineering work, to the amount of gas needed to make Pyth prices available on Optimism for Aave (for at least three months), all would be covered by the Pyth Data Association.

In addition to this cost free trial, one important aspect to have in mind is the, likely, long-term benefit (or cost saving) such solution will bring to Aave. In the Synthetix case, a switch from Chainlink to Pyth has resulted in $10mm+ returned to the community and treasury.

Towards the end of the three months, the Pyth Data Association will work to provide with:

  • A comparison of the Chainlink and Pyth prices made available on-chain
  • A cost aggregate to update the Pyth price feeds

Depending on those two factors, Aave DAO will then be able to make a final decision on whether or not it is worth continuing subsidizing the Pyth price feeds as a secondary oracle on Optimism. Note that these benchmarks collected for Aave on Optimism would be, in the case of the Pyth feeds, be easily applicable to any other Layer 2 (or any of the 24 other chains Pyth is deployed on).

Pyth Data Publishers

The Pyth Network was designed as a first-party publishers from day-1 in an attempt to solve some of the limitations third-party oracles face (not all data is public and accountability). First-party publishers (85+) own, and contribute their private data to the Pyth oracle — centralized exchanges publish prices based on their orderbook ; while market actors publish prices derived from their fills.

Pyth Data Publishers Market Coverage

Among the network of publishers you find various types of companies: US accredited exchanges: CBOE, IEX, MEMX, LMAX ; publicly listed companies like Virtu or DMM like GTS, or Wintermute, DRW and QCP for crypto. This varied cohort of publishers enable the Pyth Network to support price feeds for crypto assets as well more traditional assets too (Equities, ETFs, US Rates, FXs, Commodities) which may become of interest to the Aave protocol faster than expected.

Pyth Price Aggregation and Reliability

To reduce any potential attack (or involuntarily bug), the Pyth Network relies on a thorough reliability testing to spot correlated errors from publishers as well as a simple but robust price aggregation algorithm.

It does so by by giving each publisher three votes — one vote at their price and one vote at each of their price plus and minus their confidence interval — then taking the median of the votes as the Pyth aggregated price.
In other words, as long as the majority of Pyth publishers are accurate, the Pyth price feed will remain accurate. For a price feed like ETH/USD that has 30 publishers, it would mean that, at least, 16 publishers would need to be wrong (willingly or not) at the same time. Thus an individual or a small cohort of potential malicious publishers would not impact a Pyth aggregated price.

Indeed, the Pyth aggregation algorithm is designed to deliver three properties: robust to manipulation, appropriately weight data sources with different levels of accuracy and reflect the variation between publishers’ prices. While being robust to manipulation (voluntarily or not), the Pyth prices have shown to track the broader market prices with a great accuracy. You can also compare Pyth prices against major exchanges here.

Untitled (1)

Conclusion

We think that Aave to adopt the Pyth price feeds as a secondary oracle on Optimism will (in case of Aave DAO approval) open the door for:

  • An increased reliability of Aave infrastructure
  • A cost efficient oracle solution for Aave DAO
  • An efficient solution, especially when timely liquidations are needed (long term adoption of the pull model)
  • A faster expansion capability. Pyth price feeds are available on 25 chains, the latest being Mantle and Linea — and cover many RWA