Open hats-bug-reporter[bot] opened 2 months ago
StakingToken i.e stROSE does not have maximum supply which can be checked here.
so the condition wont be applicable in practical.
Identifying conditions under which the mint operation might fail (e.g., if the contract has reached its maximum supply).
Also, under following contest rule, this issue is OOS.
Any issue that is only theoretical but can't happen in practice
Github username: @feeqcodes Twitter username: feeqcodes Submission hash (on-chain): 0x0aa275fee49b5ed49fea2e2c64ce27b79e35b017322bd944e054d0dc5c4feca2 Severity: low
Description: Description\ Both The
deposit
function in Minter.sol and thedeposit
function in NativeMinter has a vulnerability where it emits the Deposit event even if the minting operation fails. This can lead to inconsistent state reporting, where the contract logs a deposit that didn't actually occur. The function does not explicitly check the success of thestakingToken.mint()
operation before emitting the eventAttack Scenario\ An attacker could exploit this vulnerability by:
mint
operation might fail (e.g., if the contract has reached its maximum supply).deposit
function under these conditions.Revised Code File