Skip to content

feat: add Dutch auction mode#537

Closed
dangelo352 wants to merge 1 commit into
Commitlabs-Org:masterfrom
dangelo352:feature/dutch-auction-469
Closed

feat: add Dutch auction mode#537
dangelo352 wants to merge 1 commit into
Commitlabs-Org:masterfrom
dangelo352:feature/dutch-auction-469

Conversation

@dangelo352

Copy link
Copy Markdown

Fixes #469

Summary

  • add Dutch auction mode on unified Auction storage with reserve_price and is_dutch fields
  • add start_dutch_auction, get_dutch_price, and buy_dutch with checked linear price decay and reentrancy protection
  • settle the first valid Dutch buyer at the current decayed price while respecting payment-token allowlist and marketplace fee split
  • document the Dutch auction lifecycle and price formula with a worked example

Tests

  • CARGO_TARGET_DIR=/tmp/commitlabs-dutch-auction-target cargo test -p commitment-marketplace dutch -- --nocapture
  • CARGO_TARGET_DIR=/tmp/commitlabs-dutch-auction-target cargo test -p commitment-marketplace auction -- --nocapture
  • git diff --check

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Dutch-auction price decay to commitment_marketplace::start_auction

2 participants