Qtum Staking Guide: When Block Reward?
By: Jackson Belove
Tags: Blockchain, Proof Of Stake, Qtum, Probability, Blockchain 101

A common question from people staking on Qtum is: “when do I get my block reward?” and “why is it taking so long?” This blog answers these questions with a gentle introduction to probability, studying actual blockchain results, and running some simulations.

TL;DR: Since Qtum block rewards are given in a random process, we used several approaches to answer the question “when block reward?” The wallet’s “Expected Time” is a probability term for the long-term average of a random process. Over many block rewards, 63% of the time a wallet will receive a block reward before the Expected Time, but the random process means that block rewards could come much sooner than the Expected Time, or much later.

The random spacing between block rewards will average out in the long run, but individual block rewards can have significant variation, and for longer spacings, this can be frustrating. On the long spacing side, users have reported spacings of 6 to 10 times the Expected Time, with one Reddit user reporting 13 times. Of course, no one complains when their block rewards come much sooner than the Expected Time, and this variation is all part of the random lottery process for block rewards.

To confirm your wallet is set up properly for staking, check these things:

Wallet updated to the latest version

Syncing to the latest block

Unlocked for staking only

Computer clock set correctly [Reference 1]

There is some math coming up below, but you can skip the math and just look at the charts and tables, which give the answers.

Probability 101

a fair die, roll with me

You intuitively know how probability works for dice. Probability lets us make calculations about random events like rolling dice (or Qtum block rewards). We will start considering a die (a single dice) and define success as rolling a “1”. You expect to get a “1” every 6 rolls (“Expected Time” = 6), but also know you are not guaranteed to get a “1” every 6 rolls because this is a random process.

The probability of an event occurring is given on a scale of 0 (will never happen) to 1.0 (definitely going to happen). The probability of getting a “1” in a single roll of the die is 1/6 or 0.167.

We can use this same approach to calculate the probability of winning a Qtum block reward for the next block. To make the math easier, let’s consider a wallet with 20,000 QTUM, and a Network Weight of 20,000,000. The wallet software makes the probability of winning a block reward 20,000 / 20,000,000 = 0.001. What does this mean, compared to the die?

Probability 101 | Die | Qtum

-------------------------|------------|-----------------

Probability of success | 0.167 | 0.001

-------------------------|------------|-----------------

Expected Time | 6 rolls | 1,000 blocks

Here we see the probability of success for a single trial, getting a “1” in a single roll of the die, or a block reward on the next block, and the Expected Time to the successful result.

This “Expected Time” is the same answer given by the Qtum wallet for a given wallet weight and network weight, which the wallet calculates based on the difficulty of minting a new block. For our example, the expected time is 1,000 blocks or about 40 hours.

Reference 2 shows a calculation for the probability of getting a “1” within 6 rolls of the die (33.5%) and for getting a block reward by the Expected Time (63.2%).

Blockchain Results

To test our understanding of block reward probability let’s look at some actual results on the Qtum blockchain (data sources and methodology given in Reference 3). We can compare the theoretical (calculated) probability with the experimental (observed) probability. An ideal candidate for this experiment would be a wallet that began staking soon after the launch of Mainnet and has had no additions or withdrawals. We won’t adjust for changes in network weight over time or the increase in wallet size due to block rewards and will assume the wallet stayed online the whole time. Also note the experimental wallet received fewer block rewards early on because they didn’t split their UTXOs into small amounts, like this.

To get enough block rewards to analyze we can look for a big wallet and find one that started with about 19,000 QTUM in mid-October 2017, and with block rewards have grown to the 20,500 range (in the mid-300’s on the rich list). To get a sense of how smaller or larger wallets would work, simply scale the results below up or down linearly. For example, a wallet staking 500 QTUM would see block reward spacings 40 times larger than our experimental wallet.

In 580+ days of staking this wallet won hundreds of block rewards. To see the variability in block reward spacing, here is a chart of 100 spacings of sequential block rewards for the wallet: