claimAndDelegate in ERC20 Token airdrop is subject to DOS(denial of service) #181
Labels
bug
Something isn't working
downgraded by judge
Judge downgraded the risk level of this issue
duplicate-201
grade-b
QA (Quality Assurance)
Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax
🤖_44_group
AI based duplicate group recommendation
Lines of code
https://github.com/code-423n4/2024-03-taiko/blob/f58384f44dbf4c6535264a472322322705133b11/packages/protocol/contracts/team/airdrop/ERC20Airdrop.sol#L50
Vulnerability details
claimAndDelegate in ERC20 Token airdrop is subject to DOS(denial of service)
Line of code
Proof of concept
Line of code
The function claimAndDelegate let user claim the token then delegate the token via signature
Impact
but malicious user can extract the signature and trigger delegateBySig directly first.
Refer to
Votes.sol
in OpenZeppelin.Line of code
Then the signer's nonce is consumed and when the transaction claimAndDelegate executes,
the transaction revert because the same signature is already consumed,
this would grief and block user from executing the transaction claimAndDelegate
Recommendation
implement a mapping that tracks nonces specifically for the claimAndDelegate process,
and validates them before the delegateBySig function is called
Assessed type
Token-Transfer
The text was updated successfully, but these errors were encountered: