Closed c4-bot-4 closed 8 months ago
raymondfam marked the issue as insufficient quality report
raymondfam marked the issue as duplicate of #1472
Allowance will be deducted or set to 0 by the parental OZ contract.
HickupHH3 marked the issue as unsatisfactory: Insufficient proof
Lines of code
https://github.com/code-423n4/2024-02-ai-arena/blob/cd1a0e6d1b40168657d1aaee8223dc050e15f8cc/src/Neuron.sol#L138-L145
Vulnerability details
Vulnerability Details
in
Neuron.sol
contract we have asetupAirdrop()
function for setting up airdrop forNRN
token and this function makesapprove
fromtreasuryAddress
torecipients
. then users can claim their airdrops by calling theclaim()
function. but theclaim()
doesn't decreaseallowance
after claiming tokens. for example, if users have 100 NRN airdrop, they can callclaim()
multiple times and drain thetreasuryAddress
address.Impact
A malicious user can drain the
treasuryAddress
address by calling theclaim()
function multiple times.Proof of Concept
Tools Used
VSCODE
Recommended Mitigation Steps
Consider this:
Assessed type
ERC20