Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce use of Payments for priceQuotes from priceFeeds #10745

Open
Chris-Hibbert opened this issue Dec 19, 2024 · 0 comments
Open

Reduce use of Payments for priceQuotes from priceFeeds #10745

Chris-Hibbert opened this issue Dec 19, 2024 · 0 comments
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

Comments

@Chris-Hibbert
Copy link
Contributor

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), or anIssuer.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.

@Chris-Hibbert Chris-Hibbert added enhancement New feature or request deployment Chain deployment mechanism (e.g. testnet) performance Performance related issues resource-exhaustion Threats to availability from resource exhaustion attacks oracle Related to on-chain oracles. labels Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

No branches or pull requests

1 participant