Implement an Auction Module for Marginal Price Sealed Bid Auctions, utilising local/on-chain storage of bids and external settlement by a trusted party.
Auction Creation
Sellers will create auctions on this module by submitted a transaction to the AuctionHouse.auction with the Keycode for this type specified. Aside from the standard Routing and Auction Parameters, the following variables need to be provided:
Public key for encryption
Minimum price for the auction (encrypted)
Minimum amount of tokens to sell
Sealed Bids
Users will submit bids on-chain. Bids will remain sealed through the following mechanisms:
Users will provide the amount of quote tokens in each bid
Minimum amount out is encrypted, as it would reveal the desired price
The quote tokens will be transferred at the time of bid submission.
Bid Cancellations
Prior to auction settlement, bids can be cancelled.
At the time of cancellation, the provided quote tokens will be refunded to the bidder.
Auction Settlement
Settlement will be performed off-chain by a trusted party and submitted on-chain. The following will be provided:
The caller will be validated as authorized
Validation that the settlement has been conducted properly (e.g. ZK proof)
The winning bids provided (could be the full data to save on gas, or just bid IDs)
The marginal price per payout token (which will be used to determine the payout per bidder)
The settlement provider will be provided with the private key that enables decryption of the minimum amount out.
The exact settlement methodology is described in #19
Q: are partial fills supported?
The auction module will perform the following:
Q: does it need to validate that bids exist?
Q: does it need to validate quote/payout capcity?
Auction Cancellation
If the auction is cancelled prior to settlement, the provided quote tokens will be refunded to all bidders.
Refunds
Bidders that did not have winning bids can claim a refund (if they have not already done so).
Objective
Implement an Auction Module for Marginal Price Sealed Bid Auctions, utilising local/on-chain storage of bids and external settlement by a trusted party.
Auction Creation
Sellers will create auctions on this module by submitted a transaction to the
AuctionHouse.auction
with theKeycode
for this type specified. Aside from the standard Routing and Auction Parameters, the following variables need to be provided:Sealed Bids
Users will submit bids on-chain. Bids will remain sealed through the following mechanisms:
The quote tokens will be transferred at the time of bid submission.
Bid Cancellations
Prior to auction settlement, bids can be cancelled.
At the time of cancellation, the provided quote tokens will be refunded to the bidder.
Auction Settlement
Settlement will be performed off-chain by a trusted party and submitted on-chain. The following will be provided:
The settlement provider will be provided with the private key that enables decryption of the minimum amount out.
The exact settlement methodology is described in #19
Q: are partial fills supported?
The auction module will perform the following:
Auction Cancellation
If the auction is cancelled prior to settlement, the provided quote tokens will be refunded to all bidders.
Refunds
Bidders that did not have winning bids can claim a refund (if they have not already done so).