-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
An attacker could front-run the ERC20Airdrop.claimAndDelegate
function, thereby preventing the user from claiming their funds
#201
Comments
minhquanym marked the issue as primary issue |
minhquanym marked the issue as sufficient quality report |
I think this a valid report but the severity of this bug is minor. I've created a PR to address this issue: taikoxyz/taiko-mono#16622 |
dantaik (sponsor) confirmed |
dantaik marked the issue as disagree with severity |
@dantaik I'd agree with the severity. The audited version a person could setup a server and a node, frontrunnig every transaction, theoretically blocking the whole system. (I know it is fixed, but i'd accept medium). |
adaki2004 marked the issue as agree with severity |
downgrading to QA, these hypothetical DOS attacks have no economic incentive to the attacker and I have yet to see proof of them occurring in the wild. |
0xean changed the severity to QA (Quality Assurance) |
0xean marked the issue as grade-b |
Lines of code
https://github.com/code-423n4/2024-03-taiko/blob/f58384f44dbf4c6535264a472322322705133b11/packages/protocol/contracts/team/airdrop/ERC20Airdrop.sol#L71
Vulnerability details
The
ERC20Airdrop
contract provides only theclaimAndDelegate
function to claim funds from the contract. The issue arises from the fact that an attacker could front-run the user by callingIVotes.delegateBySig
function directly with the signature from the user's transaction. In this case, the user's transaction will revert and the user won't be able to claim their funds. The attacker might do this constantly, effectively preventing the user from claiming funds. This issue becomes even more severe because of these facts:It's worth mentioning that users can still protect themselves from this attack by utilizing protected RPC but it requires some additional steps and costs more for the user.
Impact
An attacker might front-run a user's transactions, effectively preventing the user from claiming their funds, or at least delaying the process.
Proof of Concept
-
Tools Used
Manual Review
Recommended Mitigation Steps
Consider separating claiming and delegating processes by implementing the
claim
function that doesn't involve the delegating part.Assessed type
DoS
The text was updated successfully, but these errors were encountered: