How it Works

The raffle

To start a draw, simply send the valid NFT that will be drawn as a prize to the corresponding RaffleSocial.com address.

In this initial phase, only NFTs from policies that have already been validated in the jpg.store will be accepted, as shown in the example below.

Non-approved NFTs will be able to return to their owners, simply by going through the refund process.
At first only raffles made by our team will be available, but soon any user will be able to raffles their NFTs

Starting the Raffles

With the NFT validated, a draw is generated containing:

- Exclusive page to publicize the giveaway.

- Prize to be drawn (NFT held by RaffleSocial.com)

- Exclusive address for receiving tickets.

- Draw Start Date.
This date is generated automatically, starting 2 seasons after receipt of the NFT.

- TICKET Receipt Period.
During the next 2 seasons (10 days duration) the address may receive TICKETs, for each token received a number will be issued (validating by transaction order)

- Closing Date.
The receipt period ends at the end of the period in which the total sum of TICKETs received exceeds the minimum required for the draw.

- Time of draw date
A pré-define future season will be used as an element to define the winner of the prize. For this we will use the out_sum field with a rule that will be explained later.

- Disclosure on Social Media.
The giveaway page will be posted on RaffleSocial.com's Twitter, Facebook and Instagram.

Lottery Closing

The receipt period ends at the end of the period in which the total sum of TICKETs received exceeds the minimum required for the draw.

After being seasons receiving interested in the prize, each TICKET received will be transformed into a unique number to be drawn.

After the period defined as the draw has passed, we run the script that will reveal the winner of the prize and after being validated by 3 different nodes, we will create a transaction containing:

- Sending the prize to Wallet with the TICKET drawn.

- Submission of all used TICKETs to the RaffleSocial.com treasury.

- Submission of all ADAs received to the draw creator's Wallet.

Infrastructure

We internally use postgres database with cardano-db-sync to infer all data from blockchain.

Example of Operation

Let's say that the wallet ( abc1 ) sent an NFT from Aquafarm on 01/21/2022 to the RaffleSocial address, thus starting the draw process.

After validating that your policy is true, the draw data is added to the system. As this transaction took place in season 316, the draw was scheduled to run during seasons 318 and 319, that is, during the period from 01/30/2022 21:45:49 to 02/09/2022 21:44:03 and the number drawn will be epoch data 319.

Let's say that after the draw, at the beginning of season 320 we can count 132,410 TICKETs wagered to receive this prize. As the out_sum of epoch 319 was exactly 40813881112218506 and this value is greater than the number of tickets received, we subtract the total value of tickets from this number, successively, until the number is equal to or less than the number of tickets received. That is, in this example, the winner would be the wallet with TICKET number 72216.