while calling createContingentPool users can specify parameters such as capacity and collateralAmount. However, a malicious user can exploit this functionality to create multiple pools with zero or very low capacity and collateralAmount. This could lead to a denial-of-service (DoS) attack, rendering the protocol unusable for legitimate users. Specifically:
Zero or Low Capacity: A malicious user can create pools with zero or very low capacity, preventing other users from adding liquidity to the pool. This is because the _addLiquidity function checks the pool's capacity, and if it is too low, legitimate users will be unable to participate.
Zero Collateral Amount: A malicious user can create pools with zero collateralAmount, effectively creating "empty" pools that serve no purpose but clog the system. This could lead to unnecessary bloat in the contract's state and make it harder for legitimate users to find usable pools.
https://github.com/Cyfrin/2025-01-diva/blob/main/contracts/src/AaveDIVAWrapper.sol#L113
The impact of this vulnerability is significant:
Denial of Service: Malicious users can flood the system with unusable pools, making it difficult or impossible for legitimate users to create or interact with functional pools. This could lead to a complete halt in the protocol's operations.
Resource Exhaustion: Creating multiple pools with zero or low parameters consumes on-chain storage and increases gas costs for users interacting with the protocol. Over time, this could lead to increased transaction fees and reduced efficiency.
Financial Loss: Legitimate users may be unable to participate in pools leading to potential financial losses.
To mitigate this vulnerability, the following measures can be implemented:
Minimum Capacity and Collateral Requirements:
Enforce minimum values for capacity and collateralAmount during pool creation.
Pool Creation Fees:
Introduce a fee for pool creation. This would discourage malicious users from creating unnecessary pools, as they would incur a cost for each pool created.
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.