Many people like to try their luck by taking part in a lottery, competing with others, and getting a chance to multiply their money. However, people are deterred by the suspicion that the game is not fair - that prize is awarded to predetermined participants. Unfortunately, these suspicions are often justified. But now you don't have to worry about that, because there is Trianglerooms.io!

It's different in our project. The winner is determined by a transparent algorithm, which can be viewed by any user, and none of us can influence the result. Interested? Read below how the winners are determined.

Any ticket is purchased by the transaction at Ethereum.

This means that each ticket is linked to a specific transaction, to a specific transfer of funds.

At Ethereum ,transactions are grouped into blocks with sequential numbers.

This means that each ticket corresponds to the number of the block in which the transaction through which the ticket was purchased is stored. Each block has a number **NONCE**. This number is generated by the block closing miners.

Based on all the data in the block (the amount of the transfer, from whom, to whom, etc.) and the aforementioned NONCE number, a new number is created and it’s called HASH. This creation is done by the Ethereum blockchain itself. No one knows what the HASH number of the future block will be, and no one can predict it. However, it is known that this number is random and subject to the uniform distribution.

This means that by determining a winner based on a given number, all players will have an equal chance of winning.

The winner of the round is determined within one minute after the purchase of the last ticket in the round. The formation of the next, as yet non-existent block is expected within one minute. As soon as the block is available, the winner is determined by the following formula:.

** Future Block ** = Block number of the last purchased ticket in the round + 1.

** Winner ** = Remaining of ( ** HASH Future Block ÷ Number of tickets per round ** ÷ ** ) + 1 **

Round R*** bought ** 9 ** tickets from the ** 10 ** needed.

You transfer the amount of ETH needed to purchase your ticket to the corresponding wallet.

Tickets become **10/10**. The round is closed and the winner's number is calculated based on the HASH number of the future block.

Let's say the last ticket was purchased in a transaction 0x2d2e3a4c9c8afaeb9910ce6f3a0c15cda3a66fa586cb1780c1a940933946f37d.

By clicking the link, you can see that the block number of the transaction = ** 9383337**. According to the algorithm, we add ** 1 ** to the number ** 9383337**. We get ** 9383338**. See **HASH** by the block **9383338**.

To view **HASH**, click on "(Click to see more)". **HASH** will be displayed at the bottom.

This block has **HASH** number = **0xee7d5544c688601c9b765f21628f76d245d38c0acefcfc46eb59622413de45f3**. It's a normal number in hexadecimal format. Let's convert it to a more familiar decimal system by using any calculator or an online service like rapidtables.com. (Hexadecimal -> Decimal).

The result is the number: **107871902348538484389160768418450620132094221376595759871729010630818875196915**. We divide it by the number of tickets in the round (**10**). It turns out: **10787190234853848438916076841845062013209422137659575987172901063081887519691** and **5** is the remainder.

We're curious about the rest. Since we can only get a number from **0** to **9**, and we have ticket numbers from **1** to **10**, we need to make a correction by adding **1**.

**5 + 1 = 6**.

Which means the winner of this round is the number **6** ticket.

After getting acquainted with the algorithm, it becomes clear that its root is a randomly generated number that exists separately from our drawings, so it can not choose a predetermined winner, in any way. Furthermore, the result can not be influenced by anyone, even we, trianglerooms.io. The winner selection algorithm is transparent to everyone, and you can see for yourself by manually recalculating any round by formula.

**0.011 ETH ≊ 19.50 EUR**