Closed c4-bot-10 closed 8 months ago
raymondfam marked the issue as insufficient quality report
event will be emitted as intended.
raymondfam marked the issue as primary issue
HickupHH3 marked the issue as unsatisfactory: Invalid
The only events that has been emitted in the PoC (as it can be checked in the output traces) are the Approval
and Transfer
. But the event that is intended to be emitted when someone claims the airdrop is TokensClaimed
which is here is not emitted because the airdrop can be claimed avoiding to call this function, just by transfering the funds from the treasury to your own account. If the offchain server depends on this event for accounting the airdrops claimed, the accounting will freak because people can claim them without calling the function and without emiting the TokensClaimed
event.
HickupHH3 changed the severity to QA (Quality Assurance)
Lines of code
https://github.com/code-423n4/2024-02-ai-arena/blob/main/src/Neuron.sol#L138-L145
Vulnerability details
Impact
A user can get his neuron airdrop withou calling the
claim
function. As a result, if his off-chain service needs to account claimed airdrops using the emited events, they will not track the airdrop claimed by the userProof of Concept
Output traces
Tools Used
Manual review
Recommended Mitigation Steps
I would not implement the airdrop as allowing users to move funds from the treasury. I would instead make a mapping for each user storing how much they can claim. And then the neuron contract had approved the uint256 max from the treasury and transfer funds from treasury to users that would call the
claim
function.Assessed type
Error