Reduce use of Payments for priceQuotes from priceFeeds #10745
Labels
deployment
Chain deployment mechanism (e.g. testnet)
enhancement
New feature or request
oracle
Related to on-chain oracles.
performance
Performance related issues
resource-exhaustion
Threats to availability from resource exhaustion attacks
What is the Problem Being Solved?
In order to make it possible for consumers of prices from the oracles to share verifiable quotes, the priceAuthorities provide their info both as a PriceQuote (which is a ratio), and a Payment. Clients who get such a payment from someone else can ask the QuoteIssuer to verify the amount. (
anIssuer.getAmountOf(payment)
, oranIssuer.isLive(payment)
. This doesn't work with more than one adversarial clients, as any of them can deposit or burn the payment, making it useless to the others.)These Payments are expensive, and though we've address a large portion of the expense by not holding the payments in RecoverySets, we should still look for ways to reduce this usage.
Description of the Design
None of the current usages require sharing quotes, so no one every looks at the Payments. If there's a future need for verifiable quotes, we could use the Sealer/Unsealer pattern.
For now, I would suggest just adding a new API to the priceFeeds that provides unauthenticated prices. A caller that is communicating directly with a priceAuthority and doesn't intend to share the prices further doesn't need assurance that the prices are authentic.
Security Considerations
No reduction in security.
Scaling Considerations
Improves our ability to scale the chain further.
Test Plan
straightforward.
Upgrade Considerations
First upgrade scaledPriceAuthorities and fluxAggregators, then individual contracts can be upgraded. When all clients have switched, we could remove the old methods.
The text was updated successfully, but these errors were encountered: