# Understanding shelley reward formula (and k, a0 parameters)

Hi,

this might be a bit technical, but I would like to understand more in details why the reward formula was chosen as such ( https://hydra.iohk.io/build/790053/download/1/delegation_design_spec.pdf p38): Question 1:
What is this strange factor, it seems to artificially advantage big pools over small pools, doesn’t it? If that is done purposefully why advantage big pools over small pools? Also it seems to make things non-linear, contrarily to what seems presented here (where it seems linear):

Question 2:

Why chose to have a factor a0 that changes return on interest rates, rather than limiting the proportion of delegated stake (σ-s) vs directly owned stake (s) , the same way that k limits pool size.

For example at first glance I would be happy with a formula such as: it seems naively that it can both prevent efficiently Sybil attacks and allows decentralization and does not advantage big pools over small ones.

Can you explain why the chosen formula (above) is better, and why it is important that bigger s should improve Ros, (rather than limiting size of the pool proportionally to s)

5 Likes

hey @pparent76, thanks for joining the A0/K pivotal conversation.

out of curiosity, have you watched the video from two days ago where Duncan, Kevin and Lars discuss the thinking behind their thinking?

1 Like

Ok thanks I’ll watch it tomorrow and tell you if it answers my questions or not.

1 Like

The `σ` is the total pool stake i.e. the delegated + pledge.
So, the first term of the function (if you solve the first bracket) is independent to the pledge, means if you have a saturated pools /w a=0.1 and even no pledge (or full pledge or between), then the pool will probably (if all blocks are minted) get ~91% of the max reward of the pool can get from the epoch total reward `R`. The second term is more complex. It says how that rest of the 9% depends on the pledge. if no pledge then it’s 0 if full pledge than 100% of that rest ~9% therefore 100%. But, it’s much more complex.

2 Likes

Well no since the “strange factor” from question 1 (let us call it like that), is close to 0 if the pool is small and close to 1 if it is big. Which means that if I run a small private pool with 100% pledge I will have 0 effects from a0 and if a0 is big it means that I will get a lot less rewards and blocks per stacked ADA than big pools, which to me is a very very bad thing. And I don’t see how this helps preventing sybill attacks, quite the contrary actually.

For example if a0=5 then a big pool will have 6 times more blocks and rewards per total stacked ADA, that a small private pool with 100% pledge.

I’ve watched the entire video above, and unfortunately it does NOT answer my questions.

I hope someone who works on it will be able to tell more, because the more I think about it the more I fear that Cardano might be going a way that I don’t like, i.e structurally disadvantaging small pools. And the more I think about it, the more the formula I’ve introduced in question 2 seems to me as better on all fronts, but it’s very possible that I missed something.

1 Like

I am not sure what do you mean that strange factor. That strange factor is just the total pool stake - pledge - pledge relative to the total pool stake of the expected size, that is the rest I mentioned above. So, I think my math is still hold, if you solve that function. It’s not as complex as it looks.

Also the a0, just say how big the impact of the pledge on the rewards. if a0 is high then the pledge has much higher impact on the rewards, so you should pledge as much as you can. Taht’s why it prevents sybill attack, cos on the mentioned a0=5 if no pledge you could only get max 20% of the reward while if it’s 100% pledge you will ge 100% of the reward.

1 Like

Let’s do the calculations:

The strange factor is the one that in hlighligted in red above: ( σ’ -s’ * (z0 -σ’) /z0 ) /z0

Suppose σ’ si low comparing to z0 (small pool) then (z0 -σ`) /z0 ~=1

( σ’ -s’ * (z0 -σ’) /z0 ) /z0 ~= ( σ’ -s’ ) /z0

if pledge = 100% then σ’ -s’=0 so the strange factor is approximately equal to 0
even if pledge is lower we still have σ’ -s’ < σ’ and σ’ is low in comparison to z0 so the strange factors approximately equal to 0.

Not the same story with big pools where σ’~= z0

If the strange factor is low it means you will not get the effect of a0 on your pledge.

Ok, I see now. I assumed saturated pool, which is in your terms is σ’~= z0 and the big pool, the ideal, what we would like to achieve.

correct

No, I am rewriting your strange factor when 100% pledge:

1. (o-s+o/z)/z means
2. (s-s+s/z/)z in o=s then it’s
3. s/z/z therefore
4. s/z^2

Then the right term in the bracket becomes (s^2*a0)/(z^2)

I’m sorry but I do not understand what you write because the starting point in 1.does not seem to correspond to the “strange factor” as it appears in the paper which is ( σ’ -s’ * (z0 -σ’) /z0 ) /z0

or using your notation “( o - s * (z-o) /z ) /z” which I do not see how it could possibly transphorms into “(o-s+o/z)/z”.

Also I do not understand how and why my calculations above would not be correct.

Too bad we don’t have latex in this forum, it would be easier to understand! Sorry, typo ( o - s * (z-o) /z ) /z —> “(o-s+os/z)/z”.

1. *o-s+so/z)/z means
2. (s-s+ss/z/)z in o=s then it’s
3. ss/z/z therefore
4. s^2/z^2

Cos
( o - s*(z-o)/z)z
( o - sz/z + os/z )/z
( o - s + os/z )/z
(s -s + ss/z)/z
ss/z/z
s^2/z^2
(s/z)^2

So the term became
sa0(s/z)^2
etc. etc

Yes ok but if z is great in front of s ( small pool )

then of course s^2/z^2 ~=0 which was my point.

No, it means, if you have 100% pledge you will get the reward propotional to the z0, whihc is fair, even in small pool, i.e. why would you earn much higher reward than your propotion to the z0 (the ideal)?
You will earn realtive to your pool stake, that is fair.

And do not forget the second term The Ro/(1+a0) too

This is exactly what I tried to explain,
Of course if the pool has small stake then it will earn less reward, but the math I told still hold.
The first term if how much will you earn relatively to your all delegated stakes the second that includes your strange factor is all about the rest and that also relative to your all pledge.

1 Like

No let’s take an example with 2 pools with 100% pledge ( s’=σ’ to simplify things), and let’s take a0=5

One big pool which is saturated (s’=σ’=z0) :
s^2/z^2=1
so its reward formula : f= R/6*( σ’+5 * σ’) = R/6*( 6*σ’) =R * σ’

One small pool saturated at 1% (s’/z0=0.01):
s^2/z^2= (0.01)^2 = 0.00001
so its reward formula : f= R/6*( 1.00005 * σ’) ~= R/6 * σ’

One get a RoS 6 times higher than the other. If you call that fair, we don’t have the same notion of fairness! It should be f= R/6*( σ’+5σ’) = Rσ’6/6 =Rσ’, but that’s just a typo.

And yes, that is the point to prevent the sybil attack. The a0 is the influencing factor, when it’s high you need to pledge a lot (to have impact), by meaning not relative to the stakes of your pool i.e. 100% of your 1% of the expected z0 cos that just means 1% pledge (and not 100%), but relative to the z0.
i.e. 30% of the expected z0

For example if a0 is as high as your example 5, then the pool should not have 1% pledge (as in your example) of the expected z0, but very high 50% or even much more, then everybody would create a pool, that is what the a0 prevents. So, that is the sybil attack prevention.

And the assumption is that every pool have to became to the z0=o’ (Nash equilibrium) and pledge depends, but as high as they can have. And the reasons I told and I assumed o’=z0.
And pledge should be as high as the a0 allows.

We’re expecting a0 between 0.1 and 0.75, to not punish the pools too much /w not enough pledge.
for 0.1 I would be able to operate a pool, but if it’s 0,25 I could not and that’s ok, cos it’s not about me but to secure the system, and if if’s as high as 0.75, even then some of the operators can create a group and pledge together.

Also, do not forget, that there are lot of other factors that affect the rewards, even o and s can be much higher then z0, i.e. at the beginning at bootstrapping time when there is not too much total stake etc. So, I told it’s much more complex than these simple examples.

1 Like

But to my mind that is not necessary at all to advantage big pools to prevent sybill and I even would argue that it will help sybill attacks.

If you think about it, one thing that would make Sybill attacks 100% impossible is the extreme case where every ADA holders decides to stake in there own pool or a close firend’s one. By disadvantaging small pools you reduce the number of people that will pledge in their own pool, or delegate to their own pool, or delegate to a good friends pool, making it ADA available for a sybill attack.

On top of that as I said, it seems to me that the formula I proposed in question 2 is better on every front, and I would like to know if the authors of current formula, can argue that their is better.

And if it’s the way Cardano chooses to go , then it will probably be without me. And that’s really a shame I discover that now only, it was not part of itn, and I invested money and time on Cardano, and I loved the idea to have a really well-thought PoS crypto were even relatively small pools like mine could participate and create blocks, and all my hopes may be destroyed by one little formula.

Also note that one thing that helps sybill attacks is to push on the fact that different stake-pools should have structurally very different RoS (including according to their size, and proportion of directly owned stake). It pushes users to delegate randomly to the most efficient pool, even if they don’t know it at all, and even if there are another pool operator that they know directly and trust, but have a lower RoS (e.g because smaller).

On the contrary if all stake-pools had basically the same expected RoS, then users would be encouraged to have for sole criteria, the fact that they know and trust (or even are thankfull to) the pool operator, which would make Sybil attacks harder.

Don’t despair. Pledge will be what the median number of pool will decide it will be, not what a formula depicts as a perfect world. We should just make sure that the optimal number of pool is high enough so that the median pledge I mentionned is actually meaningful and not just a measure of how rich are the rich people out there 1 Like