Second Chance Lotteries
Losing doesn't mean that you have lost.
Last updated
Losing doesn't mean that you have lost.
Last updated
Second Chance Lotteries are new kind of lottery which let the losers of the lottery try again in a different lottery for a second chance to win.
In the above example the users can play the USDC Lottery if he has 10 USDC. He need to click on approve to approve the lottery contract.
The user then clicks the "Enter with 10 USDC button".
10 USDc will be sent to the lottery contract and the no of players should have also increased after the transaction becomes confirmed.
When the last user has entered the lottery the ChainLink VRF is executed to randomly chose the winner.
The settleLottery() is then called by a bot. This function is a public function and can be called by anyone even if there is an issue with the bot. It is completely decentralized.
Once settleLottery() is called the winners will automatically be transferred the amount specified for payout in to the participating wallet.
The losers would be mined L-USD which is a lottery token which can be used to participate in the second chance lottery.
This works in the same way as above, except to enter only L-Tokens will be burned from the users wallet. This verifies that the L-tokens cannot be used more than once.
The Lottery should be settled automatically whenever the last player enters by using an inhouse bot to reset the lottery. In case the bot fails to settle the lottery. Any user can go to https://polygonscan.com/address/0x653441299ec28e0301d640006e2cec4776eba671#writeContract
and click the settle lottery button as long as the last player has already entered the lottery.
Winners will not be minted L-Tokens.
Check out our medium to understand more about how chainlinks VRF RNG works.