The contract is vulnerable to an Unrestricted Re-Approval Exploit, a common issue in ERC20 tokens. This occurs when a spender (attacker) can front-run the owner's approve
transaction to continuously drain their balance.
The vulnerability exploits a fundamental flaw in the ERC20 approve()
mechanism, where an attacker can front-run approval transactions to drain the victim’s funds repeatedly. This is a well-known issue with ERC20 tokens that do not implement safe allowance updates.
The approve()
function allows an owner to authorize a spender to use their tokens. However, it does not enforce any restrictions on re-approvals, making it susceptible to a front-running attack.
This vulnerability allows an attacker to continuously drain a victim’s ERC20 token balance by exploiting the unsafe approve()
mechanism.
Ran unit tests to simulate and confirm the exploit scenario.
Implement EIP-2612 (Permit), which allows token approvals via signed messages instead of transactions:
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.