espresso-sequencer icon indicating copy to clipboard operation
espresso-sequencer copied to clipboard

Implement auction results calculation logic

Open VolodymyrBg opened this issue 7 months ago • 3 comments

Implements auction results calculation logic

This PR:

  • Implements the auction results calculation logic in the marketplace-solver module
  • Adds proper bid selection based on highest bid amount for each namespace
  • Ensures each winning bid is only included once in the results
  • Maintains the existing reserve bids functionality
  • Reuses the permissionless implementation for the permissioned method

This PR does not:

  • Change the database schema or API interfaces
  • Modify the existing bid submission process
  • Add additional validation for permissioned auctions (left for future work)

Key places to review:

  • marketplace-solver/src/state.rs, calculate_auction_results_permissionless function
  • marketplace-solver/src/state.rs, calculate_auction_results_permissioned function

Things tested

  • Logic for selecting highest bids per namespace
  • Handling of empty bid collections
  • Proper inclusion of reserve bids in results

[x] Issue linked or PR description mentions why this change is necessary. [x] PR description is clear enough for reviewers. [x] Documentation for changes (additions) has been updated (added). [x] If this is a draft it is marked as "draft".

VolodymyrBg avatar Mar 03 '25 18:03 VolodymyrBg