How does ShremHouse draw ticket ?

2 min readApr 12, 2022


We are happy to see Shrem ticket pool has become popular recently, and it seems to have a trend of becoming a market explosion. More and more investors are concerned about whether it is fair. Here is the drawing process :

· Taking the first and second prizes as an example, for each new ticket pool, we first obtain the height of a nearby block,
Take the hash of the 13500000th block of BSC as an example: 0xb2348b87d5414707f0f0698fa2c7f1d3d4992b0d40384a852070ab9e40994f91
· Each ticket number starts from 100001,
· Obtain the obfuscated value of the first prize (1 piece): take the first of the following arrays, that is, the above (hash0xb2348b87d5414707f0f0698fa2c7f1d3d4992b0d40384a852070ab9e40994f91), take the last 7 bits, and perform SHA256 hash calculation to take the last 7 bits as the obfuscated value;
· Obtain the confusion value of the second prize (10 pieces): The confusion value of the first second prize is calculated by SHA256 hash calculation of the first prize confusion value, and the last 7 bits are used as the confusion value; starting from the second second prize, the previous The hash value of a second prize is encrypted by sha256 again, and the last 7 bits are intercepted to make the obfuscation value;
· The value after the following array => is to convert the value of the last 7 digits of the interception to decimal
array(11) {
string(7) “0994f91”=> 10047377
string(7) “9c34996”=> 163793302
string(7) “742f7f6”=> 121829366
string(7) “3552180”=> 55910784
string(7) “3c5bd1a”=> 63290650
string(7) “6948ef5”=> 110399221
string(7) “aeb3d96”=> 183188886
string(7) “c41b34f”=> 205632335
string(7) “3340ce8”=> 53742824
string(7) “1f038e2”=> 32520418
string(7) “629af23”=> 103395107

· The above confusion value is recorded as “A”, and the third prize is the same.

· Get another value B:
· Take the last 20% of participant participation records (less than 200, then add the last 200 timestamps) as B.
· The second and third place extraction methods are based on blockHash, and the above operations are obtained by repeatedly obtaining new hash values ​​from sha-256.

· Add the confusion value A to the value B and the number of participants (number of lottery tickets) to find the remainder plus the basic lottery code

· (A+B)% *100000 + 1100001 = code




A decentralized venture based on DAO; Focus on Metaverse and Web3; Its vision is to become the world's first decentralized Metaverse investment institution.