The AaveDIVAWrapper contract does not enforce a minimum transaction amount in critical functions such as createContingentPool
, addLiquidity
, and redeemWToken
. This allows attackers to submit transactions with dust amounts (e.g., 1 wei
of an ERC20 token with 18 decimals), even if the value is economically negligible.
Technical Breakdown:
ERC20 tokens often have high decimal precision (e.g., 6 decimals for USDC, 18 for ETH-based tokens).
Functions like _handleTokenOperations
accept _collateralAmount
without validating against a minimum threshold (e.g., > 0
or >= MIN_AMOUNT
).
Example:
Network Spam: Attackers can flood the blockchain with dust transactions (e.g., 1e-10
of a token), increasing gas fees and degrading network performance.
Storage Bloat: Dust transactions create unnecessary entries in the contract’s state (e.g., pool IDs, token balances), straining storage and indexing.
Economic Disruption: Trivial pools or liquidity positions could confuse users or distort protocol metrics.
Real-World Example:
An attacker submits 10,000 createContingentPool
transactions with 1 wei
of collateral (effectively $0.00000001), wasting network resources.
Enforce Minimum Amounts:
Add token-specific minimum checks (e.g., require(_collateralAmount >= MIN_AMOUNT, "Amount too small")
).
Example:
Bound Checks for type(uint256).max
:
Ensure resolved amounts (e.g., user balances) are > 0
when type(uint256).max
is used.
Decentralized Governance:
Allow governance to update MIN_AMOUNT
per token to adapt to market conditions.
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.