51296 sc low arctokenpurchase withdrawal breaks view functions
Description
Brief/Intro
Vulnerability Details
function withdrawUnsoldArcTokens(
address _tokenContract,
address to,
uint256 amount
) external onlyTokenAdmin(_tokenContract) {
// ... validation checks ...
ArcToken token = ArcToken(_tokenContract);
uint256 contractBalance = token.balanceOf(address(this));
if (contractBalance < amount) {
revert InsufficientUnsoldTokens();
}
bool success = token.transfer(to, amount); // Transfers tokens
if (!success) {
revert ArcTokenWithdrawalFailed();
}
// MISSING: TokenInfo accounting update
// Should include: info.totalAmountForSale -= amount;
}Impact Details
References
Link to Proof of Concept
Proof of Concept
Previous52178 sc critical user will lose the unspent amount when executing partial swaps via okxrouterNext51051 sc high inactive validator reward accrual bypass
Was this helpful?