The very first round of [Day] Rings starts when a player deposits his bet on the empty stack. The bet needs to be equal to or higher than 1 Finney (0.001 Ether).
From the moment his or her transaction - depositStack() call - is confirmed in a certain block X, the round goes on for 5748 additional blocks - stackWait=5748 -, during which any other player can take part in the bet and stack the exact same amount.
If a player tries to deposit a bet which is lower than the current value - stackValue -, said bet won’t be added to the stack and the value returned to the player.
If a player deposits a bet which is higher than the current stackValue a change will be returned to the player once the bet is added to the stack.
Once the (X+5749)th block has been mined, a winner can be declared, either calling closeBet() or starting a new round with depositStack(). The winner is the user whose address, concatenated with the blockhash of the first block after the last one for which it was possible to enter the bet and passed through the hash function keccak256 and converted to an unsigned value - uint - returns the lowest value, or in other code words:
uint ( keccak256 ( abi.encodePacked ( blockhash ( stackTime + stackWait + 1 ), playerAddress )))
rolling playerAddress among the addresses of all the players who entered the bet to find the minimum.
The winner takes 98% of the stack.
2% of the stack goes to the the house.