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

OnlyOwner functions that make critical changes should have safeguards #214

Closed
code423n4 opened this issue May 14, 2022 · 1 comment
Closed
Labels
2 (Med Risk) Assets not at direct risk, but function/availability of the protocol could be impacted or leak value bug Something isn't working duplicate This issue or pull request already exists

Comments

@code423n4
Copy link
Contributor

Lines of code

https://github.com/code-423n4/2022-05-cally/blob/main/contracts/src/Cally.sol#L117-L121
https://github.com/code-423n4/2022-05-cally/blob/main/contracts/src/Cally.sol#L283-L285

Vulnerability details

Impact

Admin can change the protocol fee anytime, to any value by calling setFee() function. Even if there is no bad intention, this can potentially be used to damage the reputation of the protocol.

Proof of Concept

Provide direct links to all referenced code in GitHub. Add screenshots, logs, or any other relevant proof that illustrates the concept.

Tools Used

Manual analysis

Recommended Mitigation Steps

  • A timelock can be added for such critical changes which may effect user decisions.
  • A hardcoded max fee limit can be defined and setFee() can check the new fee against max fee.
@code423n4 code423n4 added 2 (Med Risk) Assets not at direct risk, but function/availability of the protocol could be impacted or leak value bug Something isn't working labels May 14, 2022
code423n4 added a commit that referenced this issue May 14, 2022
@outdoteth
Copy link
Collaborator

owner can change fee at any time; #47
owner can set fee greater than 100%: #48

@outdoteth outdoteth added the duplicate This issue or pull request already exists label May 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2 (Med Risk) Assets not at direct risk, but function/availability of the protocol could be impacted or leak value bug Something isn't working duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants