Open hats-bug-reporter[bot] opened 2 months ago
Subcall lib is provided by Oasis dev team and implemented "as is".
Not all functions of Subcall lib are used by stROSEMinter
– particularly consensusWithdraw
and accountsTransfer
are not used, and so we do not need emergency functions to call them.
Github username: -- Twitter username: -- Submission hash (on-chain): 0x1cbefdbadef6bc8bae581e330e19a557797e98e7d4637d72cb667aa17350afc1 Severity: medium
Description: Description\
stROSEMinter.sol
has implemented following emergency functions from OASIS's Subcall library:All of these functions can be invoked by contract owner in case of emergency via Subcall library of Oasis chain.
The issue is that, Two major important functionalities from SubCall is not implemented as external functions which must be called by contract owner. These are internal functions like
consensusWithdraw()
andaccountsTransfer()
. It should be noted that, the contract has explicitely used constants likeCONSENSUS_WITHDRAW
andACCOUNTS_TRANSFER
which indicates the use of these internal functions. These are implemented as:consensusWithdraw()
function is used to transfer from an account in this runtime to a consensus staking account andaccountsTransfer()
is used to perform a transfer to another account address. Both of these are implemented as internal function and can not be accessed by owner.Impact\ Consensus withdraw and account transfer functions from subcall can not be called in case of emergency. This is due to missing implementation as external/public function which is expected to be called by contract owner. In case of emergency, both of these functions are important and must be implemented otherwise this would break the core functionality of stROSEMinter contract.
Recommendations\ Consider implementing
emergencyConsensusWithdraw()
andemergencyAccountsTransfer()
functions instROSEMinter.sol
contract.