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

Critical changes executed bu privileged roles should have safeguards #141

Closed
code423n4 opened this issue May 18, 2022 · 2 comments
Closed
Labels
bug Something isn't working duplicate This issue or pull request already exists QA (Quality Assurance) Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax sponsor acknowledged Technically the issue is correct, but we're not going to resolve it for XYZ reasons

Comments

@code423n4
Copy link
Contributor

Lines of code

https://github.com/code-423n4/2022-05-alchemix/blob/main/contracts-full/AlchemistV2.sol#L440
https://github.com/code-423n4/2022-05-alchemix/blob/main/contracts-full/AlchemicTokenV2.sol#L92
https://github.com/code-423n4/2022-05-alchemix/blob/main/contracts-full/AlchemicTokenV2Base.sol#L98
https://github.com/code-423n4/2022-05-alchemix/blob/main/contracts-full/AlchemistV2.sol#L407
https://github.com/code-423n4/2022-05-alchemix/blob/main/contracts-full/AlchemistV2.sol#L416
https://github.com/code-423n4/2022-05-alchemix/blob/main/contracts-full/AlchemistV2.sol#L433
https://github.com/code-423n4/2022-05-alchemix/blob/main/contracts-full/AlchemistV2.sol#L492

Vulnerability details

Impact

Admin can change the protocol fee, flash minting fee, liquididation limit and other similar important parameters anytime to any value. Such changes may effect user decisions, hence they should have some safeguards such as timelocks and/or limits.
Even if there is no bad intention, this kind of excessive power issueance to the admin can potentially be used to damage the reputation of the protocol.

Proof of Concept

code-423n4/2021-09-swivel-findings#101

Tools Used

Manual analysis

Recommended Mitigation Steps

  • A timelock can be added for such critical changes which may effect user decisions.
  • Max limits can be defined for fees, limits, etc, which updates are checked against and higher than max values are not allowed.
@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 18, 2022
code423n4 added a commit that referenced this issue May 18, 2022
@0xfoobar 0xfoobar added disagree with severity Sponsor confirms validity, but disagrees with warden’s risk assessment (sponsor explain in comments) sponsor acknowledged Technically the issue is correct, but we're not going to resolve it for XYZ reasons labels May 30, 2022
@0xfoobar
Copy link
Collaborator

Sponsor acknowledged

Assume honest admin

@0xleastwood
Copy link
Collaborator

Considering the admin is held behind a timelock contract + multisig, I'm inclined to downgrade this to QA.

Duplicate of #142.

@0xleastwood 0xleastwood added duplicate This issue or pull request already exists QA (Quality Assurance) Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax and removed 2 (Med Risk) Assets not at direct risk, but function/availability of the protocol could be impacted or leak value disagree with severity Sponsor confirms validity, but disagrees with warden’s risk assessment (sponsor explain in comments) labels Jun 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working duplicate This issue or pull request already exists QA (Quality Assurance) Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax sponsor acknowledged Technically the issue is correct, but we're not going to resolve it for XYZ reasons
Projects
None yet
Development

No branches or pull requests

3 participants