52794 sc low remainingforsale not updated after withdrawunsoldarctokens will cause following buy revert
Description
Brief/Intro
Vulnerability Details
function withdrawUnsoldArcTokens(
address _tokenContract,
address to,
uint256 amount
) external onlyTokenAdmin(_tokenContract) {
if (to == address(0)) {
revert CannotWithdrawToZeroAddress();
}
if (amount == 0) {
revert AmountMustBePositive();
}
ArcToken token = ArcToken(_tokenContract);
uint256 contractBalance = token.balanceOf(address(this));
if (contractBalance < amount) {
revert InsufficientUnsoldTokens();
}
bool success = token.transfer(to, amount);
if (!success) {
revert ArcTokenWithdrawalFailed();
}
}Impact Details
References
Proof of Concept
1
2
3
Previous51728 sc high users can claim rewards for inactive validator periods due to incorrect checkpoint accrual Next52948 sc low jackpot reward rejected at exact threshold
Was this helpful?