-
Notifications
You must be signed in to change notification settings - Fork 181
Feature: Implement a Dutch Auction Mechanism for On-Chain Token Burns #1763
Copy link
Copy link
Open
Labels
GrantFox OSSIssue tracked in GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardIssue may be eligible for a GrantFox rewardThird CampaignCampaign: Third CampaignCampaign: Third CampaigncontractSoroban smart contract workSoroban smart contract workenhancementNew feature or requestNew feature or requesthardHard/complex, cross-cutting contributionHard/complex, cross-cutting contribution
Description
Activity
Metadata
Metadata
Assignees
Labels
GrantFox OSSIssue tracked in GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardIssue may be eligible for a GrantFox rewardThird CampaignCampaign: Third CampaignCampaign: Third CampaigncontractSoroban smart contract workSoroban smart contract workenhancementNew feature or requestNew feature or requesthardHard/complex, cross-cutting contributionHard/complex, cross-cutting contribution
Overview
Add a Dutch-auction mechanism for token burns, used as an on-chain, transparent price-discovery method:
start_pricetoreserve_priceover the auction duration.Scope: contract only. No backend or frontend integration is required for this feature.
This feature is conceptually related to the Commit-Reveal Auction Tie-Breaking issue — that module is designed to resolve simultaneous-bid ties for auction-style mechanisms like this one. Check whether it's a hard dependency before deciding whether to pick up both together.
Integration points
contracts/token-factory/src/burn_auction.rs, declared viamod burn_auction;inlib.rs#[contractimpl]entry points added to theTokenFactoryimpl block inlib.rs(create auction, bid/win, price query, cancel/expire)DataKeyvariants added totypes.rsfor auction state — do not reuse existing discriminantsErrorvariants added totypes.rsstarting at 133 (current highest in-use code is132), with matching entries added toError::name()storage.rsfollowing the existing patternevents.rsusing shortsymbol_short!topic names (Soroban's 9-character limit)burn.rsmodule rather than a parallel burn implementationAcceptance criteria
burn_auction.rsimplemented undercontracts/token-factory/src/, wired intolib.rsDataKey/Erroradditions follow the checklist aboveburn.rsburn_auction_test.rscovering: linear price decay over time, winning bid at/above current price, bid-below-current-price rejection, expiry with no winner, reserve-price floorfuzz_burn_auction.rs) with a seed corpus covering at least: a bid below reserve price, bid-amount overflow, decay reaching the reserve floor, and a zero-duration auction — wired into.github/workflows/fuzz-testing.ymlif addedcargo check --libandcargo test --libclean incontracts/token-factorycargo build --target wasm32v1-none --release --libsucceedsNotes for implementers