Understand the Chance Probability Mechanism in Mystery Boxes
1. At storefront (Buyer view)
- When the mystery box is activated, the Chance probability of each item is calculated based on the current stock of each item in the box.
- The Chance probability displayed will remain the same after each box opening (for all buyers).
- The displayed Chance will only change if the box is deactivated and the stock quantity of the items is updated.
2. At the backend (System view)
2.1. Inventory management
- When an item is selected, the stock quantity decreases -> The actual chance is updated behind.
- Please note that: To avoid changes in the displayed chances at the storefront, you should manage stock carefully. Updating stock will refresh the chances, which may confuse buyers.
2.2. Box opening logic
To make this easier to understand, let's explain the logic using an example.
Imagine you have a mystery box with the following items:
Product | Quantity |
A | 3 |
B | 2 |
C | 5 |
-> Total: 10 items
Items are assigned numbers:
- A: 1, 2, 3
- B: 4, 5
- C: 6, 7, 8, 9, 10
When a buyer opens the box, the algorithm generates a random number (1–10) to select an item (called Mersenne Twister algorithm).
After each item is selected, the system reduces the stock and reassigns new numbers to the remaining items. Then, the random selection process works again with the updated numbers.
Updated on: 29/07/2025
Thank you!