Lottery Outcomes
Winner winner chicken dinner!
Last updated
Winner winner chicken dinner!
Last updated
At end time of the lottery, a 24-hour lockout period of the smart contract begins. This is to ensure the platform can get some yield value while preventing the use of flash loans to spam a bunch of entries at the last minute.
Technically the lottery ends at the end of the block after the lottery's duration.
After the lockout period ends, Chainlink Keepers will check to ensure the minimum number of tickets have entered the lottery (simply the Quantity of the good offered) and if that passes calls the VRF, sends it and the ticket information to the probability function living on the DON, and return the winners back. If it fails for not meeting the minimum number of tickets, the lottery is invalidated and Participant stakes and any Sponsor collateral are returned.
We will be using the Fluence decentralized network to run our off chain logic, but eventually, DropShop’s goal is to move all computation on chain when feasible and economical.
The selection function is a probability function where the tickets are put into a pool and randomly selected, with their relative probabilities of selection determined by their TWF. More details can be found in the Selection Function.
After winners are returned to the lottery smart contract the following occurs:
Losing tickets will have their stake transferred back to the Participants’ wallets
Winners will receive an NFT representing an ownership claim to a lottery item from the Sponsor
A critical challenge for this open, decentralized system is around Sponsor fulfillment and once the lottery ends, a particular challenge here since many of the lotteries will be for physical goods. Since a winning Participant’s stake is already secured, fulfillment focuses on verifying the transmission of the good from the Sponsor to these winners.
For digital goods, such as an NFT collection, this can be mitigated by creating a smart contract that holds and then releases both NFT once they are submitted.
For those Sponsors who collateralize the lottery, when the Participant trades the NFT for the item, the Sponsor can burn the NFT to recoup the value locked inside. The participant can also burn it for the collateral if they feel the item will not be fulfilled. It may be less than their stake as there is no protection for price premium, but it offers some insurance.
There is still the risk that a Participant transfers their NFT to a Sponsor, who burns it to get their collateral back, but then does not fulfill the item. Initially, users will have to rely on reputation and goodwill. However, at maturity, we anticipate a robust ecosystem of automated supply chain tracking and management through blockchain and oracle systems. The Sponsor and Participant will coordinate shipping of the good, either off-chain or through some sort of privacy maintaining on-chain method. Chainlink Oracles or another service can then hold the Participant’s winning NFT in escrow until it verifies tracking information from the Sponsor (or runs the entire process itself), at which point the lottery smart contract releases the NFT to be burned to get collateral back.
There could also be physical vault services that can serve as custodial agents for lotteries, such as Mattereum. They can take possession of the inventory from the Sponsor and then manage fulfillment.
Regardless of fulfillment method, once the Participant has received or sold their NFT, they are encouraged to give the Sponsor positive feedback (essentially a ‘thumbs up’) to improve the Sponsor’s reputation score.