Price update mechanism
The Rogue Index price opens on mainnet in October 2024 with a starting price of 50,000.
The Rogue Trader platform sends a request to random.org for a Rogue Index price update that is 500 points above or below the current price of 50,000.
Random.org replies with a random number and a sequential serial number that verifies the authenticity of the result.
The Rogue Trader platform calls the updatePrice function of the Rogue Index smart contract, passing the new price and serial number as arguments in the transaction.
The Rogue Index smart contract updates the price and serial number of the Rogue Index with the new arguments and then triggers bet settlement of all unsettled bets due to expire at this new serial number.
Winning bets are settled by the Rogue Index smart contract sending a transaction to the ROGUE bankroll telling it to send the stake and the winnings to the winning player's wallet. The ROGUE bankroll keeps the stake of losing bets. When a bet expires at exactly the same price as the entry price the ROGUE bankroll returns the stake to the player's wallet.
The Rogue Trader platform receives confirmation that the Rogue Index price and serial number have been updated in the smart contract and the game UI is updated accordingly. The platform also receives details of all the bets that were settled and the Active Bets and Settled Bets tabs are updated accordingly.
The above steps complete the lifecycle of a Rogue Index price update and the process starts again. The Rogue Trader platform sends a request to random.org for a new price update that is 500 points above or below the new current price and the above sequence carries on ad infinitum.
If the Rogue Index price goes to zero then all unsettled bets in the Rogue Index smart contract are settled at zero and then the index starts up again at an opening price of 50,000.
Last updated
Was this helpful?