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
  • Pre-Liquid Token Sale V2 Stages:
  • Key Functions
  1. Smart Contracts

Pre-Liquid Token Sale V2

Overview

The LegionPreLiquidSaleV2 contract is used to execute pre-liquid sales of ERC20 tokens before the Token Generation Event (TGE). It manages the entire lifecycle of the sale, including investing, refunds, raised capital withdrawal, token distribution for vesting, and sale cancellation.

In comparison to LegionPreLiquidSaleV1, in LegionPreLiquidSaleV2 investors deposit the max amount of funds the want to allocate and then the Project reviews and accepts certain amount. If the amount accepted is less than the deposited amount, the investor is allowed to withdraw the excess.

As there is a certain time gap between the period when capital is raised and the TGE, projects are allowed to withdraw capital before they supply the tokens, as they might need early access to it. However, once any raised capital is withdrawn, no changes are allowed to the saftMerkleRoot and vestingTerms.

In comparison to other sale contracts, the LegionPreLiquidSaleV2 is more asynchronous; however, its stages can be described as follows:

Pre-Liquid Token Sale V2 Stages:

  1. Pre-Deposit Period: The stage where investors apply for allocation by depositing the max amount they are willing to allocate.

  2. Acceptance Period: The stage where Projects accept investor's allocations. If investors have deposited more than the accepted amount, they are allowed to withdraw the excess amount immediately after being approved/rejected. Alternatively, they can wait until the end of the refund period for the opportunity to receive higher allocation.

  3. Refund Period: This stage is required by the MiCA regulation, where users can receive a refund if they decide. In the case of a pre-liquid sale, the refund period is counted individually for each investor.

  4. Capital Withdrawal: Once a refund period for an investor is over, projects are allowed to withdraw the raised capital from this investor.

  5. Token Claims: After the TGE details are published by Legion and tokens are supplied by the project, investors are allowed to claim their tokens into the vesting contract deployed for them.

Key Functions

  • initialize: Initializes the sale with configuration parameters.

  • invest: Allows investors to invest capital during the prefund and 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 pre-liquid token sale.

  • publishCapitalRaised: Publishes the capital raised amount by the Project.

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

PreviousPre-Liquid Token Sale V1NextAddress Registry

Last updated 3 months ago