Summary
This griefing attack exploits the lack of validation in token registration, allowing an attacker to trap user deposits in a fake token. By validating token authenticity, enforcing ERC20 compliance, and implementing a whitelist, the protocol can eliminate this risk and prevent future fund loss.
The AaveDIVAWrapper contract lacks proper validation of token authenticity during collateral token registration, allowing an attacker to frontrun legitimate registrations with a fake WToken. This can result in users unknowingly depositing funds into an invalid or malicious token contract, leading to permanently stuck assets.
No Validation of Token Authenticity
The function registerCollateralToken does not verify whether the provided token is a valid ERC20 or even deployed on the correct chain.
Ex
An attacker frontruns a legitimate collateral token registration by submitting a fake WToken with the same address but on another chain.
Users deposit funds into this fake token, but it does not map to any real collateral.
No On-Chain Existence Check
The contract blindly trusts the input address, without verifying:
If the token exists on the current chain.
If the token implements ERC20 functions properly.
Attacker Deploys a Fake WToken
A fake token contract is deployed that imitates a real collateral token.
Attacker Frontruns registerCollateralToken
Before a legitimate user registers real collateral (e.g., USDC), the attacker registers the fake token with the same address as the real token from another chain.
Users Deposit into the Fake Token
Users think they are interacting with genuine collateral, but their funds go into the attacker's fake WToken.
Funds Get Stuck
The fake WToken does not map to a real collateral token.
Users cannot withdraw or redeem their deposits, effectively locking all funds permanently.
💰 Loss of Funds: Deposited assets are stuck in an invalid WToken.
⚠️ Trust Erosion: Users lose confidence in the protocol after losing assets.
⛔ Protocol Downtime: Requires an urgent fix to revoke fake WToken registrations.
Deploy the Fake WToken
Register Fake Token as Collateral
Users Deposit Funds into Fake Token
They assume it's real but cannot withdraw later.
Check for Contract Code
Enforce ERC20 Compliance
Only allow pre-approved tokens for registration.
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.