3.7 KiB
hidden
| hidden |
|---|
| true |
Using the Launchpad
Deployment
Listing
contract-owner calls create-pool with the following parameters.
launch-token-trait: the trait reference ofproject token(e.g. ALEX)payment-token-trait: trait reference ofpayment token(e.g. sUSDT)launch-owner: address of the project that launches theproject tokenlaunch-tokens-per-ticket: number ofproject tokenperticketprice-per-ticket-in-fixed:payment tokendeposit required perticket(in 8-digit fixed notation)activation-threshold: number of tickets required to activate the launchregistration-start-height: start (inclusive) block-height of registration periodregistration-end-height: end (inclusive) block-height of registration periodclaim-end-height: end (inclusive) block-height of claim (i.e. lottery) periodapower-per-ticket-in-fixed:apowerrequired for eachticket(can be a list, in 8-digit fixed notation)registration-max-tickets: maximum number ofticketan address can registerfee-per-ticket-in-fixed: listingfeecharged by the platform as percentage ofprice-per-ticket-in-fixed(in 8-digit fixed notation)
Launch price of project token in payment token = launch-tokens-per-ticket / price-per-ticket-in-fixed
Project Token Transfer
Once the pool is created, and before the registration period starts, launch-owner must call add-to-position with the following parameters:
launch-id: id of the launchtickets: number ofticketslaunch-ownerwants to allocate tolaunch-token-trait: trait reference ofproject token
Total raise for project token = tickets x launch-tokens-per-ticket x Launch price of token.
Upon calling add-to-position, (tickets x launch-tokens-per-ticket) of project token will be transferred from launch-owner to the contract.
Registration
Participants call register with the following parameters:
launch-id: id of the launchtickets: number ofticketthe participant wants to registerpayment-token-trait: trait reference ofpayment token
Assuming (1) registration period has started, (2) registration period has not ended and (3) the participant is not already registered, the contract will register the participant and:
- burn the required number of
apowerfrom the participant's wallet, and - transfer
ticketsxprice-per-ticket-in-fixedofpayment tokenfrom the participant's wallet to the contract.
Lottery
The lottery will be drawn one block after the registration ended. The claim/lottery period ends at claim-end block-height.
contract-owner or launch-owner will draw the lottery off-chain using the prescribed rule and call claim repeatedly with the following parameters
launch-id: id of the launchinput: list of participants who won the lottery (up to 200)launch-token-trait: trait reference ofproject tokenpayment-token-trait: trait reference ofpayment token
Upon calling claim, assuming (1) registration period has ended, (2) not all tickets are already won, (3) the launch is activated and (4) the claim/lottery period has not ended yet, the contract will verify the validity of input and
- transfer the proceeds of
payment token, net offee, tolaunch-owner, - transfer
feeto the platform, and - transfer the appropriate number of
project tokento the winners.
Refund will be processed by either contract-owner or launch-owner in a similar manner to the claim.