Background
Ref V2 launches on Dec.20. To encourage more users to add liquidity to V2 pools, we
will draw out 10 lucky addresses to award 1225 REF each from those who have
kept position in V2 pools until Dec.23 24:00pm(UTC).
Total REF in need:
12250 REF
How to draw out 10 lucky addresses:
We will choose the first block after Dec.24,2022 00:00am (UTC) as a
random seed, and draw the 10 lucky addresses as following:
-
divide 32 byte hash into 16 double byte integer as random_seed
-
arrange all the addresses that have a liquidity in V2 pool until
Dec. 23, 2022 24:00 pm(UTC) , according to the time for the first time each address adds liquidity -
lucky addresses will have the subscript: math.floor(N*random_seed[i]/65536)
Example:
#assume the target blockhash is:
#GczTaWKjEVbuCRMJGrympqTJtW2TjD9AFxtkbUQBSU44
#and there are 17716 candidates
Blockhash random Tool, candidates count is 17716
Fill in random source: b'e81799b6eb28ca79f09fe865074033ad8a70aa157b9d613a6bc4428c9ceb6825'
We got 16 random seeds
result len: 16
[16062, 10638, 16274, 14012, 16652, 16083, 502, 3577, 9581, 11771, 8555, 6729, 7458, 4606, 10860, 7208]
End.
See more on: GitHub - marco-sundsk/hash2random: Using hashcodes to pick up winners randomly.GitHub - marco-sundsk/hash2random: Using hashcodes to pick up winners randomly.