Algorithm

Algorithm for determining the winners

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.

Brief Likbez

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.

Winner determination algorithm

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

Example:

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.

Tickets
To participate in the game, you must purchase at least one ticket to any of the rooms. The cost of a ticket for each room is the same.
0.011 ETH ≊ 39.65 EUR
What's this?
Rooms
The games are played in 4 rooms. The rooms vary in the number of tickets that users need to buy before the game can be played and, accordingly, the amount of prize.
Rules of the Game
Participants
A participant in the game is any user who has purchased at least one ticket. A participant can purchase an unlimited number of tickets and participate in all rooms concurrently.
History of all games
Winners
Once the last ticket in a round is purchased from any of the rooms, the winner will be determined automatically. The winner will receive their prize instantly.
Algorithm
Any more questions?
We will be happy to answer any questions you might have as soon as possible!
ETH≊ EUR
€3,604.12
-1.68%
ETH Gas
Fast (<1m): 150 Gwei
+18.11%
Fast (<1m): 138 Gwei
+8.66%
Standard (<2m): 113 Gwei
+0.89%
Safe low (<13m): 102 Gwei
-8.93%
BTC≊ EUR
€47,909
-1.66%
XRP≊ EUR
€0.81
-4.11%
ETH≊ EUR
€3,604.12
-1.68%
ETH Gas
Fast (<1m): 150 Gwei
+18.11%
Fast (<1m): 138 Gwei
+8.66%
Standard (<2m): 113 Gwei
+0.89%
Safe low (<13m): 102 Gwei
-8.93%
BTC≊ EUR
€47,909
-1.66%
XRP≊ EUR
€0.81
-4.11%