Submitted by adriro, also found by brgltd, 0xnacho, zhuXKET, Ace-30, ddimitrov22, markus_ether, AlexCzm, qbs, luciana, juancito, said, cccz, bytes032 and T1MOH.
The BathBuddy contract inherits from OpenZeppelin Pausable contract with the intention of adding pausing features to the contract.
https://github.com/code-423n4/2023-04-rubicon/blob/main/contracts/periphery/BathBuddy.sol#L38
The Pausable implementation contains all the logic to implement pausing, but doesnt include any external or public functionality to actually trigger the pause or resume, this task is left to the derived contract.
The BathBuddy contract fails to implement these functions, as there is no callable function from the outside that modifies the pause state. The pausing mechanism is intended to be used in the getReward function, as this function includes the whenNotPaused:
https://github.com/code-423n4/2023-04-rubicon/blob/main/contracts/periphery/BathBuddy.sol#L168-L185
This means that protocol admin wont be able to pause this function if needed as there is no accessible function to enable the mechanism at all.
The BathBuddy contract code doesnt include any external or public function to pause or resume the contract. The OpenZeppelin implementations only contains internal functions to provide support so that the derived contract implements the public interface:
https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/security/Pausable.sol#L82-L104
The BathBuddy contract should implement the functions to expose the pausing mechanism. These functions should only be accessible to the owner of the contract.
daoio (Rubicon) confirmed
