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

BathHouse admin and RubiconMarket owner can grief with high fees #307

Closed
code423n4 opened this issue May 28, 2022 · 2 comments
Closed

BathHouse admin and RubiconMarket owner can grief with high fees #307

code423n4 opened this issue May 28, 2022 · 2 comments
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 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/8c312a63a91193c6a192a9aab44ff980fbfd7741/contracts/RubiconMarket.sol#L1231-L1234
https://github.com/code-423n4/2022-05-rubicon/blob/8c312a63a91193c6a192a9aab44ff980fbfd7741/contracts/rubiconPools/BathToken.sol#L261

Vulnerability details

Impact

The BathHouse admin and an authorized RubiconMarket owner can set any high fee value feeBPS. Setting a fee value > 10000 (10000 is used as a denominator) will cause DoS.

Proof of Concept

RubiconMarket.sol#L1231-L1234

function setFeeBPS(uint256 _newFeeBPS) external auth returns (bool) {
    feeBPS = _newFeeBPS;
    return true;
}

rubiconPools/BathToken.sol#L261

function setFeeBPS(uint256 _feeBPS) external onlyBathHouse {
    feeBPS = _feeBPS;
}

Tools Used

Manual review

Recommended mitigation steps

Consider adding a reasonable upper bound for feeBPS.

@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 28, 2022
code423n4 added a commit that referenced this issue May 28, 2022
@bghughes bghughes added sponsor acknowledged Technically the issue is correct, but we're not going to resolve it for XYZ reasons duplicate This issue or pull request already exists labels Jun 3, 2022
@bghughes
Copy link
Collaborator

bghughes commented Jun 3, 2022

#344 #133 #125

@HickupHH3
Copy link
Collaborator

Duplicate of #21

@HickupHH3 HickupHH3 marked this as a duplicate of #21 Jun 18, 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 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