-
Notifications
You must be signed in to change notification settings - Fork 1
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
Repo redemption haircut #14
Changes from all commits
778df14
aa9067e
c041557
160545f
19bb70d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -2,5 +2,6 @@ | |||||
pragma solidity ^0.8.18; | ||||||
|
||||||
interface ITermDiscountRateAdapter { | ||||||
function repoRedemptionHaircut(address) external view returns (uint256); | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Specify parameter name for clarity in The function Consider modifying the function declaration as follows: -function repoRedemptionHaircut(address) external view returns (uint256);
+function repoRedemptionHaircut(address repoAddress) external view returns (uint256); Committable suggestion
Suggested change
|
||||||
function getDiscountRate(address repoToken) external view returns (uint256); | ||||||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review: New function setRepoRedemptionHaircut.
The function
setRepoRedemptionHaircut
is correctly implemented with role-based access control usingonlyRole(DEVOPS_ROLE)
. This ensures that only authorized users can modify the haircut values. However, consider adding input validation for thehaircut
parameter to ensure it falls within expected ranges, especially since it represents financial data.Consider adding input validation for the
haircut
parameter: