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

Improve PriceOracle setSettlementPrice reliability by storing all token pairs in an iterable collection #63

Open
zareth-san opened this issue Aug 13, 2021 · 0 comments

Comments

@zareth-san
Copy link
Contributor

Our process for setting the settlement price for Series which have just expired has several moving parts, and if we could reduce the number of moving parts to as few as possible, then our protocol as a whole would be more reliable. Specifically, right now when a Series expires the settlement price bot gets called immediately after Friday 8am and sets the settlement price for a specific token pair. This requires multiple onchain transaction calls, all of which must succeed in order for the protocol to run correctly.

Wouldn't it be more reliable if all of the lambda function had to do was call a single function, and all of the necessary settlement prices were to be set? We could do this if we use OZ's EnumerableSet to store all of the token pairs, and then we have a setAllSettlementPrices function which iterates through the token pairs and sets their prices.

We would still want an individual setSettlementPrice function in case setAllSettlementPrices takes too much gas and we need to call them individually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant