Round 2 of the lottery is now live

Lumenswap
Lumenswap
Published in
4 min readDec 24, 2021

Greetings Lumenswap community!

We are thrilled to announce that the second round of the lottery is now live. To know more about the Lumenswap lottery and why it is a part of the Web 3.0 revolution, you can refer to the Lottery Introduction article.

Round 2 Info

Period: 38859006 Ledger → 39318422 Ledger (~ 24 Dec 2021 → ~24 Jan 2022 )

Prize: Polestar 2 ($67k*), its equivalent value will be sent to the address of the winner in XLM.

Ticket price: 1 LSP

Goal Ledger: 39318423 (The winner will be determined in this ledger number.)

How Can I Buy Tickets?

We have designed a simple and intuitive user interface to let you buy a ticket with just a few clicks.

To get started, click the Buy Ticket button and verify your LSP payment through a modal window. After that, your request will be sent to the Stellar network, and your ticket will be purchased.

Note: The transaction hash will serve as your ticket ID.

You need to repeat this process for buying each ticket because we need your signature for each transaction.

But there’s also an easier way to buy more than one ticket. If you log in with your private key, you’ll see the Buy Tickets button instead of Buy Ticket. By clicking this button, a modal window will open where you can enter the number of tickets you want. Next, you can click on the Buy button to get your tickets. Of course, this process may take a while because a transaction should be sent to the network for each ticket.

You can also buy your tickets through other wallets and clients. For that, all you need to do is to send 1 LSP for each ticket through a payment operation to this address. GAB7STHVD5BDH3EEYXPI3OM7PCS4V443PYB5FNT6CFGJVPDLMKDM24WK.

If you send less than the specified amount to this address, you won’t get a ticket, and you’ll lose your funds. Also, if you send more than the specified value to this address, you’ll only get one ticket.

Moreover, your transaction must have a single operation. If you send multiple operations inside a transaction, your funds will be lost and you won’t get a ticket.

Note: We use Horizon for our auction client, which has a request limit of 3600 requests per hour for each IP. If you want to buy a substantial number of tickets, we recommend buying 1000 tickets per hour at most to prevent IP blockage by Horizon.

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 character. 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.

Thank you for reading this article.

--

--