Legion
  • General
    • Introducing Legion
    • The Legion Webapp
    • High Level Sale Customer Journey
    • The Legion Whitepaper
  • Backend
    • Intro
    • Authentication
    • API Integration Flow
    • Swagger Documentation
  • Front end
    • Intro
  • Smart Contracts
    • Overview
    • Architecture
    • Fixed Price Sale
    • Sealed Bid Auction Sale
    • Pre-Liquid Token Sale V1
    • Pre-Liquid Token Sale V2
    • Address Registry
  • Deployments
    • Ethereum Mainnet
    • Arbitrum One
  • Security
    • Audits
    • Bug Bounty
    • Incident Response Plan
    • Incident Response (Blacklist)
Powered by GitBook
On this page
  • Overview
  • Sealed Bid Auction Sale Stages
  • Key Functions
  1. Smart Contracts

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

  1. Active Sale Period: The actual sale stage where investors pledge capital.

  2. 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.

  3. 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.

PreviousFixed Price SaleNextPre-Liquid Token Sale V1

Last updated 3 months ago