Striped Sandstone Baboon
Medium
Severity
Impact: Medium
Likelihood: Medium
The function participate()
ensures that a launch users has not exceeded their maximum token allocation before allowing new participation. However, the check occurs after signature validation and payment processing logic :
if (settings.maxTokenAllocation < currTotalTokensSold + request.tokenAmount) {
revert MaxTokenAllocationReached(request.launchGroupId);
}
- Multiple users may pass initial checks and attempt to participate simultaneously, causing transactions to revert due to exceeding the
maxTokenAllocation
. - Attackers can spam transactions to fill up the token allocation limit, causing genuine users' transactions to fail.
- Perform max allocation check before validation
- Proceed with validation and payment processing only if allocation allows