Packs and Rewards
Design rationale for $PACK Protocol's primitives - packs and rewards.
Last updated
Design rationale for $PACK Protocol's primitives - packs and rewards.
Last updated
$PACK Protocol has two primitives - packs and rewards. In this section, we give a technical explanation of what packs and rewards are, and the role they play in the protocol.
Packs are designed to work as generic packs that contains rewards in them, where a pack can be 'opened' to retrieve the rewards in that pack. Packs like these already exist as e.g. regular Pokemon card packs, or in other forms that use blockchain technology, like NBA Topshot packs.
Packs are ERC 1155 tokens. Adopting the ERC 1155 token standard for packs allows the protocol to create different kinds of packs, where each kind of pack is individuated by a unique set of underlying rewards, and has it's own independent supply.
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.
The protocol assigns each new set of packs created in this way, with a unique integer token ID.
The supply of packs decreases when packs are opened in exchange for one of the pack's rewards. Packs are burned when they are opened; they can be opened only one at a time.
Packs 1-1 represent their underlying rewards, which guarantees the receipt of a reward on opening a pack.
$PACK Protocol recognizes any ERC 1155 token as a reward. Adopting the ERC 1155 token standard for rewards means a pack can have different kinds of rewards, each having its own independent supply.
Further motivation behind adopting the ERC 1155 standard for rewards can be found in the Motivation section of the official ERC 1155 standard write-up, here.
Other kinds of crypto assets, like ERC 721 NFTs or ERC 20 tokens must be wrapped as ERC 1155 tokens to create packs with those tokens as rewards. This allows for creative ways to bundle arbitrary crypto assets as rewards.
Let's say we want to giveaway 10,000 $SUSHI, an ERC 20 token. We want to structure our giveaway such that one lucky person wins 1000 $SUSHI, 400 people win 10 $SUSHI each, and 5000 other people receive 1 $SUSHI for participating in the giveaway.
To accomplish this, we wrap different amounts of our $SUSHI as different ERC 1155 tokens.
We wrap 1000 $SUSHI as an ERC 1155 token with supply 1
, 4000 $SUSHI as an ERC 1155 token with supply 400
, and the rest 5000 $SUSHI as an ERC 1155 token with supply 5000
.
We create our set of packs with these three different kinds of ERC 1155 wrapped $SUSHI tokens. Since the amount of packs minted is equal to the sum of the supplies of its underlying rewards, we will have minted 1 + 400 + 5000
i.e. 5401
packs.
We choose to airdrop our pack to 5401 people - one pack each.
Since packs 1-1 represent their underlying rewards, of those people, 1
lucky person will receive 5000/1
i.e. 5000 $SUSHI on opening a pack, 400
people will receive 4000/400
i.e. 10 $SUSHI, and the rest of the 5000 people will receive 5000/5000
i.e. 1 $SUSHI.