Understanding the basics of staking - how and why, and even when


#1

[*note - I wrote this for our adapools.io FAQ so it has some intrinsic references, but figured it would be helpful to post here as well. Feedback/corrections/questions are welcome!)

It seems many people are confused to some degree about what staking is, how it is done, and why do we do it for Cardano (Ada). This article will thus attempt to provide a fundamental understanding as to both how and why, and even when. Note that some details are still in flux, but the overall concepts will remain the same.

Cardano (Ada) Staking - how will it be done?

Once staking goes live (estimated April or May, 2018) the Daedalus wallet will let you create a ‘proxy signing key’ or PSK. (note this may be referred to as a ‘staking key’, but proxy signing key is the current official term.) As part of this key creation, you will specify how much of your Ada balance you want to stake, and for how long you want to stake it.

For example, assume you have 1,000 Ada.

You could then create a proxy key specifying it should lock 800 Ada to it.

Once created, you would have 800 Ada with it’s signing rights tied to the proxy signing key, and 200 Ada free balance to use for spending.

Proxy signing key (PSK) balance = 800 Ada (locked for staking)

Freely spendable balance = 200 Ada

Total Ada remains the same = 1,000 Ada

When your Ada is staked, it is locked and cannot be spent. Thus, you still own 1,000 Ada, but only 200 would be spendable vs 800 would be eligible to stake and earn more Ada as block signing rewards (kind of like earning interest on a deposit). To spend the 800 staked Ada, you would have to undo/revoke the proxy key which would allow your Ada to be freely spendable again.

To actually stake, you can then assign (delegate) this proxy key to a pool (like our pool, https://AdaPools.io :), or you can simply run a full node on your own computer as well. In either case, you will have to specify a time period for which you want the Ada listed in the key to remain locked for staking.

By assigning the proxy key to the pool, the pool then represents your staked Ada during the actual block signing. Blocks in the Cardano blockchain are signed every 20 seconds, and a random coin is chosen from all the staked coins, to do the signing.

The pool monitors 24/7/365 to see if a coin from your stake is selected as a slot leader, and if so, then the pool’s server handles the block signing by showing the proxy key that holds the selected coin, and your proxy key delegation portion thus proves that the pool represents your stake in the signing.

Thus, your stake now participates with all the staked Ada in the pool, and proportionately shares in the Ada rewards earned by the pool from all the block signing the pool does on behalf of all it’s members.

It is important to note that you assign your proxy key and not your actual Ada. Only the proxy key is assigned to the pool, your staked Ada can remain stored wherever you choose - even offline. The only difference is you can’t spend the Ada that is staked until you undo the proxy key or it auto-expires. But you can see, your actual Ada never leaves your control…only the proxy key is assigned to the pool.

Staking - why do we do it? And what about mining…?

All blockchains must protect the security of their data stored in the blocks from being manipulated or tampered with. If someone could ‘change the records’, they could of course change financial transactions recorded in their favor. It would be similar to hacking into a bank records and magically increasing your balance, removing those pesky bill payments that lowered your balance, or similar.

To ensure the data cannot be changed, each block is signed with a digital hash (number) that is created by running the records in the block through a hash function. A hash function is like a number filter that takes a large number and divides it down to a number in a certain smaller size range.

Example - assume you have an email and you want to secure it. You could go through and for every letter contained in it, have it represented by a number. i.e. A = 1, B = 2, C = 3. If you did that for every letter in the email, you would end up with a number that represents the sum of all the letters in that email. Now if someone changes even a single letter in the email, when you run your summary of the letters, the final output number would not match the original and you would know the email had been tampered with.

This is a simple representation of what happens when a block is signed. All the transactions are turned into a final number that ‘represents’ the data in the block, and that number (hash) is then stored in the block so you have data + security check all contained together.

Of course, even if the block itself is secure, we have a risk known as the 51% attack that could put the total block chain at risk. Namely, if one party able to sign 51%, and thus the majority, of all new blocks, they would have the chance to insert fraudulent blocks (with data in their favor). This could be done b/c they would effectively have majority, or central, control of the blockchain. The blockchain’s security is due to it’s very decentralization and thus 51% control wrecks that fundamental security foundation.

To avoid this, we have to ensure a competitive or random process to ensure that block signing is dispersed amongst the block chain participants. Most coins do this by having a contest to sign each block - whoever solves a puzzle first, gets to sign the block. Thus, you have competition via computing power to solve a random puzzle and this competition and puzzle solving is the well known ‘Proof of Work’ concept that Bitcoin, Ethereum, LiteCoin, etc. all use to prevent any single party from being able to sign 51% of the new blocks.

The puzzle solving is known as ‘mining’ because if you solve the puzzle first, you are rewarded with coins (much like mining for gold, where you ultimately aim to get a financial reward). This is what motivates people to solve the puzzles, and thus provides the financial incentive to ensure people compete to solve the puzzles and thus via competition, prevent anyone from easily getting 51% control.

Now, the Ada blockchain has the same concern - how does it protect anyone from getting 51% control of all the signings to secure the blockchain, but it does not do it by having participants solve puzzles. The puzzle solving is really an energy wasteful process designed to ensure a form of randomization in the block signings.

Thus, Ada cuts out the middle man of puzzle solving and says - miners are spending money on faster puzzle solving equipment - so why not simply post the money in escrow to represent their commitment to signing, and then randomly select from those who have posted money to do each block signing.

Much like a miner investing in more and better mining equipment to get more block signing rewards, in Ada one can purchase more Ada to stake and get a % chance increase of signing more blocks and thus more rewards.

However, since you have to actually post Ada to do a block signing, it ensures they have a vested interest in keeping the blockchain honest…and their vested interest grows in direct proportion to the value at risk in order to procure 51% of all Ada available. Thus, the more they invest to try and get to that 51% control, the more they place their large and growing Ada value at risk because if they do in fact corrupt the blockchain, then the very value they have staked by default would decline massively due to the corruption they themselves created. Thus, by forcing everyone to have Ada tied up in order to stake, it ensures the risk/reward skews more and more negatively for anyone trying to change the data which would require the massive 51% ownership to do so.

Simply put, to take control of a blockchain would require a massive financial investment, to the point that any gains from cheating the system would result in greater loss of value to their stake than they would gain from manipulation b/c they would in effect be the party with the most at risk.

Note that by contrast, miners in proof of work coins, don’t necessarily have that vested interest - they could attempt to corrupt a given coin and simply reconfigure their equipment for another coin afterwards with little or no loss in value to themselves…so the proof of stake really has a ‘vested interest’ security aspect that most coin’s don’t have.In addition, there is randomness that helps ensure that even with 51% of stake, it would still take quite a long time to truly be able to corrupt it…thus both time and vested interest serve to allow the Ada blockchain to be secure without the overhead of wasteful mining computers burning up energy to solve puzzles.

Ada staking - when will it start?

Currently the actual staking will start in what is known as the ‘Shelley’ update to the Cardano blockchain. That is expected in Q2 of 2018, or effectively, March/April/May. Note that while not confirmed, some rumour has it that the staking rewards will be highest for the first two years, and then will be halved every two years after that. Thus, staking from the start is the optimal way to maximize your rewards. We’ll post updates as live staking gets closer to update everyone here!

(note here is the original link: https://adapools.io/ufaqs/understanding-the-basics-of-staking-how-and-why/

Source link for further info: https://cardanodocs.com/technical/delegation/


ADA POS question
What are the Pro's and Con's on running a Staking Pool?
How to staking?
#2

That’s a very good explanation of staking, thank you for that MegaWind. I have another
question for you.Can staking be done as an individual without being online 24/7?

Thank you for your response.


#3

No, it’s specifically stated that full nodes need to be available 24/7. Sorry I can’t remember where that’s said, but I very clearly remember seeing it somewhere, and I think it makes sense.


#4

Thanks … very helpful.


#5

Hi Ahmad,
Thanks for your feedback. To answer your question - yes, you can stake with your own computer (running a node).
The nodes do not have to be online all the time - however, you of course lower your chances of getting a staking reward by being offline.
For pools, which is what RobJF meant I believe, then yes those servers are very much expected to be online 24/7/365.

The main reason for the pools (per a Charles interview) is that by having ‘professional nodes’, it ensures higher throughput and quality for the blockchain.
Individual users can still stake, but as Charles noted, they can drop in, drop out and there is no expectation they will be online all the time.

The Ouroboros network will simply announce a slot leader and wait X seconds and if no reply, it moves to the next slot leader…so the network can run fine with a certain % of nodes not showing up for work, but ultimately the whole reason for the pool structure is to ensure a level of professional nodes that will form the core backbone of the protocol and maximize it’s speed/throughput.

Hope that helps!


#6

@MegaWind do we have any technical documentation to setup a stake?


#7

So , MegaWind do you have to be monitoring your system or have someone monitor it at all times.


#8

FWIW, I was actually confusing the two situations, though now you point it out, it obviously makes sense that it apply to pools but not individuals. Thanks for the correction, your contribution is spot-on as usual! :slight_smile:


#9

Look in the Developers section.


#10

Hi Asobuhado,
Nothing is official/finalized yet, but here are two links that can provide a lot of foundational info:


Hope that helps


#11

Hi Ahmad,
We have setup an AI monitoring system, and have a global time zone split so that someone is always available.
The AI monitors a bevy of stats on each node (i.e. CPU %, Memory %, Total load %, Disk drive capacity free,etc). as a way to constantly watch the health of each server.
It then also checks that the server as a whole is live and also directly monitors the actual Cardano SL node process itself.
Thus, we have both preventative (i.e. make sure plenty of free memory, disk space, etc) and active (literally watching the Cardano node itself) going on 24/7/365.

Hope that helps,
Less


#12

Thanks,that helps.
Maybe your pool will be a good one to join.
I hope you don’t mind me continuing to ask questions but here is another one. How will rewarded ADA be divided among stake pool members?

Thanks
please continue to help less


#13

Hi MegaWind,
Is there a separate apps need to run if I need to setup a nodes?
Or Daedalus wallet will do?
Thanks


#14

You will be able to stake as an individual using later versions of the wallet, but for the vast majority of holders it will make more sense to join a staking pool. To host a pool requires special software that will be online 24/7.


#15

Is there special software available for download?


#16

Yes but it’s still under development and runs only on Linux. This is IMO only for people with substantial related knowledge and experience, but if you want to know more there are various threads about staking pools in the Developers category.


#17

Hmmm… Maybe, it’s more like an application on top of OS, running like a service.
If there’s an instruction on how to do this, some users that has an old server can add that service. Should be doable. Thanks for your time @RobJF


#18

Still a good description, but IMO this part should be edited because the staked part is not locked for spending.
As far as we know today on begin of each epoch the user can sign <= his current spendable amount of ADA for staking. Durring the epch he can spend or move his values like he want. Only at the next epoch (every 5 days) the staked amounts are verified again, and capped at the max available value an account has.


#19

Can you share a link pls saying the same?


#20

The most detailed (public available) document seems to be https://github.com/input-output-hk/cardano-sl/blob/fe6653822a6bc0aa007d6255a8511a562aad222e/docs/delegation_design_spec.md

There is a way more readable summary on Lars Brünjes presentation at Summary: PoS Delegation & Incentives (Lars Brunjes)

and also a just this week published statement at Cardano Netherlands Meetup
It was this questions rised at Rotterdam who let me look up for past statements like this one here.


Shelley Testnet System Requirements