code-423n4 / 2022-05-rubicon-findings

5 stars 2 forks source link

Owner can steal or DoS all withdrawals by setting high `feeBPS` #382

Closed code423n4 closed 2 years ago

code423n4 commented 2 years ago

Lines of code

https://github.com/code-423n4/2022-05-rubicon/blob/8c312a63a91193c6a192a9aab44ff980fbfd7741/contracts/rubiconPools/BathToken.sol#L260-L262

Vulnerability details

Impact

The owner is able to set the feeBPS as high as they like since no validation is performed in the setter. This can have two effects:

Tools Used

Manual review

Recommended Mitigation Steps

Apply some validation so that the fee can only be set within a specific range.

bghughes commented 2 years ago

Duplicate of #125 #411

HickupHH3 commented 2 years ago

Duplicate of #21