The expected behavior is that each registered user should receive a random allocation of APT between 100-500 units, which is supposed to be unpredictable and fair. However, relying as source of randomness to timestamp::now_microseconds()
and taking a simple modulus, makes it predictable and exploitable by validators.
Likelihood: High
Transaction timestamps are publicly visible and predictable in the Aptos network, so user can knwo in advance what value will be produced. Validator can reorder transactions to force timestamp
values during block production.
Impact: High
Validators can deterministacally choose payout amounts for users, so the fairness of the airdrop is completely compromised.
Any of the following timestamps produce a favorable outcome
Aptos framework has a native package for managing randomness
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.