52203 sc medium griefing attack on arctokenpurchase setpurchasetoken function via front running
Description
Brief/Intro
Vulnerability Details
function setPurchaseToken(
address purchaseTokenAddress
) external onlyRole(DEFAULT_ADMIN_ROLE) {
PurchaseStorage storage ps = _getPurchaseStorage();
if (ps.enabledTokens.length() > 0) {
revert CannotChangePurchaseTokenWithActiveSales();
}
if (purchaseTokenAddress == address(0)) {
revert InvalidPurchaseTokenAddress();
}
ps.purchaseToken = IERC20(purchaseTokenAddress);
emit PurchaseTokenUpdated(purchaseTokenAddress);
}Impact Details
References
Proof of Concept
Previous51987 sc high validators will be able to steal more commission from users that isn t the commission to be chargedNext52837 sc insight gas heavy repeated binary search increases reward calculation gas costs
Was this helpful?