Early rate$2,400 of senior audit time for $500. Early members keep the rate as it climbs.$2,400 of senior audit time for $500See how →
F-2024-0002·input-validation

Lack of input validation in deposit function triggers zero-value transactions

Acknowledgedpentestblackboxcoin-flip
TL;DR

The deposit amount field was not properly sanitized. Users could submit empty values or special characters; the Approve button still produced a zero-value transaction that consumed gas without transferring any value.

Severity
MEDIUM
Impact
MEDIUM
Likelihood
HIGH
Method
MManual review
CAT.
Complexity
LOW
Exploitability
HIGH
02Section · Description

Description

When a user is depositing assets, the amount field is not properly sanitized to accept only numeric values. Although there is a warning message stating that the input should be a positive number, a user can still input any value (or leave it empty), triggering a zero-value transaction that only consumes gas. Moreover this transaction was observed firing without "Starting a game" first, which the application requires before depositing an amount.

03Section · Impact

Impact

Zero-value transactions consume gas without producing meaningful state. Combined with the missing "start game" precondition, this is a low-cost griefing vector that any authenticated user can trigger.

04Section · Recommendation

Recommendation

Sanitize the deposit amount at the input boundary (numeric-only, positive, non-empty) and again at the Approve handler. Reject the transaction client-side before signing if the amount is invalid. Server-side, reject deposit attempts whose value is zero or empty.

Hopium: Acknowledged. Zealynx: Acknowledged.

F-2024-0002