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

Centralization risks in BathToken #42

Closed
code423n4 opened this issue May 25, 2022 · 3 comments
Closed

Centralization risks in BathToken #42

code423n4 opened this issue May 25, 2022 · 3 comments
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-rubicon/blob/521d50b22b41b1f52ff9a67ea68ed8012c618da9/contracts/rubiconPools/BathHouse.sol#L225

Vulnerability details

Impact

A centralization problem could favor behaviors not expected by the investor/user.

Proof of Concept

An admin can overwrite a BathToken with one of their own, by setting the feeAddress to an arbitrary one and the emitted event will reflect that the address is address(0), which means it is charged by holders, since the emitted event deceives about the real result, it can encourage rouge pool scam behavior.

If it's a migration feature it should be limited to the first few blocks or the contract should be stopped.

/// @notice A migration function that allows the admin to write arbitrarily to tokenToBathToken

Affected source code:

Recommended Mitigation Steps

  • Remove this logic.
  • Emit the event according the real values.
@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 25, 2022
code423n4 added a commit that referenced this issue May 25, 2022
@bghughes bghughes added the sponsor acknowledged Technically the issue is correct, but we're not going to resolve it for XYZ reasons label Jun 3, 2022
@bghughes
Copy link
Collaborator

bghughes commented Jun 3, 2022

Centralization risk is acknowledged #344

@HickupHH3 HickupHH3 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 2 (Med Risk) Assets not at direct risk, but function/availability of the protocol could be impacted or leak value and removed 2 (Med Risk) Assets not at direct risk, but function/availability of the protocol could be impacted or leak value QA (Quality Assurance) Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax labels Jun 17, 2022
@HickupHH3
Copy link
Collaborator

Although there is centralisation risk, the impact and vulnerability isn't well described enough to warrant a medium severity rating. See #385 for instance.

@HickupHH3
Copy link
Collaborator

Part of warden's QA report: #47

@HickupHH3 HickupHH3 added 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 labels Jun 18, 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