Lumenswap
Search…
Choosing the winner
We have created a fair model so that everyone can understand the winner selection process.
At the beginning of each round, the Lumenswap team specifies a ledger/block number on Stellar that will be generated in roughly 30 days after the round starts.
Once that specific ledger is created, the winner selection process starts.
The mechanism works by comparing ticket hashes to the ledger hash to find the longest matching substring:
It starts by comparing the first character of the ledger hash with that of ticket IDs. Non-matching hashes are eliminated and the matching ones proceed to the next step where the second characters are compared. The process continues until a single ticket ID remains, which will be designated as the lottery winner.
Let us demonstrate this process with a few examples.
Scenario 1
Let’s say we have three tickets for one round:
T1: 9330ba3bc04d04b258390f8c7e42fe03af57b79d5413a53341e0c09a306534
T2: 3ab2ddf00b4c17ceea016d45b6ac11cc1d4c70ee7b943de72669210ae7098a
T3: 378f0d225a59c7caabe46079a3aef6edba47ab7838c45feffc6abb9436808f1e
And the ledger hash is:
3ac61ddc1df04bd76fe965d3193710d130baa85503cd911a7ddb37b674432b
Here, we compare the first character of the ticket IDs with that of the specified ledger hash. As you can see, the first character of T2 and T3 is the same as the first character of the ledger hash — unlike T1. So, T1 is removed, and we repeat the same process for the second character of the hashes. T2 has the same second character as the ledger hash as opposed to T3. So, Ticket 3 is eliminated and T2 wins the lottery.
Scenario 2
Let’s say we have three tickets for one round.
T1:
32p0ba3bc04d04b258390f8c7e42fe03af57b79d5413a53341e0c09a306
T2:
3kd2ddf00b4c17ceea016d45b6ac11cc1d4c70ee7b943de72669210ae70
T3:
37of0d225a59c7caabe46079a3aef6edba47ab7838c45feffc6abb9436808
And the ledger hash is:
3192e59ab9d0d239769f1db1d0cec388796f8c6c04a0653b6a88e79e46f09
Here, we compare the first character of the ticket IDs with the first character of the desired ledger hash. As you can see, all the tickets have the same first character, which matches the first character of the ledger hash. So, we move on to the next step to compare the second characters. None of the second characters matches the second character of the ledger hash. What happens now?
In this case, the ticket with the earliest timestamp is selected as the lottery winner.
Last modified 1mo ago
Copy link