59993 sc insight unnecessary call to get balance in mintinglogic boostonbehalfof
Description
Brief / Intro
Vulnerability Details
uint256 balance = $.vthoToken.balanceOf(_sender);
// check that the boost amount is enough
if ($.vthoToken.balanceOf(_sender) < requiredBoostAmount) { // @audit-info - could simply use `balance`
revert Errors.InsufficientBalance(
address($.vthoToken),
_sender,
requiredBoostAmount,
balance
);
}Impact Details
Proof of Concept
Previous59951 sc high in special cases delegatorseffectivestake may decrease twice and cause staked funds to become lockedNext59997 sc medium claimrewards fails to update state for zero value periods causing permanent fund freeze in unstake
Was this helpful?