Skip to content

Outdated oracle prices#28

Merged
Joeysantoro merged 1 commit intoPOZ-Fixesfrom
POZ-Outdated-Oracle-Prices
Feb 6, 2021
Merged

Outdated oracle prices#28
Joeysantoro merged 1 commit intoPOZ-Fixesfrom
POZ-Outdated-Oracle-Prices

Conversation

@Joeysantoro
Copy link
Contributor

This is intended to fix OpenZeppelin audit report issue H02.

The idea is to add introspection into whether an oracle has a stale value via new IOracle interface method isOutdated(). Callers of the public read functions which rely on the oracle can check isOutdated and perform an update call if their flow depends on the accuracy of the info. We flag these methods that rely on the oracle in the dev section of the natspec.

We also add an updateOracle() call to the reweight function.

All non-view user flows that rely on the peg should update the oracle at the beginning. The view functions except isAtMaxPrice() which is deleted in another PR should all call out the dependency in the natspec

@Joeysantoro Joeysantoro added the OZ Fix New A PR dedicated to fix an OpenZeppelin issue label Feb 6, 2021
@Joeysantoro Joeysantoro changed the base branch from POZ-Combined to POZ-Fixes February 6, 2021 20:23
@Joeysantoro Joeysantoro merged commit 22df6f5 into POZ-Fixes Feb 6, 2021
@xklob xklob deleted the POZ-Outdated-Oracle-Prices branch September 19, 2021 18:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

OZ Fix New A PR dedicated to fix an OpenZeppelin issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments