Decred Staking – Everything You Need to Know
Decred staking is an innovative solution, as is the coin itself. Rather than being a simple collecting of currency and holding it, DCR’s network operates based on a hybrid Proof of Work and Proof of Stake solution. The gist of it is that you either mine or buy Decred coins and use those to purchase tickets. In essence, you buy into increasing your chances to win the “lottery” and be chosen to validate a block.
Furthermore, during the stage of staking, validators control and prohibit unwanted behavior in the network, even if it conforms to the mining consensus, for example – mining empty blocks. Stakeholders also receive the ability to vote on proposed changes on the network.
Locking your funds into DCR will also allow you to benefit from a developed network that supports Smart Contracts and Atomic Swap.
In this article you’ll learn all there is to know about staking Decred (DCR), how to do it most efficiently and configuring your wallet.
Pros & Cons
- The only project with on-chain governance that works as it should. Decred is also the place where the first user-initiated on-chain hard fork was completed
- Unique hybrid PoW/PoS system that offers exceptional security and attack resilience
- Active community with an extensive and experienced development team
- Community governance allows for voting out wrongdoers and consensual hard-forking in the event of a malicious attack
- Considered the fairest initial launch of any cryptocurrency – only 4% of coins distributed at the start and PoS percentage of coins is low as to keep stakers’ influence lower and fairer towards newcomers in the network
- A drawback that plagues Decred as well as almost every other crypto project – the lack of adoption. User count is still low
- Governance model flaw – the more coins you own, the more your decision matters, thus the network could slowly evolve into an oligarchy
- Fast development with many new features – not guaranteed to be accepted well and widely implemented
- Funding for the community is managed via treasury, however, moving to full DAO model could prove tricky – there’s no way to roll back a hack for example
How to Stake Decred
What makes Decred an interesting prospect for staking, is the fact that stakeholders also secure the network with their actions. Having the PoS element embedded alongside PoW pretty much makes a 51% attack extremely unlikely and difficult to achieve. Even if miners somehow collude or centralize mining power, they cannot change the consensus rules on their own. Even so, if a hard-fork does occur, the old chain is abandoned really quickly, as there won’t be any stakers to validate transactions.
To get started with staking Decred, I’ve prepared a step-by-step guide for your convenience. Before we get to that, what we should do, is cover the minimum hardware requirements for the job. Afterwards, I’ll shortly go over ways to buy your DCR tickets and/or get some Decred coins and installing the needed wallet.
Minimum Requirements
- Compatible systems include Windows, MacOS X, and Linux
- Install the Decrediton Wallet
- 5GB of free HDD space
- 1GB of RAM
- Reliable, 24/7 internet connection for your wallet
- At least 100 DCR coins to buy a ticket for staking, based on current prices
Initially obtaining DCR for staking can happen three ways – either by mining it, straight up buying from an exchange, or swapping some other crypto you already own for Decred. To ease the process, you have two alternatives for buying DCR – Bittrex and Okex. Both work with fiat money.
Once you’ve decided where you’d buy your coins from, you will need a wallet to hold them. As previously mentioned, I’d recommend choosing the official one, Decrediton. In the upcoming section, I’ll go over the details of to set it all up, perform backups and unlocking your wallet for staking.
You are presented with two options in general – using a wallet with a GUI (Graphical User Interface) or a Command Line variant. The former is best for people who are just getting started in the world of crypto, while the command line interface is for advanced users.
Decrediton Wallet Setup (GUI)
Step 1: Download & Install the official Wallet
Before we begin, you first need to download the wallet from the link provided and simply run the installer. Before we begin, you first need to download the wallet from the link provided and simply run the installer.
For Windows
Download the latest Windows Installer. Double click the exe file and follow the instructions. After it’s done, Decredition will automatically start up and begin downloading Decred’s blockchain. You’ll be presented with the configuration options too. You will also have an icon added to your desktop to launch Decredition next time you use it.
For macOS
Download the .dmg installer. Double click to mount the image once it’s downloaded. Next, drag the decrediton.app into the link to your Applications folder within the disk image
For Linux
Provided you’re running Ubuntu, download the .tar.gz file. Navigate to the download location and extract the file.
Using the Ubuntu file browser – simply right click the file and select “Extract here”.
Terminal: use the tar -xvzf filename.tar.gz command
Both of these should extract the tar.gz into a folder that shares the same name. (e.g. tar -xvzf decrediton-v1.2.1.tar.gz should extract to decrediton-v1.2.1). If successful, this new folder should include a Decrediton executable.
Launch the program, select the desired language and continue. Read through the upcoming steps carefully as they explain the Decred blockchain, wallet, keys, staking/governance and also provide safety tips.
At the next stage, the wallet will start downloading the entire Decred blockchain. You can continue with the setup process while this continues in the background. If you decide to stop the download at some point, it will remember the state and resume from there the next time you run Decredition.
You can manage multiple wallets by creating different names for each. As such, you’ll need to provide one, so you can easily identify them.
Click “Create a New Wallet” if you’re a first-time user or on “Restore Existing Wallet” if you already have a wallet seed.
The upcoming part is critical to your security and safety of your funds. While you’re in the process of creating your wallet, you’ll receive a 33 words sequence known as a SEED phrase. It serves as the private key for your wallet and allows you to restore access, should the need arise.
To secure access to your account and make sure, that you’re able to recover your funds, you need to store the SEED securely, in an encrypted document or flash drive. I cannot stress enough how important this is.
Once you’ve saved your SEED, continue with the next step. You’ll be asked to enter the missing words from your SEED, to confirm you’ve stored it correctly.
Afterward, you can create a private passphrase which will unlock access to your wallet, when you operate with it.
When you’ve entered the necessary information, press “Create Wallet” and you’ll be done. The program will return you back to the blockchain download progress bar. When it’s completed, it will open the Overview page for your new wallet and you’ll be good to go!
Step 2: Back Up the Wallet
Pay special attention to the SEED phrase section of your setup process. Once you have it, I suggest you back it up in multiple locations, as it will ensure that you can restore access to your wallet, in the case of a software or hardware failure.
Step 3: Transfer coins to the wallet
Once you’re done with the setup process, you’ll need to supply your wallet with coins. As I mentioned previously, you can do that using a variety of methods, but in any case, you’ll need to use your wallet’s address to receive any coins. Do keep in mind, that for your funds to show up, you’ll need to be synced up to the latest block in the network.
Step 4: Unlock the Decrediton Wallet
Provided you’re funded, it’s time to buy some tickets for staking. To do so, you’ll need to take part in a Decred Stakepool. A list of available options can be found on the official website and you’ll need to copy/paste the API key of the pool you chose.
By joining a staking pool, you’re able to delegate your voting rights to the pool, without ever giving anyone access to your funds or tickets. This way, even if you’re offline, you’ll be able to receive a reward if your ticket gets called for validation, at the price of a certain fee to the pool.
Once you have done this, the “Purchase Tickets” and “Voting Settings” pages will become active. All tickets you currently own will be displayed at the top of the window. There are three different types:
- Mempool Tickets – Tickets waiting to be mined by PoW miners (only 20 new tickets are mined into each block)
- Immature Tickets – Mined tickets which cannot vote until a 256-block maturing period has passed (around 20 hours)
- Live Tickets – Mature tickets eligible to be called to vote
The purchase tickets panel enables you to buy more tickets. Most settings are already entered, you just have to select which account to purchase tickets from and how many tickets you want to buy.
The automatic purchase panel allows you to continually buy tickets based on certain criteria, as long as you keep it running. You can configure it using the advanced options:
- Balance to maintain – If your balance is lower than this number, you will not buy tickets. The default of 0 will use all the funds in your account to buy tickets
- Max Price Absolute – If the ticket price is above this value, you will not buy more tickets. The default of 0 turns this off
- Max Per Block – Do not buy more than this number of tickets per block. A negative number means buy one ticket every “n” amount of blocks. e.g. -2 would mean buy a ticket every second block
- Max Fee – Tickets are entered into the mempool in order of their fee per kilobyte. This sets the maximum fee you are willing to pay
- Max Price Relative – If the current window price is significantly higher than the last few windows, do not buy any tickets. E.g. With the default value of 1.25, if the average price of the last few windows is 50DCR, you won’t buy any tickets if the current window is over 62.5DCR
Congratulations, you’ve reached the end of the GUI setup! Having gone through all the steps, you’re ready to stake and earn some rewards. If you don’t plan on running a CLI wallet, you can skip the next section and jump straight to the details of Decred staking rewards and how to maximize your profits.
Staking with the Command Line Wallet (CLI)
If you’re planning to run a staking wallet on a barebones machine, something like a raspberry pi or you’re simply into typing your own commands, then the CLI wallet is the choice for you. To get started, we’ll need to first download the appropriate executable.
Step 1: Download & Installing
First, I’ll cover the download and installation process on the different operating systems, after which I’ll go over how to set up your wallet.
Windows
Download the correct file:
For 32-bit computers, download the dcrinstall-windows-386-v1.1.2.exe file.
For 64-bit computers, download the dcrinstall-windows-amd64-v1.1.2.exe file.
Run the dcrinstall executable file.
You can either double click it or run it from the Command Prompt.
The binaries for dcrd, dcrwallet, and dcrctl can now be found in the %HOMEPATH%\decred\directory (usually %HOMEPATH% is C:\Users\
macOS
Download the correct file:
For 32-bit computers, download the dcrinstall-darwin-386-v1.1.2 file.
For 64-bit computers, download the dcrinstall-darwin-amd64-v1.1.2 file.
Make dcrinstall-darwin-xxxx-vx.x.x an executable within your terminal, and run it:
Navigate to the directory where the dcrinstall file was downloaded using the cd command, run chmod with u+x mode on the dcrinstall file, and run the executable that is created. Below is an example of the commands (change directories or filename as needed):
chmod u+x dcrinstall-darwin-amd64-v1.1.2
./dcrinstall-darwin-amd64-v1.1.2
The executable binaries for dcrd, dcrwallet, and dcrctl can now be found in the ~/decred/directory. Before the dcrinstall process completes, you will be taken to the wallet creation prompt.
Linux
Download the needed file:
For 32-bit computers, download the dcrinstall-linux-386-v1.1.2 file.
For 64-bit computers, download the dcrinstall-linux-amd64-v1.1.2 file.
For 32-bit ARM computers, download the dcrinstall-linux-arm-v1.1.2 file.
For 64-bit ARM computers, download the dcrinstall-linux-arm64-v1.1.2 file.
Make dcrinstall-linux-xxxx-vx.x.x an executable within your terminal, and run it.
Navigate to the directory where the dcrinstall file was downloaded using the cd command, run chmod with u+x mode on the dcrinstall file, and run the executable that is created. Below is an example of the commands (change directories or filename as needed):
chmod u+x dcrinstall-linux-amd64-v1.1.2
./dcrinstall-linux-amd64-v1.1.2
The binaries for dcrd, dcrwallet, and dcrctl can now be found in the ~/decred/ directory. Before the dcrinstall process completes, you will be taken to the wallet creation prompt.
Creating your wallet
Type in the following command:
If it’s successfully executed, you should be greeted by the following text:
This is your private passphrase, which you’ll use to unlock your wallet when creating transactions or voting with Proof-of-Stake. Use a unique and secure password. This password will also protect the private keys within your wallet file, keeping them away from the wrong hands.
After you’ve verified your private passphrase, you should see the following prompt:
The public passphrase is optional. It is used to encrypt all of the public data (transactions and addresses) within your wallet file so if it is stolen, an adversary can’t link you to your transactions.
Next, you will see the following line pop up:
For the purposes of this guide, I’ll assume that the answer is “No” which is the default option, that will be selected once you hit “Enter”. Afterward, your SEED phrase and its hex will be displayed, following by a section of instructions, which you should read through carefully.
I cannot stress enough how important it is to backup your SEED and its hex. Once you’ve written it all down, type “OK” and press “Enter”. If you didn’t record the information, start the process again by deleting your “wallet.dat” file.
When you’re done, after you’ve already pressed “Enter” you’ll see the following message:
The wallet has been created successfully.
Depending on your PC, it might take a few minutes before the procedure is complete.
To launch your wallet, you need to have first created it and connected to the Decred network. I’ll assume you’ve followed the guide up to now and installed via the “dcrinstall” method I’ve covered. Having that in mind, you already have everything set up, so we can open up a shell window and while inside the directory path type “dcrd” to launch the wallet. Wait for it to sync up to the latest block in the blockchain. You can compare the timestamp and block height using the official block explorer.
Staking Decred requires you to keep the “dcrd” and “dcrwallet” executables running in the background at all times.
Step 2: Backup the CLI Wallet
As mentioned in the previous section, to the essential step of backing up your CLI wallet is to record your SEED, its hex and your passphrase for accessing your wallet. Make sure you have multiple backups and store them in different locations.
Step 3: Unlock the CLI wallet
Let us continue with the staking process. I’ll assume you’ve already supplied your wallet with funds. The next thing would be to buy tickets. Whether you’ll do so using the manual or automatic function, you first have to unlock your wallet using the following command:
dcrctl –wallet walletpassphrase <private passphrase> <time limit>
If you’ve set the time limit to 0, that means that your wallet will constantly be unlocked.
Buying Tickets
The next thing to do is obtaining tickets. That’s done using the command below:
The arguments for the command are listed below:
- fromaccount = Required String: The account from which to purchase tickets (e.g. “default”).
- spendlimit = Required Number: Limit on the amount to spend on the ticket (e.g. 50).
- minconf = Optional Number: Minimum number of block confirmations required (e.g. 1).
- ticketaddress = Optional String: The ticket address to which voting rights are given
- numtickets = Optional Number: The number of tickets to purchase at once (e.g. 1)
- pooladdress = Optional String: The address to pay stake pool fees to
- poolfees = Optional Number: The percentage of fees to pay to the stake pool (e.g. 5)
- expiry = Optional Number: The block height where unmined tickets will expire from the mempool, returning the original DCR to your “fromaccount”. If left blank, tickets will only expire in the mempool when the ticket price changes.
- comment = Optional String: This argument is unused and has no significance.
Ticket Fees
Another aspect of staking is the ticket fee. It depends on the DCR/kb rate, which you’ll need to pay to get your ticket mined into a block. The previously provided command doesn’t include an argument for setting these conditions. It can be done in the following two ways:
- During startup by adding ticketfee=<fee rate> to the [Application Options] of your dcrwallet.conf.
- While your wallet is running, using the dcrctl –wallet setticketfee <fee rate> command. This is not a permanent setting and will default to 0.001 every time your wallet is restarted unless a ticketfee is specified in dcrwallet.conf.
The default fee is set at 0.001 DCR and is enough to get your ticket mined, except for extremely rare cases where supply is lower than the demand. There is a maximum of 2880 tickets per set price intervals. After the new ticket price algorithm was introduced back in July 2017, cases where stakeholders pumped fees to get their tickets mined before others, have been eliminated.
Ticket Price
Checking the current ticket price can be done using the “dcrctl –wallet getstakeinfo” command and looking for the “difficulty” value. This is the price of each ticket at the current price interval. You’ll want to adjust your “spendlimit” argument in the “purchaseticket” command to be greater than that value when purchasing manually.
Manual Ticket Purchase
To obtain solo-staking tickets, you’ll only need the fromaccount and spendlimit arguments when using the purchaseticket command. For example dcrctl –wallet purchaseticket “default” 50 would use DCR from your default account to purchase a ticket if the current ticket price was a max of 50 DCR.
If you wish to specify the numtickets or expiry arguments, you would specify a minconf of 1, an empty ticketaddress (“”), an empty pooladdress (“”), and an empty poolfees (0). See the examples below:
- dcrctl –wallet purchaseticket “default” 50 1 “” 5 would purchase 5 tickets, as the 5th argument (numtickets) is set to 5.
- dcrctl –wallet purchaseticket “default” 50 1 “” 5 “” 0 100000 would purchase 5 tickets that would expire from the mempool if not mined by block 100,000, as the 8th argument (expiry) is set to 100000.
Tickets with delegated voting rights to a stakepool can also be purchased, however, we’ll need to use the full “purchaseticket” command.
- Your ticketaddress is the P2SH Address found at the top of the “Tickets” page of your stakepool under the “Ticket Information” section
- Your pooladdress is the address for your stakepool’s fees. This can be found in the “Ticket Instructions” section of your stakepool’s “Tickets” page
- Your poolfees is the percentage of the stake reward that will go to the pooladdress when a ticket vote. It is important to match your pool’s advertised fee
Let’s take the following command as an example: dcrctl –wallet purchaseticket “default” 23 1 DcExampleAddr1For2Demo3PurposesOnly 7.5
dcrctl –wallet purchaseticket “default” 23 1 would use funds from your default account to purchase 1 ticket if the current price is at max 23 DCR.
DcExampleAddr1For2Demo3PurposesOnly 7.5 is the P2SH address received from the stake pool and their fee address as well, there they’ll collect a 7.5% fee. As no expiry was defined, your ticket will remain in the mempool until prices change.
Automated ticket buying
Something that would probably interest advanced users is the prospect of setting up automated buying of tickets. You can do so using various parameters. As the process of configuring is on the complex side, I’ve provided you with a link to the official source for detailed explanations.
Congratulations, you’re done with the setup process! Now, let us move on to what you can expect to earn.
Decred Staking Reward
I previously mentioned that to be eligible for staking, you need to wait for 256 blocks to be found after you’ve funded your wallet. Once that period has passed, you have a chance to be chosen as a validator.
On average, you are presented with this opportunity once every 28 days but it can take up to 142 days or 40960 blocks. Once that moment in time is passed and you’re not chosen, you’ll lose the fee that you paid to receive the ticket, but its initial asking price will be refunded to your account. The chances of this happening, however, are less than 0.5%.
Stakers as a whole, receive 30% of the current block reward. In each block, you have 20 tickets included which depending on your investment, could mean that you’re participating with 1 or more tickets. Either way, you’ll receive a proportionate amount.
The return on investment or ROI is roughly 0.6% per ticket but varies in accordance to the ticket price and the PoS reward. Yearly, you can expect around 7.2%.
How to Maximize Rewards
The way Decred staking works is by exchanging your coins for tickets, which serve as “chances” to win the staking lottery and earn a reward. Expanding on that concept, tickets are not divisible units and as such, there’s no way to optimize your earnings. Aside from buying more tickets and trying your luck, you’re left without other options. However, this fact can be viewed as beneficial – there’s no fiddling with wallet settings and transaction optimizations. Decide on an amount you’re willing to invest and simply reap the benefits.
Figure out Your Profit with the Decred Staking Calculator
To get a rough estimate on your investment in Decred consider the fact that there will be 10 tickets in the block so from the total amount, you’ll receive 0.6 DCR with 1 ticket or 0.6% per month – remember, the average time for your ticket to be chosen is 1 month. Yearly, you’ll get roughly 7.2% as ROI. Having in mind those figures, you’ll need to deduct your electricity costs as well for the hardware you’re running, to get a net profit value. To reduce your spending on power bills, you could opt for staking using a raspberry pi. To do so, you would need to use the CLI wallet, and you will use a lot less electricity to maintain it.
FAQ
Mining Decred is one of the possibilities of earning DCR. If you’d like to learn in detail, how to do so, there’s a detailed guide on https://howtomine.com/decred/.
Yes, you can stake Decred using a raspberry pi and it’s actually a pretty good alternative, as it cheap to maintain and run. You would, however, need to use the Command Line Interface Wallet for highest efficiency and have at least a 16GB microSD card plugged in to store data.
Once you have funded your wallet with coins, the maturity period before you can use them for staking is 256 blocks found. If your ticket is chosen, then the maturity period is reset, and you’ll have to wait again.
Depends on your expectations for a return on investment. In any case, you can always opt out of staking and sell/exchange your coins.
Max coin supply for Decred is the same as for Bitcoin – 21 million.
Once you become a stakeholder in Decred, you’ll be further securing the network and in return, receiving a percentage as a reward for your services.
Considering it is lottery based, it might just not be your time to win. In any case, make sure you’ve properly configured your wallet.
About Decred
Decred (DCR) was initially launched on the 8th of February 2016 by the developers of the alternative Bitcoin full-node solution – BTC Suite. It served as a base for further improvements and launching of projects such as Ethereum, Lightning Network, BitGo, OpenBazaar, and others.
Unique Selling Points
The most notable features of the DCR network is their decentralized governance, where any stakeholder can be part of the voting for the future of the currency, and their hybrid consensus protocol. This means that both miners and stakers are necessary to operate on the network to confirm and create new blocks.
Team
The team behind this endeavor consists of Jake Yocom-Piatt as the creator of the project and Dave Collins as lead developer. Using a progressive contractor model has allowed for proven contributors to be remunerated for their good work. Decred’s approach to communication with the community has helped forge a strong global team of developers, designers, and strategists.
Network
The network works based on a hybrid system between Proof of Work and Proof of Stake. Miners generate new coins and mine blocks, while stakers are used to validate those blocks. Users can also benefit from Smart Contracts capabilities and cross-chain atomic swaps between different currencies. The main improvement of Decred over any other crypto is the way it handles governance in the network, as that is the basis for all further development.
Privacy
In regard to privacy, at this stage, any transaction made in Decred is traceable as is the case with Bitcoin. The team has announced plans for introducing measures to improve this aspect of the network, yet nothing particular has been shared. The idea is that they’ll deliver a ready to use product instead of simply speculating what they plan to do.
Future
Based on the official roadmap, we currently have many new features in the works. Aside from improving privacy, we can expect to see an official Android wallet and SPV wallet support for 3rd parties. Furthermore, easing adoption for integrating Decred as a payment system is also underway. We can also look forward to the enabling of multipeer syncing which will reduce the load on masternodes and optimize blockchain download speeds.
Useful Weblinks
- Website: https://www.decred.org
- Announcement Page: https://bitcointalk.org/index.php?topic=1290358.0
- GitHub: https://github.com/decred
- Block Explorer: https://mainnet.decred.org
- Whitepaper: https://decred.org/research/buterin2014.pdf
- Socials:
- Twitter Discord Telegram Reddit/Subreddit