Skip to content

Add 100% APR limit to restakerRate - #273

Open
kexleyBeefy wants to merge 1 commit into
devfrom
fix/limit-restaker-rate
Open

Add 100% APR limit to restakerRate#273
kexleyBeefy wants to merge 1 commit into
devfrom
fix/limit-restaker-rate

Conversation

@kexleyBeefy

Copy link
Copy Markdown
Contributor

Add a 100% APR limit to the restakerRate on RateOracle.sol to prevent unbounded restaker rates from over charging interest.

@octane-security-app

Copy link
Copy Markdown

Summary by Octane

Adds an upper bound check to setRestakerRate in contracts/oracle/RateOracle.sol, reverting with RateTooHigh when the rate exceeds 1e27.

Changes

  • contracts/oracle/RateOracle.sol (modified) - setRestakerRate now reverts with RateTooHigh(_agent, _rate) if _rate > 1e27, before writing to restakerRate storage and emitting SetRestakerRate.

Worth a look

  • contracts/oracle/RateOracle.sol - New revert path in the access-controlled setRestakerRate: callers setting a rate above 1e27 now fail instead of storing the value.

🔗 Commit Hash: 330cef8

@octane-security-app

Copy link
Copy Markdown

Overview

Octane AI analysis has finished. No vulnerabilities were found. Cheers! 🎉🎉🎉


🔗 Commit Hash: 330cef8

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

Successfully merging this pull request may close these issues.

1 participant