Qtum Mainnet Results October 1–8

and unofficial staking FAQ

(this edited version was originally posted in the QtumNexus Slack on October 8, 2017)


To establish a baseline and watch Mainnet Ignition begin public deployment, I tracked a number of parameters to help understand the operation and performance of the Qtum blockchain. From the mainnet launch on September 8th the Foundation has operated some 3 dozen staking wallets, and these were joined by a few private wallets after the token swap on October 4th. By the end of today, there were some 109 additional wallets winning block rewards.

Note I am an independent observer, not affiliated with the Qtum team, but I would like to acknowledge and have great appreciation for their advice and help along the way. Newbies please see some definitions and FAQ at the end of this report.

I chose to report on mainnet actions starting October 1st, because this was the week that Qtum ERC20 tokens were swapped for mainnet QTUM coins, and there were some interesting observations as people started staking. Mainnet was launched earlier with genesis block #1 staked on September 8, 2017, at 5:42:21 UTC, and you can savor that transaction on the Qtum Explorer — search for block 1, and checkout that block reward! More on that below.

Data sources for this article come from the Qtum Explorer and custom real-time logging of the qtumd server application. In contrast to my previous paper using simulations and the test Skynet blockchain, this data is from live mainnet operations.

Mainnet has been quiet since launch (there were no genuine QTUM in circulation — just ERC20 tokens on the Ethereum blockchain), but starting on October 6th we started to see some more activity, and transactions started to rise, including some from a large wallet, maybe an exchange getting ready for the swap. In the Qtum Explorer, search for address QZDJya5Szfux2op7qhHUGKsBT4eGiyTPkH

Network Weight

Network weight is a calculation that estimates the sum of the individual wallet weights for all wallets staking on the network. Since the mainnet launch, the network weight has fluctuated between 3.5 and 4.0 million and this range continued in the first week of October. Network weight changes on a block-by-block basis, depending on an average of the individual weight of the wallets staking for their block rewards. For example, here is a snapshot of network weights starting at block 23,000:

The chart of end of day (UTC) network weight is given below. At the end of day (UTC) for October 8 the network weight was 4,906,688.

Annual Return

The expected return for staking QTUM has been a hot topic on the QtumNexus Slack, and previously I gave a bottoms-up formula and simulations to calculate the return for various scenarios.

Here is a top-down way to look at expected return. With 128 second blocks, the platform will pay out 985,500 QTUM per year in block rewards. Your average reward for winning some of those QTUM during the year is simply:

“your weight” is the total mature coins in your staking wallet. This formula does not include transaction fees, which would add a small additional return. For example, with a network weight of 20,000,000 and your weight of 1,000, you could expect to receive about 50 QTUM a year, a 5.0 % return, with a block reward of 4 QTUM on average every 29 days.

Being chosen to receive block rewards is based on random probability, so there will be considerable time variation between rewards. Continuing the above example, you could get rewards a few days apart, or a few months apart. With PoS, patience is a virtue.

The expected return is plotted below for various network weights.

Unique Reward Addresses

Since the mainnet launch, 3 dozen Foundation wallets have run the network and collected all the block rewards. The chart below shows the number of unique addresses winning block rewards on each day. The granddaddy Foundation wallet cashed in with 40 block rewards per day and has a weight of 184,000 QTUM. Another big guy cashed in with 26 block rewards a day, with a weight of 155,000. For these big wallets (whales pay attention) they are going to have many overlapping reward periods so it is important to keep the UTXOs small (as I harped on in my previous paper) and careful observers can use the Explorer to see they are using UTXOs in the low 100s.

On October 7th private wallets began to win stakes, with 50 unique addresses represented, including 13 that won a single block reward (probability calculates these wallets would have a weight of approximately 5,000 QTUM). By end of day (UTC) on October 8th, the unique addresses winning block rewards was 145.

Average Block Time

The target block spacing for Qtum is 128 seconds. The mainnet blockchain is running a little slower than this in practice, and was averaging about 145 seconds. This number is significant for the time it takes to mature coins for 500 blocks, which is about 20 hours at 145 seconds per block.

Transactions Per Day

From the mainnet launch, there was very light traffic with two transactions per block (for staking activity). The number of transactions jumped on October 7th as people began claiming their swapped coins from the exchanges.

Block Timing Variation

Due to the wonderful random nature of Proof of Stake (PoS), there is some variation in the timing between blocks. For October 1st, the block timing distribution is shown below, based on times reported by the Explorer. Explorer shows the timing in multiples of 16 seconds, but the superfast blocks come through as fast as 8 seconds apart (use qtum-cli getblockcount as fast as you can (in Python: block = int(subprocess.check_output(‘qtum-cli “getblockcount”’, shell = True)), record the timing for new blocks, and apologize to qtumd for the abuse later.)

For October 1st, there were 92 blocks spaced at 16 seconds, 57 spaced at 32 seconds, etc.

This chart only displays block timings out to 512 seconds, but there were a few longer timings. There were 19 blocks with timings over 9 minutes, and block 18813 clocked in at a very leisurely 38:40.

What does this timing variation mean for blockchain users? Sending QTUM can execute very quickly, even a second or two to see the QTUM reaching the receiving address. But the QTUM arriving at the receiving address will have a “pending” or “unconfirmed” status until the next block is published. Some exchanges will require many confirmations (additional blocks published) before they make QTUM available, and the qtum-qt wallet recommends 10 confirmations. Going back to that bad boy block 18813 on October 1st, if you sent your QTUM right after block 18812 was published, you could take a break for over half an hour before getting the first confirmation.

Will the block timing variation go down when more wallets are online? We will find out in the coming months, but the progenitor Blackcoin platform (deployed for several years and shares PoS 3.0 with Qtum) has a similar block timing variation. Could this block timing variation be an issue for a blockchain built for business? Maybe. If I could suggest a protocol tweak, my wallet would volunteer to stake any blocks that are delayed beyond 8 minutes. 😊

Fun with the Qtum Explorer

There is a lot of rich information available if you are inclined to examine the Qtum blockchain Explorer. The Explorer shows real time blockchain transactions, and you can use it to track and validate your transactions. I would recommend having the Explorer open to the address where you are sending a transaction, and you can actually hear the transaction arriving (in Morse Code, no less). You can also use the Explorer to win some crypto trivia bar bets, such as, did you know the first 5,000 blocks gave a block reward of 20,000 QTUM? That’s some good staking. This was the Foundation setting up the blockchain and creating the 100,000,000 QTUM (5,000 blocks x 20,000 QTUM). Interestingly Bitcoin did not take this approach. Some of these coins are in our wallets now.

Many thanks to the Qtum community discussions, I learned a lot from all, and special thanks to @setclock for editorial review of this article.

Good luck and happy staking,


Definitions and Resources

qtumd.exe — the “headless” server application for blockchain transactions. Interact with qtumd using the command line interface application qtum-cli.exe.

qtum-qt.exe — the Qtum GUI wallet, perfect for beginners. Only qtumd and qtum-qt enable staking, exchanges and other wallets are not running a full node and can’t participate in staking.

UTC — Coordinated Universal Time — the reference time zone for many cryptocurrencies. The Qtum Explorer and dates in this article are based on UTC time.

My previous paper on staking.

A really excellent paper on staking by @cryptominder.

Unofficial FAQ on Staking

A compendium of Q&A about staking, with questions from the Slack and answers based on my frequent mistakes trying to figure out how Skynet worked.

1. How many QTUM can I earn from staking?

It depends on the network weight. See the section “Annual Return” above.

2. How should I send transactions for staking into my wallet. I heard that smaller size transactions are better. Why is this?

When you win a block reward, some quantity of your coins are “staked” for 500 blocks, and that quantity is subtracted from your current “weight”, so your probability of winning and additional reward during that next 500 blocks goes down. You can absolutely win multiple (overlapping) block rewards. If your wallet is filled with small transactions (250–400 QTUM) then the stake will be smaller, and your probability of winning another reward during the 500-block staking period will be larger than if you have larger transactions in your wallet. This is more of a factor for larger QTUM holders (say > 3,000 QTUM) where my simulations show a measurable advantage for using the small transactions. My simulations showed double digit overlapping rewards for trials with 100,000 QTUM in the wallet. In actual experience, I don’t expect anyone would actually notice the difference, unless they were large QTUM holders looking over multi-month periods.

3. Is there a benefit for staking to use multiple computers?

There may be a benefit for redundancy (if a single computer crashes you lose all your capacity) but there would be no staking advantage. 2 computers/wallets with 1,000 QTUM each would give the same weight as one computer/wallet with 2,000 QTUM. Provided you load the single or multiple computers with small transactions as described in answer 2, the staking results should be the same.

4. What do I need to do to stake QTUM?

You should always use an encrypted wallet, with the wallet.dat file saved offline in multiple storage devices.

To enable an encrypted qtum-qt wallet for staking, go to Settings — Unlock Wallet

On the Unlock wallet screen note the checkbox set “For staking only”. Uncheck this box if you want to Send QTUM to another wallet, but leave the box checked to unlock for staking only. Enter your passphrase and click “OK.”

The little lock icon in the lower right-hand corner will show the lock slightly open, and a mouseover of the icon will show “Wallet is encrypted and currently unlocked for staking only.”

If you are using qtumd, you control this server app through the qtumd-cli command line interface application. To unlock qtumd for staking use qtum-cli and the command “walletpassphrase” like this:

The number “99999999” gives the decryption period timeout in seconds to unlock the wallet, and for staking means you want the wallet unlocked for a long time. To unlock a nonstaking wallet to send some coins out, you could put a reasonable number in here, like 300, for 5 minutes, after which the wallet will automatically lock up again.

4. Do I need to keep my computer turned on for the wallet to be staking?

Yes. If you are using a personal computer, RPi, etc., running qtumd or qtum-qt you have to keep the computer turned on with the wallet application running. “You must be present to win.” It is possible to run these applications on a virtual computer in a cloud hosting service, in which case that virtual computer needs to run 24/7.

5. What happens if I win a block reward, and then within the 500-block staking period, my computer goes offline, I lose the network connection, the dog eats my CPU, etc.?

The blockchain and other nodes take care of everything — that’s the benefit of the decentralized distributed ledger (the blockchain). Your stake continues to mature while your wallet is offline, the additional payments of 0.4 QTUM that make up the whole block reward (paid at blocks 502, 503, etc., see my previous paper for the gory details) will be sent to your wallet address on the blockchain, and that reward will be patiently waiting for your wallet when it comes back online.

6. What wallets can I use for staking? Can I stake from an exchange or the Ledger hardware wallet?

You can only stake from an application running a full node: qtumd or qtum-qt. These two applications sync the full Qtum blockchain into your computer, running them helps secure the network, hence you are eligible to win a block reward. A hardware wallet, such as the Ledger, holds the private keys and requires a manual button press on the device to send coins. The hardware wallet would never work with an online wallet application to win a block reward.

7. When will my wallet start staking, do I have to do anything?

Just send QTUM coins to your wallet and then wait for 500 blocks of confirmation (about 20 hours) for the coins to mature. When the coins mature, the wallet will begin staking automatically. You must set the wallet to decrypt for staking (see question #3 above). You can check that qtum-qt is staking with a mouseover of the little lightning bolt icon in the lower righthand corner. The lightning bolt should be solid black and the prompt will say “Staking Your weight is [some number] Network weight is [some big number] Expected time to earn reward is [some number] day(s).

To check if qtumd is enabled for staking, use the “getstakinginfo” command and look for “staking”: true:

8. When I send coins to the wallet or win a block reward, how can I tell when my coins mature? How can I see how many confirmations a transaction has?

For the qtum-qt wallet mouseover the icon just to the left of the transaction line, either on the Overview or Transactions page, and a popup will give the conformations.

9. What happens if my wallet goes offline during the 500-block maturity interval?

Nothing, except your wallet is not running. The QTUM coins are really stored on the blockchain, and the wallet gives a way to view your balance and manage the coins. If your wallet goes offline while your coins are maturing, the blockchain keeps track of everything, and when you launch the wallet again, it will show the current maturity based on any blocks published while your wallet was taking a break.

10. Once my coins are mature, what happens if my wallet goes offline?

Similar to the answer for question 6, if your wallet goes offline, the coins maintain their maturity (actually the get more mature with each passing block). Your coins do not lose their maturity if your wallet goes offline.

11. What happens if I am staking all my coins and then send some to another address?

If you send coins to another wallet that had been recently used for used for staking, the wallet will “stake” a UTXO for 500 blocks, effectively reducing your weight during this time period. After 500 blocks you get the staked amount back. There is a command for qtumd “reservebalance” that lets you set some amount of QTUM that will not be used for staking, and can be sent right away (but I haven’t tried this command).

12. If I have mature coins staking in my wallet and then send some new coins, do all the coins start over for 500 blocks?

No, each transaction sent to your wallet will have its own maturity, based on confirmations.

13. How can I see the network weight?

For qtum-qt, if you are staking, you can mouseover the black lightning bolt logo in the lower righthand corner to read the network weight (see answer 5 above). If you are not staking (no coins, or not decrypted for staking) you can use the Remote Procedure Call (RPC) commands in the console.

Go to Help — Debug window — Console and enter “getstakinginfo” into the command line at the bottom of the console window.

Divide “netstakeweight” by 100,000,000 to get the current network weight in millions, here 4.468 million.

With qtumd, enter the command “getstakinginfo” and take the netstakeweight value “443007773318295” and divide by 100,000,000 to get the network weight in millions, here 4.430 million.