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

Add check in try-catch for zero length revert #26

Merged
merged 2 commits into from
Jun 13, 2024
Merged

Conversation

hexonaut
Copy link
Contributor

@hexonaut hexonaut commented Jun 12, 2024

Feedback from the audit. Add check for zero length reverts in try catch for CappedFallbackRateSource. Users can forcibly trigger this catch block of code by setting the gas limit to be out of gas inside the inner function. Likely this is not abusable in practise because the remainder of the call will be limited in gas remaining, but it's something to guard against out of an abundance of caution.

Regular errors will still trigger this section appropriately and complete execution with the defaultRate.

Examples added in the tests.

Also, added new audit report.

Copy link

Coverage after merging audit-changes into master will be

88.12%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
src
   CappedFallbackRateSource.sol100%100%100%100%
   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.sol100%100%100%100%
   RateTargetKinkInterestRateStrategy.sol100%100%100%100%
   VariableBorrowInterestRateStrategy.sol92.73%87.50%100%91.18%119, 123, 127, 162
   WEETHExchangeRateOracle.sol0%0%0%0%25, 25, 25, 27–28, 32–33, 35, 35, 35–36, 39, 43
   WSTETHExchangeRateOracle.sol100%100%100%100%

@hexonaut hexonaut merged commit d54bd76 into master Jun 13, 2024
2 of 3 checks passed
@hexonaut hexonaut deleted the audit-changes branch June 13, 2024 10:02
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