Starknet Auction

First Flight #26
Beginner FriendlyNFT
100 EXP
View results
Submission Details
Severity: low
Invalid

Potential for Out-of-Gas Issues with Large Bid Maps

Summary

The contract uses a dynamic Map structure to track bids from multiple bidders. If a large number of bids are placed, iterating through this map during withdrawals could lead to out-of-gas errors.

Vulnerability Details

The withdraw function potentially handles large numbers of bids stored in the bid_values map. If many bidders participate in the auction, retrieving and clearing each bidder's bid during withdrawal could consume too much gas.

Impact

If too many bids are placed, users may face gas limit issues when trying to withdraw their funds, leading to failed transactions and unclaimed funds.

Tools Used

  • Manual code review

Recommendations

  • Consider using a batched withdrawal mechanism, where users can withdraw in smaller, manageable portions over several transactions.

  • Alternatively, ensure the Map is optimized for gas usage when iterating over large numbers of entries.

Updates

Lead Judging Commences

bube Lead Judge 9 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.