Summary: PoS Delegation & Incentives (Lars Brunjes)

summary

#1

Dr Lars Brünjes, Director of Education at IOHK, was recently in Hamburg at a Blockchain Mania meetup where he gave a technical talk on incentives of Cardano. You will find a summary of this talk below.

Though he is involved in IOHK’s education efforts such as Haskell courses and internal/external training. He is also leading the ‘incentives’ workstream in Cardano, working alongside Professor Kiayias, Professor Koutsoupias and Aikaterini. Details on IOHK’s team members can be found here.


What is the Point of Incentives?

In blockchain, the goal is to incentivize participants to “do the right thing”. With Cardano, that means achieving a certain distribution of stake. This distribution is to be achieved with stake pools, in which we want no too many and not too few. Most of stake is to be concentrated in stake pools and these stake pools are to be online and actively participate in the protocol.

Incentives are to be set up in such a way that if everyone follows their own rational financial interest, then the outcome should be a nice distribution of stake.

What are Incentives?

Incentives in the context of a cryptocurrency are ways of encouraging people to participate in the protocol and to follow it faithfully.

In the case of Bitcoin, this means mining blocks and incorporating as many valid transactions in those blocks as much as possible

In Cardano, it means being online and creating a block when they have been elected as slot leader and to participate in the election process.

Participating in the Cardano protocol incurs far less computation costs than participating in Bitcoin. Nevertheless, having slot leaders online when it is their turn is important for both security and efficiency. And for these slot leaders, there is some investment (in the form of hardware, time, so forth) so its fair that they should be reimbursed for the trouble.

Incentives in our case is referring to monetary incentives in the form of ADA.

However, it should be noted that there are other types of incentives, such as:

  • idealism
  • morality
  • general desire to “do the right thing”

These should not be underestimated…For example, when the Bitcoin mining pool Ghash accumulated 42% of total mining power, people voluntarily started leaving the pool and brought it down to 38% in a matter of two days. This was done not for financial reasons, as the people who left Ghash did not receive any monetary incentives. But they did it because they believed in Bitcoin and decentralization and the desire to do the right thing. I found more information on this incident here.

In the ideal world, monetary and moral incentives should align.
In the Bitcoin example given above, it was not ideal as people had to choose between doing the right thing morally and pursuing financial gain.

The goal in Cardano is to align these two things: if you maximize your profit, you are automatically doing the right thing.

What do we want to incentivize?

  • stakeholders to be online
  • participation in the protocol: when stakeholders are elected slot leader for a certain slot, then they should be online at that slot to create the block

On the other hand, there may be people who are not interested or don’t have the technical know-how to set up software or the time to be online → but they can still participate by delegating their stake to a stake pool!

Desired Configuration

  • 80% of all stake should be delegated to a number ( k ) of stake pools
  • k should be around 100
  • and those stake pools should be power users and be online when needed
  • they should also provide additional network infrastructure (relay nodes)
  • it is okay for the remaining 20% to participate in the protocol on their own or to simply do nothing

The team is configuring incentives in a way that they achieve this outcome.

Delegation Mechanism

Cardano is proof-of-stake system. Holding stake (owning Ada) means more than holding Bitcoin. Ada can be used to buy goods or services since it is a cryptocurrency, but in addition to the buying/payment power, it also means you have the right and obligation to participate in the protocol and create blocks.

These 2 uses can be separated by the delegation mechanism – meaning someone who owns Ada can keep the spending power, while delegating the power to participate in the protocol to someone else (stake pool)
It is important to note that funds can be spent normally at any time.

Addresses

There are 3 distinct types of addresses or accounts. Each of which is associated with 2 keys (pair). One key is for payment, and one for staking.

3 Types of Addresses:

  • Base Address: staking key is directly linked to the address
  • Pointer Address: is more indirect. The address points to a point in the blockchain → at that point in the blockchain, there is some metadata that defines the staking key.
  • Enterprise Address: cannot stake. This is used for exchanges. From the point of blockchain, exchanges are extremely rich. But the Ada in this address actually belongs to a number of separate individuals who deposited into the exchange. Don’t want the exchange to use clients’ money to participate in the protocol. This type of address can only transfer funds.

What is delegation certificate

It is a cryptographically signed piece of metadata in the blockchain that transfers staking rights from one staking key to another.

A delegation certificate can be published on the blockchain, in which case it is called heavyweight. This transaction will be on the blockchain and part of this metadata will be this delegation certification. Because of this there will be transaction fees (same as the normal fee).

There are also lightweight certificates. These are not published on the blockchain and not part of the metadata of transaction. They only become public as part of a block and is included in the block headers by the creator of block, to prove that he has the staking rights for the address that was elected as slot leader.

If there are conflicting certificates (ie. you delegate to someone and then somebody else) and there are 2 delegation certificates. There is a rule to break the tie, and this is whichever is later in the blockchain wins.

Stake Pool Registration

If one wants to create a stake pool, they must create formally register and be written into the blockchain ledger. The stake pool will create a registration certificate. This will also be embedded in a special transaction (therefore, there will be a fee to create a pool) in the system. The certificate contains the staking key of the pool leader. People wishing to delegate to this pool will then create delegation certificate where they transfer their staking rights to that staking key.

Note that stake pool registration is still open (until May 31). If you are interested, you can do so here.

Incentives Mechanism: Where does the money for Incentives come from?

There are two sources of funds for incentives.

1. Transaction fees
There are 2 main reasons for transaction fees:

  • Prevention of DDos (Distributed Denial of Service) attacks
    In a DDoS attack, an attacker tries to flood the network with dummy transactions to overload the system. If he has to pay a sufficiently high fee for each of those dummy transactions, this form of attack will become prohibitively expensive for him.
  • to provide funds for incentives.

There will be an explanation on how the fees are calculated in the next section.

2. Monetary Expansion
The total supply fo Ada today is approximately 31 billion Ada. And the maximal supply is 45 billion. Therefore, there is a gap of 14 billion Ada available. These Ada can be used for incentives as well.

Though this is a very large amount, it is not finite.
The idea is to do something similar to Bitcoin, which is to have exponential decrease over time (% used for incentives will become less and less). The goal and hope is that of course Cardano will become largely successful. With that, more and more people will use it and the amount received through transation fees will go up. This will create less need for this extra monetary expansion money.

How Fees Work

There is a rule that is hardcoded, for each transaction on what minimal fees are. Each transaction, must include at least minimal fees. So, the inputs for transactions have to be larger than outputs of transaction and the difference must be at least the minimal fee (or you can pay more if you want to).

Minimal fees formula
It is a linear function:
a + b x size
(‘size’ is that of transaction, in bytes, and not the amount of Ada)

a = constant, at this moment is 0.155381 Ada
Needed for prevention of DDoS → so that no matter how small the transaction is, it should cost enough to hurt an attack who tries to generate thousands of dummy transactions.

b = constant, at this moment is 0.000043946 Ada/byte
This is for fairness. The idea is that you should pay for the strain you put on the system. If you have a large transaction, the people who run the protocol will have to store your data on your computer and have computer memory. Therefore, it makes sense that the bigger the transaction, the more expensive it should be.

As an example: Take a transaction, with a fairly typical size of 200 bytes. Inputting the constants and the size, the transaction fee will look like:
0.155381 Ada + 0.000043946 Ada/byte x 200 bytes = 0.1641702 Ada

At some point, there is anticipation that values may be adjusted to better reflect actual costs. This is dependent on the course of Ada and on the use statistics of the system.

Dr. Brünjes also notes here that there may be additional terms in the future. There are ideas such as looking at the number of UTxO (which makes your wallet more complicated) and also affects the amount of data, or looking at the actual size of Ada (large amounts of Ada, not just in byte).

Incentives Distribution

In Cardano, there is strict division of time (into epochs and slots).
Slots last 20 seconds. For each slot, one coin is randomly chosen and the owner of that coin has the right to create this block in that slot.
Epochs contains 21,600 slots, which is exactly 5 days. An epoch is where election/randomization process happens. Every 5 days, people ‘roll their dice’ and slot leaders for the next epoch are elected at that point.

In Bitcoin, distribution occurs block by block. But in Cardano, the plan is to distribute incentives in an epoch by epoch base. All transaction fees (from all blocks of an epoch) plus monetary expansion will be put into one reward pool, for the whole epoch. Then this whole pool will be distributed amongst the people that were active/important during this epoch.

Basic idea of distribution: Explained in Two Steps

1. How the whole reward pool is distributed amongst pools
The basic idea is to do it proportional to stake so you can look at stake, and do the calculation. Or you can look at number of slots in that epoch that that pool was elected as slot leaders (not the number of actual blocks it created).

These two approaches look different at first, but the probability of being elected slot leader is proportional to the controlled stake (due to how cardano protocol works). Then, these methods have the same expected rewards.

There are two refinements, as follows.

Refinement 1:
The maximal proportion of the rewards pool that a stake pool can receive will be limited by 1/k
(k being number of desired pools, probably around 100)
Without this, pools would want to get bigger and bigger because they still get same reward, with lower cost since the overhead cost will not be much more than a smaller pool’s.

For example:
if k = 100
A and B with 0.3% and 1.2% of stake respectively.
A will receive 0.3% of rewards pool but B will receive 1/100 = 1%
In this example, no matter how high your stake is, you can never get more than 1% of rewards pool. The hope is that this will have the effect that pools won’t grow too large.

Refinement 2:
So far, this was all only dependent on stakes that stake pool have, but not on the work they actually do. There is a need for a mechanism, which check that blocks are being created when elected. Thus, stake pools should be penalized for not following the protocol and not being online when it is their turn.

This predicate will decide whether the stake pool is eligible for its share of the reward pool, by looking at the slots a given stake pool was elected for as a leader and the number of blocks it actually created. This can not be as simple as “creating at least x% of the blocks it was supposed to”. → Say they say you must create at least “90%” of blocks you have been elected to create to receive your reward. In this case, if a stake pool is elected for 100 slots in epoch, and it already created 90 blocks, then they would most likely just switch off the computer and ignore the last 10. If everyone did that, then at end of epochs, everyone would switch off computer, which is not good.
That is why needs to be a bit more complicated whether it be randomization or other algorithms.

2. How one pool further splits rewards among members
After rewards pool has been split between stake pools, each stake pool leader has to distribute her share of the rewards amongst her pool members. Pool members are the people who delegated their stake to the pool.

The two general guidelines are:

  • Pool leader herself should be compensated for her costs (hardware, registration, computing power, online time, etc.) and rewarded for her efforts
  • Pool members should be rewarded proportional to the stake they delegated to the pool

To understand this, let’s take this example:
Consider pool leader Alice with 0.2% of stake who forms her pool with Bob (0.1% of stake) and Charlie (0.2% of stake).

Let us further assume that the reward pool for a fictional epoch, and it contains 5,000,000 Ada. Also assume that Alice’s pool fulfilled its predicate and dutifully created blocks during all slots it was elected slot leader.

Then Alice’s pool which holds (0.2% + 0.1% + 0.2%) 0.5% of stake, which is less than 1/k and has no cap: will receive (0.5% of 5,000,000) 25,000 Ada from the reward pool for this epoch.

Of the 25,000 Ada, Bob will get half of what Charlie gets.
But Charlie will get less than Alice herself, to reward Alice for the cost and trouble of running her pool.

Assume that this additional compensation for running a pool in this example is 5,000 Ada. This will go to the pool leader. So out of the remaining 20,000, you can do a 2:1:2 calculation based on % of stake.
Alice will receive 13,000 Ada (8,000 + 5,000)
Bob will get 4,000 Ada
Charlie will get 8,000 Ada

*Note! This example is purely fictional and meant to explain the idea of reward distribution. It by no means reflects future actual reward amounts!

Undistributed Funds

There are 2 reasons that you could get less than your stake:

  • if you have more than 1/k as explained above
  • if you don’t do your work and participate in the protocol

In these cases, the whole reward pool is not distributed. It is important that this unspent reward does not get distributed amongst the rest of the people. This is not a bug, but rather a feature, because these funds will go to the treasury which promote sustainability in the system.

No Competition Between Pools

An important consequence that comes out this structure of undistributed funds is that is means there is no competition between pools. There is nothing one pool can do to increase its rewards by decreasing another pools reward. There is no incentive for any pool to sabotage another pool’s work.

Classic attacks in Bitcoin like selfish mining or block withholding cannot work because the pools are fenced off from each other. The actions of one pool only affect its own rewards.


Watch the video of the presentation here:

And his presentation slides can be found here.


Understanding the basics of staking - how and why, and even when
Staking Pool Attack Vector?
Nash Equilibrium- K pools of equal size
Multiple receive address?
[공유] PoS 위임 및 인센티브 (Lars Brunjes) 프레젠테이션 요약
Recap: June London Meetup with Professor Kiayias (11.06.2018)
#2

Cardano needs to turn down the MUSIC volume in these videos. The speaker is hardly audible in them.


#3

Thanks for this @cf_maki.mukai

:+1:


#4

Thank you @cf_maki.mukai for another informative summary! :star_struck:


#5

Is there still time to submit an application?


#6

Registration is open till the May 31 at: https://staking.cardano.org/


#7

All this is really beautiful. I sincerely thank you for your great work!


#8

Am I understanding this right? If a pool is online 100% of the time during an epoch and is ready to fulfill its responsibility if a slot leader is chosen from it, then they will be rewarded with a fair share of the transaction rewards that is relative to the amount of ADA that are delegated to the pool whether or not a slot leader is chosen from the pool?
Or am I getting it confused?


#9

It is not specified yet. Meaning that he did not specifically pointed out which method is used, he just described that it may be done either way: by slots, or by stake share. I reckon final details will be available only when the “incentives paper” is released in some near future.

But the point is that - there’s actually not that much difference between choosing either of these methods. For an “everage” pool with a stake between maybe 0.5% and 1% of total stake - this pool will own ~ 100 - 200 slots on average each epoch, and so its slot-reward will be much the same as if it would be calculated by stake.

Difference only noticeable for very small pools\nodes that have average chance to get zero to few slots in each epoch. If calculation will be done by stake - that mean that in an epoch where they got zero blocks - they still would receive few ADA coins, according to their stake share. I’m not sure it is anyhow critical :slight_smile:


#10

If the coins are distributed to the staking pools then it would incentivize running a pool without needing to have even 0.5% of the stake, not critical but it does eliminate the need for large amounts of ADA to be in the pool :slightly_smiling_face:


#11

Distribution by stake instead of by clocks created would smooth out profits of small pools across multiple epochs, that’s true. For example, if a pool would only have an average chance to win 10 slots a year - then it could receive each 5 days profits of about ((10 * block_reward) / 73) instead of having 63 empty epochs with zero profits.

But! It raises the problem that you can’t, afaik, provably verify the honest behaviour of an inactive node. It means that while big pools that own some slots would be punished for missing them - small node can just detect at the beginning of the epoch that it got no slots and turn all computers off for 5 days and then just come up in time for VSS and then still receive the same share of profits.

Moreover - smoothing results in this way means that the same node would receive the same profits in epoch where it actually owns some slots as in empty epochs (73 epochs of (Profit/73) coins, instead of 10 epochs of (Profit/10) coins) - and that means that the node can care considerably less about a risk of losing those profits.

An extreme case of such situation would be when a node receives an average profit so small that it actually barely covers or not covers the cost of running the node. In that case it would be fairly incentivised to cheat in this way. I reckon this is one of the reasons why Charles mentioned so many times in interviews that they want “a fair amount of stable and properly incentivised pools” and that would be better than a very big amount of small weird nodes that receive profits for making no blocks :slight_smile: That would actually only rob big pools of their fair profits for being stable and creating blocks.

P.S. Just for an example:

It depends on what to consider as a “large amount” :slight_smile: If a node has 0.00004% of total stake then on average it would already win less than 1 slot in epoch, so it would rarely receive any profits for block creation - that’s true. But the problem here is that if we assume total system stake to be around 10 billion coins (~third of a total supply) - then 0.00004% is already 400K of coins. Is it a large amount? )

If we assume the 10K coins to be a fairly small amount - then it would consist 0.000001% of total stake of 10 billion. A node with this stake would win on average 0.0216 slots per epoch, so around 1.5 slots per year. And if we calculate an approximate total epoch profit then this share would give around 7.231 ADA per epoch.


#12

I have some questions regarding the delegation and rewards:

  1. If someone delegates her stake in the middle of the epoch 42, can she receive the stake rewards at the end of the epoch 42? If so, how would the reward be different from another person’s reward who delegated her stake at the beginning of the epoch 42?
  2. Similar to question 1, what will happen to the rewards if someone cancels the delegation in the middle of an epoch?
  3. Someone delegated a wallet’s stake to a staking pool, what will happen to the rewards if he makes a transaction, say transfer 50% of her ADA from the wallet to another wallet?
  4. How would a pool leader be compensated for her costs? Does the pool leader decide how much the compensation would be? I believe it is the only way to do so as only the pool leader knows how much the server and other stuff cost. Assuming the compensation for the pool leader is public, it makes sense that the pool leader could decide how much the compensation would be because people who delegate their stake to one pool could move to other pools if they think that pool’s pool leader is taking away too much compensation.

#13

Also, I would like to know how does the desired k get determined? It surprised me when I saw that there should be around 100 staking pools.


#14

1 and 2) stakes for the upcoming epoch are snapshoted at the beginning of each one

  1. I don’t know exactly. Documents say that while value is staked, spending is still allowed. I expect that any amount as soon as spend, must become invalid as stake.

  2. the Ouroboros protocol will care about compensation of all involved players. So stakers will get their refunds directly from the PoS mechanism. And also pool operators will (probably) declare their fee along with their registration on the blockchain and then get rewarded directly at the end of each epoch.

We soon expect a study/paper elaborating reward fees for all involved parties from a game theory point of view. If pool operators can attract stakers only by lowering their fees in my opinion this contradicts two other desired goals: a.) cheapiest hosting can’t be the most reliable, and we all (stakers) need reliable nodes.
b.) Due to the capped reward it’s either that all other pools practically “must” follow the discounter path the get some stakers, or the stakers must compromise between lower fees * lower reward on discounter pools, which can change also over time long after your stake deposit. As staking requires (a bit of) computation and storage on the main chain (SL) we don’t want a dynamic (in worst case computer driven) trading system where “day stakers” try to automate their max profits.

So in order to allow professional equipment and human operators (both redundant and at the upper edges of tech know how) I really hope that the protocol defines some rules keeping an eye on quality and reliability.

The amount of pools is something that can change over time, probably when treasury voting became available. From what we’ve seen (couple of screenshots) IOHK did some simultations and research to find a good compromise between de-centralization and communication/synchronization overhead which affects performance.
That’s why this 100 nodes have to run 24365 on something better than “my old notebook” and managed by a staff of people covering also 24365.
The capped rewards will guarantee that we don’t finish in a sutuation like bitcoin with there huge mining pools (centralized hardware)
Also https://www.cardano.org/en/staking/ talks about ~20% of solo stakers. So people who participate with their own equipment and their own stake only as a node.


#15

I was under the understanding that the pool operators would be paid fee’s that were set within the blockchain, that all pools would be compensated equally for operating as a node.
Which I think is a good idea, small percentages add up quickly and a bad actor could possibly devise a way to increase pool fee’s (if allowed to set their own schedule) without giving any extra protection to those that delegate their stake to the pool.


#16

I agree, It is a double-edged sword.
I personally would prefer a mix of predefined basic fees, definung a certain threshold and preventing to finish as a blockchain run by low-cost discounter-nodes, because people want maximise their stake rewards only and don’t count on a reliable base for business transactions.
And then give the pools a certain liberty to invest and get refunded for extra efforts (infrastructure, personal, …) Stakers than can decide from this diversification if it’s worth or not.

A positive competition is productive and favourishing innovation. It absolutely shouldn’t became a mechanism where a staking pool can only attract stakers because he was able to reduce uptime of another pool or goes close to his production costs.

Pools should have incentives to work like a team and not like adversaries.
If Cardano becomes successful I expect things like DDOS attacks from other sides, and then it becomes crucial to have infrastructure and human DevOps know-how instead of low-cost nodes.


#17

Can we assume this to mean pool payouts are not automated?


#18

No. The best option would be to wait for official documentation. From what I know all payout should be automated on the protocol level.

You can find additional discussion here: https://t.me/CardanoDevelopersOfficial/4102


#19

This is also what I have understood, which relieves pool operators from making payouts and potential conflicts with those that delegate their stake with them.