Reward distribution
How a reward is distributed on opening a pack.
Last updated
How a reward is distributed on opening a pack.
Last updated
$PACK Protocol implements the generic concept of packs filled with rewards, where opening a pack yields a reward contained in that pack.
$PACK Protocol implements this concept for EVM based chains, and makes use of credibly neutral building blocks like Chainlink VRF. As a result, the process behind 'who gets what reward on opening a pack' is easily, publicly auditable, ensuring no 'backdoor winners'.
In this section, we explain how rewards are distributed upon opening a pack.
A fixed supply of packs is created when someone creates packs with a set of underlying rewards. The total amount of packs created is equal to the sum of the amounts of each kind of reward it contains.
For example, if someone creates packs with three underlying rewards - packing an amount 5, 15 and 80 of each - a total of 100 packs are created.
A pack can be opened to retrieve the rewards in that pack. What determines how rare a particular reward is, boils down to how many of those rewards exist in total.
What determines how rare a particular reward is, boils down to how many of those rewards exist in total. The total amount of a kind of reward that exists across a set of packs determines the % chances of receiving that kind of reward on opening a pack.
For the set of 100 packs with three kinds of rewards - 5, 15 and 80 of each across that set of packs - there's a 5/100
i.e. 5%, 15% and 80% chance, respectively, of receiving that reward on opening a pack. You can find a more detailed version of this example, here.
We shall extend this example of a set of 100 packs with three kinds of rewards - 80 circles, 15 squares, and 5 stars.
The supply of the rewards in this set of packs - 80 circles, 15 squares, and 5 stars - can be represented on a number line, from zero to the total supply of packs - in this case, 100.
Whenever a pack is opened, the protocol uses a new random number in the range of the total supply of packs to determine what reward will be distributed to the pack opener.
In our example case, the protocol uses a random number less than 100 to determine whether the pack opener will receive a circle, square or a star. So e.g. if the random number num
is such that 0 <= num < 5
, the pack opener will receive a star. Similarly, if 5 <= num < 20
, the opener will receive a square, and if 20 <= num < 100
, the opener will receive a circle.
Note that given this design, the opener truly has a 5% chance of receiving a star, a 15% chance of receiving a square, and an 80% chance of receiving a circle.
The protocol uses a new random number each time a pack is opened.
For the reward distribution to be fair and solely based on the rarity of rewards, the random number used on the opening of a pack must be 'truly random' - neither manipulable by the pack opener, nor knowable to the opener before opening the pack.
To this end, the protocol uses Chainlink VRF (Verifiable Random Function) to source random numbers.
Chainlink VRF is a random number generator that operates on a request ←→ response model, where a smart contract can request a random number from the Chainlink VRF system in one transaction, and the Chainlink VRF system fulfills that request in a subsequent transaction with a random number.
When a pack is opened, the protocol requests Chainlink VRF for a new random number, which then determined which reward is distributed to the pack opener.
Chainlink VRF collects a fixed fee in $LINK, for every random number request. $PACK Protocol's smart contracts will be funded with an initial amount of $LINK by the protocol admins, during the protocol's beta phase. The protocol fee collected on pack and reward sales / resales will be used to continue funding the protocol's smart contracts with $LINK, to pay Chainlink VRF fees.