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

[SC-423] Add upgradable oracle #21

Merged
merged 9 commits into from
May 17, 2024
Merged

[SC-423] Add upgradable oracle #21

merged 9 commits into from
May 17, 2024

Conversation

hexonaut
Copy link
Contributor

@hexonaut hexonaut commented May 6, 2024

Allows swapping an oracle price feed for Morpho Blue. This will be used by Spark Gov to set the oracle for markets on Morpho Blue.

Copy link

@barrutko barrutko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One imo non-blocking minor nitpick. Other than that looks good.

) {
return (0, latestAnswer, 0, 0, 0);
}

}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A new line could be added at the end since the file is edited

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done, added to the other file too

uint80 answeredInRound
) {
return (0, latestAnswer, 0, 0, 0);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be returning all values from the tuple since they're all returned from the oracle, can add another setter setLatestRoundData to set these values within the mock.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've further restricted what gets returned and refactored the interface setup to not overload the price source one.

@hexonaut
Copy link
Contributor Author

I refactored this a bit to make it more clear it's specific to Morpho Blue instead of a general upgradable oracle.

Copy link

Coverage after merging SC-423-upgradable-oracle into master will be

91.36%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
src
   CappedOracle.sol100%100%100%100%
   FixedPriceOracle.sol100%100%100%100%
   MorphoUpgradableOracle.sol100%100%100%100%
   PotRateSource.sol100%100%100%100%
   RETHExchangeRateOracle.sol100%100%100%100%
   RateTargetBaseInterestRateStrategy.sol62.50%100%66.67%60%45, 47
   RateTargetKinkInterestRateStrategy.sol62.50%100%66.67%60%46, 48
   VariableBorrowInterestRateStrategy.sol90.91%75%100%91.18%119, 123, 127, 162, 71
   WSTETHExchangeRateOracle.sol100%100%100%100%

@hexonaut hexonaut merged commit fa3b25d into master May 17, 2024
3 checks passed
@hexonaut hexonaut deleted the SC-423-upgradable-oracle branch May 17, 2024 08:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants