FT Lottery
Fungible Token Lottery
PaySwap enables normal users/businesses to launch and run their own lotteries. An FT lottery is a lottery that rewards its players in fungible tokens.
Here is a step-by-step guide to launching your own FT lottery:
Go to the lotteries page and click on the Create Lottery button
Fill in the form with the appropriate values and validate the transaction. You can read the description of each parameter by hovering your cursor over the help icon next to each parameter. Make sure you pick No for the NFT prize parameter since this is an FT lottery and therefore will be no NFT prize
You can learn more about how lotteries work by reading the documentation on the page below:
🎟️LotteryAfter you've deployed your lottery, reload the page and tick the Mine Only button to only show your lotteries. This will enable you to find your lottery faster.
For a list of all the functions you have access to, to run your lottery, click on the Control Panel button to view its menu of functions
The next step is to add tokens to your FT lottery, these are the fungible tokens with which your users will be purchasing your tickets. You can add as many tokens as you please but you have to also add a ticket prize for the token you are adding. To add a token, go to your lottery's control panel menu and click on the Add New Token button. Fill in the form with appropriate information and validate the transaction
You should see your added tokens listed in the bottom left section of your lottery's panel.
Buying Lottery Tickets
You can read about buying lottery tickets from the page below:
🎟️LotteryClosing Lotteries
A lottery can only draw a winning number after it has been closed. Anyone can close an ongoing lottery granted at least one of these 2 conditions are met:
The lottery has passed its specified end time
The lottery has a first prize pot bigger than its end amount value. The first prize pot is that of the first added lottery currency.
To close a lottery, go to its control panel menu and click on the Close Lottery button. Make sure the correct lottery ID has been entered and validate the transaction.
Draw Winning Number
Once your lottery has been closed, anyone can run it random number generator to pick a winning number. To do so, go to your lottery's control panel menu and click on the Draw Final Number button
Make sure the correct lottery ID has been entered and validate the transaction.
Congratulations!!! Your lottery can now distribute rewards, anyone who's purchased a ticket can check the winning number from the lottery's page and claim his/her rewards in case of a win.
Claiming Tickets
You can either claim your ticket from the lotteries' page or your lottery's page
Claiming Tickets Through Lotteries' Page
Go to your lottery's control panel menu and click on the Claim Tickets button
Enter the appropriate parameters and validate the transaction. Claiming the tickets does not send the rewards to your wallet but instead adds it to your pending revenues in the lottery that you can withdraw later on by running the Withdraw function
Claiming Tickets Through The Lottery Page
To claim your ticket through the lottery page, go to the lottery's page and click on the Claim Tickets button
Enter the appropriate parameters and validate the transaction.
Withdraw Pending Revenue
Through The Lotteries' Page
To withdraw your revenue through the lotteries' page, go to your lottery's control panel menu and click on the Withdraw button
Through The Page Of Your Lottery
Scroll down to the Check Winnings button and click on it.
This will reveal your pending revenue in the lottery in a pop-up form. Click on the claim button from the pop-up and validate the transaction.
Relaunching A Lottery
After a round of a lottery, you can start that lottery again by going to your previous lottery's control panel menu and clicking on the Start Lottery button
Fill in the form and validate the transaction. This will create a new lottery with a different ID.
Check from your new lottery's parameters' section whether there are some funds left from your previous lottery under the Amount Left To Reinject parameter
You can also check your previous lottery's parameters' section under the same parameter to check whether there are some funds left to reinject. Select each token one after the other and check that parameter for each one of them.
To reinject leftover funds into the new lottery, make sure you add the token of which funds are left over to the new lottery, then go to your new lottery's control panel menu and click on the Inject Funds button
Make sure the correct lottery ID is inputted, enter 0 for the amount and Yes for the Reinject parameter. Validate the transaction. You should confirm there's no more tokens left to transfer from the lottery's parameters' section.
Do this for every token that has some amount left to reinject.
Last updated