πŸ‘©β€πŸ”¬Minting Resolution (Technical)

Explanation of how the minting attempts are resolved, and a prize is selected.

After a user mints, the minting process happens in three steps:

  1. A random number is requested from the Chainlink VRF contracts

  2. Chainlink VRF fulfills the request for random numbers by prodiving them

  3. The random numbers are used to determine the outcome of the minting attempt

This section is concerned with step 3 of the process - the method by which the mint outcomes are determined.

Resolution Process

To begin with, two random numbers are received from Chainlink VRF. The first is used to determine whether an asset has been one. If no asset is won, the second random number is used to determine which $MINT tier is selected. Therefore, there are up to two steps to determine a minting outcome:

  1. Determine if an asset is won

  2. If no asset is won, select a $MINT tier.

Normalizing Random Values

Every percentage calculation involves a "base" - for example, in the case of "percent" the base is 100, so that 10% means "10 out of 100". In the PerpetualMint contracts, the base of 1000000000 is used - this means that 10% corresponds to "100 000 000 out of 1 000 000 000".

Determining if an Asset is Won

If this condition is satisfied, an ERC1155 token is minted to the minting account, which is derived from the collection address. This token is the receipt (or "IOU") that an account has an asset owed to them. Minters may trade these tokens freely!

Determining $MINT Tier

This check is done against every tier, with its associated probability, until the above inequality is satisfied, at which point, the tier corresponding to that risk is selected, and the $MINT tokens are minted.

Last updated