A vulnerability in the batchAddLiquidity()
function allows an attacker to create numerous dust positions, potentially causing a Gas Cost Denial of Service (DoS) and creating accounting complexities.
Key issues:
No minimum collateral amount check
Ability to create multiple tiny positions in a single batch
No limit on the number of positions that can be created
Gas Cost DoS: Removing liquidity becomes economically unfeasible due to high gas costs
Fee Collection Issues: Very small positions may result in zero fees
Accounting Complexity: Increased overhead in tracking and managing positions
Solidity Static Analysis
Manual Code Review
Foundry Framework (for potential testing)
Specific recommendations:
Implement a minimum collateral amount check
Limit the number of positions that can be created in a single batch
Add gas-efficient mechanisms for position management
Implement proper fee calculation for small positions
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.