Describe the normal behavior in one or more sentences
Answer: When distributing randomized rewards (e.g., 100–500 APT per claim), the randomness should be unpredictable to all parties, including contract owner and participants, to ensure fairness.
Explain the specific issue or problem in one or more sentences
Answer: The contract derives randomness from predictable sources such as the current block timestamp, sequence number, or transaction hash. Since these are publicly visible and often manipulatable by validators or miners, attackers can predict or manipulate the random output to always receive the maximum slice.
Likelihood:
Reason 1 // Describe WHEN this will occur (avoid using "if" statements)
Answer: Every claim transaction relies on a fully predictable timestamp.
Reason 2
Answer: Attackers can simulate possible values off-chain before submitting their transaction.
Impact:
Impact 1
Answer: Attackers repeatedly manipulate transaction timing until they always receive the maximum allocation (500 APT).
Impact 2
Answer: Entire fairness of the airdrop pool is compromised, draining the pool disproportionately fast.
Step 1: Attacker precomputes rewards for future timestamps.
Step 2: Attacker submits transaction only when conditions favor a maximum payout.
Step 3: Contract behaves deterministically, proving randomness is broken.
Replace timestamp-based randomness with a secure randomness source, such as Aptos’ built-in aptos_framework::random module.
Alternatively, use a commit–reveal scheme:
Users commit to a secret before the claim period.
Secret is later revealed, and combined with on-chain entropy to generate randomness.
This ensures unpredictability and prevents attackers from gaming the system.
The `get_random_slice` function should only be called by the owner via the `register_pizza_lover` function. Also, the `owner` is trusted and will not choose a specific time for a new user to register. Therefore, I disagree with the claim of most reports in this group that an attacker can manipulate the random number of pizza slices. But I agree with the root cause of the reports in this group, that the random distribution is not completely random.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.