Sealed Bid Auction Sale
Overview
The LegionSealedBidAuction
contract is used to execute sealed bid auctions of ERC20 tokens after the Token Generation Event (TGE). It manages the entire lifecycle of the sale, including capital pledging, refunds, raised capital withdrawal, token distribution for vesting, and sale cancellation.
LegionSealedBidAuction
uses ECIES encryption. At the beginning of every sealed bid auction, Legion publishes an EC public key. The public key is used by investors to encrypt the amount of the askToken
they want to purchase. The amount of the bidToken
is visible to everyone, as it is transferred to the contract at the time of pledging capital.
After the sealed bid auction concludes and results are published by Legion, the private key is released to the public. From this point on, everyone is able to decrypt their bids and verify if they are correct.
Every sealed bid auction consists of three stages, explained below:
Sealed Bid Auction Sale Stages
Active Sale Period: The actual sale stage where investors pledge capital.
Refund Period: This stage is required by the MiCA regulation, where users can receive a refund if they decide. After the refund period is over, Legion publishes the results from the sale. Projects provide the allocated tokens and withdraw the raised capital from the sale.
Lockup Period: This stage complies with Regulation S. The lockup period starts immediately after a sale ends. Once it is over, investors are allowed to withdraw their allocations into a vesting schedule contract.
Key Functions
initialize
: Initializes the sale with configuration parameters.invest
: Allows investors to invest capital during the active sale.refund
: Allows investors to request a refund within the refund stage.withdrawRaisedCapital
: Enables the project admin to withdraw raised capital post-sale.claimTokenAllocation
: Allows investors to claim their token allocation.withdrawExcessInvestedCapital
: Allows investors to withdraw excess invested capital from the sale contract.releaseTokens
: Releases vested tokens to investors.supplyTokens
: Allows the project admin to supply tokens for the sale.publishSaleResults
: Publishes the results of the sealed bid auction.setAcceptedCapital
: Sets the accepted capital by the Project for an investor.cancelSale
: Allows the project admin to cancel the sale.cancelExpiredSale
: Cancels the sale if it has expired.claimBackCapitalIfCanceled
: Allows investors to claim back their capital if the sale is canceled.
Last updated