Skip to content

Latest commit

 

History

History
31 lines (19 loc) · 982 Bytes

026.md

File metadata and controls

31 lines (19 loc) · 982 Bytes

Striped Sandstone Baboon

Medium

M-1 Denial of Service via MaxTokenAllocationReached

Severity

Impact: Medium

Likelihood: Medium

Description

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);
}

Impact

  • 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.

Recommendation

  • Perform max allocation check before validation
  • Proceed with validation and payment processing only if allocation allows