🤔

# How the Draw Works

Kaching’s draw operates on a daily basis. Picks will be allocated to the user based on their proportion of staked CRO in the TVL of Kaching. Each user’s pick has a unique, pseudo-randomly generated number! This number is generated by first hashing the wallet address and then hashing it again with a sequential pick number. ✨🔢

The parameters of each draw may change from time to time, but we will be sure to announce any changes on our Discord.

TL;DR: The more well-matched a user’s pick is to the Winning Number, the higher the prize will be.

Please note, Tier 0 is used to represent the highest tier of a match and is for calculation purposes only.

**We will use Tier 1 to represent the highest tier of a match in other parts of the documentation and on Kaching’s main UI as well.**Every day, we will request a randomly-generated number (“Winning Number”) from Band Protocol's VRF bot (Learn More). This number follows the same structure as the pseudo-random numbers of each pick.

We will then compare each pseudo-random number on each pick to the "Winning Number", and the magic of matching begins! 🃏💫

Please bear in mind that the following calculations make use of example figures and should be taken as a reference only.

There are a few variables that is necessary to understand the mechanics behind the draw:

Variable | Definition |
---|---|

Bit Range (BRS) | Imagine climbing a ladder of increasing difficulty. It represents the number of bits that must match in order for a pick to reach the next higher tier.
Each tier is (2^Bit Range) times more difficult than the subsequent one (in ascending order). |

Match Cardinality (MC) | This defines the total count of "Bit Ranges" required to achieve the highest-tier prize. Think of it as the steps you need to take on your journey towards the grandest prize. |

Possible Picks (PP) | The number of possible combinations that the Winning Number can be. PP = (2^(MC*BRS)) |

Probability to win Top Prize (PWT) | Each individual pick’s likelihood of winning the top prize. PWT = 1 / (2^PP), OR: PWT = 1 / (2 ^ (MC*BRS)) |

Tier Number | An ascending numerical sequence, beginning with 0, that represents the different tiers. It also represents the increasing relative ease to achieve the degree-of-match required for each subsequent tier. In other words, Tier 0 is the hardest to match, and each subsequent tier becomes progressively easier to match. |

Possible Picks in each Tier (PPT) | The number of possible combinations that achieve partial matching to varying degrees with difficulty as specified by the tier number. The higher the number the more possible combinations. Where Tier Number > 0: PPT = 2 ^ (BRS*Tier Number) - 2^ (BRS * (Tier Number - 1)) |

Probability of Combination in Certain Tier (PCCT) | The likelihood of a combination to be in a given tier. This can be calculated by dividing the possible picks in each tier, by the total number of picks possible. PCCT = PPT / PP |

Now, let's delve into how the matching process works.
Using an example setup of

**Bit Range (BRS) = 1**and**Match Cardinality (MC) = 3**.This implies the Possible Picks (PP) of the full Winning Number is 2^3 = 8;

- 000, 010, 001, 011, 100, 110, 101, 111

And the Probability to win Top Prize (PWT) is 1 / 8.

**Let's consider a hypothetical Winning Number: 111.**

Given the presence of multiple tiers in the prize configuration, the matching process extends to cover each tier. This ensures that prizes are distributed fairly and accurately to winners across all tiers.

Tier Number | Possible Picks in each Tier (PPT) | Combinations given Winning Number is ‘111’ |
---|---|---|

0 | 1 / (2^(3*1)) = 1 | 111 |

1 | 1 / (2^(1 1) - 2^(10)) = 1 | 110 |

2 | 1 / (2^(1 2) - 2^(11)) = 2 | 100, 101 |

3 | 1 / (2^(1 3) - 2^(12)) = 4 | 000, 001, 010, 011 |

The probability of each pick achieving each tier can then be calculated:

Tier Number | Probability of Combination in Certain Tier (PCCT) |
---|---|

0 | 1 / 8 |

1 | 1 / 8 |

2 | 2 / 8 |

3 | 4 / 8 |

Let’s further assume that the total prize amounts to 1,000 CRO and we want the following prize amounts:

Tier Number | PPT | Each ticket’s prize amount |
---|---|---|

0 | 1 | 550 CRO |

1 | 1 | 200 CRO |

2 | 2 | 125 CRO |

3 | 4 | 0 CRO |

To ensure an enticing distribution of rewards that matches the thrill of the draw, we meticulously configure the allocation of prizes for each tier. In our example scenario, we're splitting the rewards as follows:

Tier Number | Allocation | Amount |
---|---|---|

0 | 55% | 550 CRO |

1 | 20% | 200 CRO |

2 | 25% | 250 CRO |

3 | 0% | 0 CRO |

In our example's Tier 2, where the Possible Picks in the Tier (PPT) exceeds 1, the prize allocated to this tier is distributed among multiple winning combinations. This dynamic arrangement ensures that more participants get to savor the joy of victory within this tier.

In reality, the prize amount is set by Kaching, and will take into account the yield generated from the yield source as well as any subsidies provided to the distribution smart contract.

Last modified 2mo ago