The automatic whitelisting of new collections on L2 during withdrawals can be exploited to bloat the whitelist, potentially leading to increased gas costs and partial DOS.
In withdraw_auto_from_l1, new collections are automatically whitelisted.
This is done trough ensure_erc721_deployment :
An attacker can repeatedly initiate withdrawals with new collection addresses, bloating the whitelist.
In any case this will naturally growth over time and impact the gas cost of each new collection on the starknet side.
Increased gas costs for operations that iterate over the whitelist.
Partial DOS of functions that rely on whitelist iterations.
Manual review
Implement a gas-efficient data structure for whitelist checks:
Consider using a mapping for O(1) lookup instead of array iteration
Explore Merkle tree validation for whitelist proofs
Likelyhood: High, once the whitelist option is disabled, collections will grow. Impact: High, withdraw won’t be possible because of Out-Of-Gas.
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.