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-432] Add weETH oracle #22

Merged
merged 2 commits into from
May 17, 2024
Merged

[SC-432] Add weETH oracle #22

merged 2 commits into from
May 17, 2024

Conversation

hexonaut
Copy link
Contributor

@hexonaut hexonaut commented May 13, 2024

Adding exchange rate oracle for weETH in anticipation of upcoming onboarding into SparkLend.

Code is almost identical to the Lido and Rocket Pool ones, so I would diff one of those to compare.

Note: coverage seems broken? There is almost certainly coverage on the lines mentioned. I don't know what's going on here. Lots of problems with coverage lately.

Copy link

Coverage after merging SC-432-add-weeth-oracle into master will be

80.95%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
src
   CappedOracle.sol100%100%100%100%
   FixedPriceOracle.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
   WEETHExchangeRateOracle.sol0%0%0%0%25, 25, 25, 27–28, 32–33, 35, 35, 35–36, 39, 43
   WSTETHExchangeRateOracle.sol100%100%100%100%

Copy link
Contributor

@lucas-manuel lucas-manuel left a comment

Choose a reason for hiding this comment

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

The new file has zero coverage from some reason on foundry, but I added logs to all branches in functions and constructor to ensure that the paths were getting hit in the tests.

Also manually verified that the return price is correct against the latest block using the right values, comparing against coingecko ETH and WEETH price and etherscan rate.

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.

Weird coverage issue again, but other than that LGTM

@hexonaut hexonaut merged commit 5110861 into master May 17, 2024
2 of 3 checks passed
@hexonaut hexonaut deleted the SC-432-add-weeth-oracle branch May 17, 2024 08:51
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