Allocate Algorithm

Allocate algorithm is the most common algorithm in RuleOS.

Applicable scenarios: blind boxes, airdrops, lucky draws, game character upgrades, game equipment synthesis and so on.

There are 4 ways to call Allocate algorithm

1. No offset, no random

Input: 100U

Output: Bit(ERC20) 20, Monkey(ERC721) #1~#100 are given in sequence

Call: After user puts in 100U, a single transaction gets the output directly without waiting

2. No offset, with random

Input: 100U

Output: 75% random output of 20 Bit(ERC20) or 25% random output of 1 Bird(ERC721) #5~#10.

Call: user puts in 100U and randomly gets Bit or Bird

3. With offset, no random

Input: 100U

Waiting: 1 hour

Output: Output Bit (ERC20) 20

Call: After the user puts in 100U, wait for 1 hour and call again to get the output Bit20

4. With offset, with random

Input: 100U

Waiting: 1 hour

Output: 75% random output Bit (ERC20) 20 or 25% random output Bird (ERC721) #5 ~ #10 1

Call: After the user puts in 100U, wait for 1 hour, then call again to get Bit or Bird randomly

Last updated