# How does ShremHouse draw ticket ?

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) {

[“0xb2348b87d5414707f0f0698fa2c7f1d3d4992b0d40384a852070ab9e40994f91”]=>

string(7) “0994f91”=> 10047377

[“0x96dbd2100afb6222ee7a8128b0180513de0744a2f043a00062176d59a9c34996”]=>

string(7) “9c34996”=> 163793302

[“0xf673ca5600e91dd4608dc06f8f58827b2b4dde50988c4dc63221c3487742f7f6”]=>

string(7) “742f7f6”=> 121829366

[“0x93adf50bcf7943883e85eff37961e56952d7795f9a864f362672ab0603552180”]=>

string(7) “3552180”=> 55910784

[“0x96bd0181b4c6092c2865bef089d5df8529a1bffce73eccf40ec9756743c5bd1a”]=>

string(7) “3c5bd1a”=> 63290650

[“0x7db05f6cc7ce41a125468cbb1cd1710e3530224fc0532aa6455d7fed66948ef5”]=>

string(7) “6948ef5”=> 110399221

[“0x41012885f533d46ce22138d23efe8510dfe03ff16590da74f29bed3a2aeb3d96”]=>

string(7) “aeb3d96”=> 183188886

[“0x7b4610d1975d2d1ceb29459d832001cd6b83a2fa97c995dd8be592d46c41b34f”]=>

string(7) “c41b34f”=> 205632335

[“0xa1f21465a3a352f30526904d3fff11d5e4d23ff9ea9ca0a2416c188ed3340ce8”]=>

string(7) “3340ce8”=> 53742824

[“0x6b36ec992d286117f8d0d03e882bb3635b1ddea93c65d7f759bdb313d1f038e2”]=>

string(7) “1f038e2”=> 32520418

[“0x8c94a352a943d8b66545cecb35191ed4cc8c6694fac3c97ec482adf3c629af23”]=>

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