Protocol Parameters, Pledge and Sybil Resistance

I realized that I was using the active stake (estimated at 22b) rather than the total stake (estimated at 31b) in the rewards calculation.
This stretches out the curve since the saturation level is higher.
You can see this in the less improved benefit in this recalculation of Alt2.

Assumptions
Reserve: 14b
Total stake: 31b
Tx fees: 0
Fully Saturated Pool
Rewards available in epoch: 29.3m
Pool saturation: 206.7m

Curve exponent: 2
Crossover: 5m

Pledge  Rewards  Benefit  Alt Rwd  Alt Bnft
0k      150051   0%       150051   0%
10k     150053   0%       150100   0.03%
50k     150062   0.01%    150160   0.07%
100k    150073   0.01%    150205   0.1%
200k    150095   0.03%    150269   0.15%
500k    150160   0.07%    150396   0.23%
1m      150269   0.15%    150538   0.32%
2m      150487   0.29%    150740   0.46%
5m      151140   0.73%    151140   0.73%
10m     152229   1.45%    151591   1.03%
20m     154408   2.9%     152229   1.45%
50m     160942   7.26%    153495   2.3%
100m    171833   14.52%   154922   3.25%
206.7m  195067   30%      157053   4.67%

Because the a0 pledge benefit is spread over the pledge range from 0 to saturation there is a dependence on k and total_stake.
Since k and total_stake will likely change over time it would be better to express crossover in terms of k and total_stake instead of a fixed number.

One possibility would be

crossover = total_stake / (k * crossover_factor)

where crossover_factor is any real number greater than 0.
For example, setting crossover_factor to 20 with k = 150 and total_stake = 31b gives a crossover of approximately 10.3m.

As @_ilap pointed out, we can generalize the alternative approaches to try out different curve exponents.
This gives us

s = pow(pledge, (1 / curve_exp)) * pow(crossover, ((curve_exp - 1) / curve_exp)) / total_stake

The curve_exp could be set to any integer greater than 0 and when set to 1 produces the current rewards equation.

An interesting set of parameters as an example is

Curve exponent: 3
Crossover factor: 10

which produces

Crossover: 20.7m

Pledge  Rewards  Benefit  Alt Rwd  Alt Bnft
0k      150051   0%       150051   0%
10k     150053   0%       150405   0.24%
50k     150062   0.01%    150656   0.4%
100k    150073   0.01%    150813   0.51%
200k    150095   0.03%    151011   0.64%
500k    150160   0.07%    151353   0.87%
1m      150269   0.15%    151692   1.09%
2m      150487   0.29%    152118   1.38%
5m      151140   0.73%    152856   1.87%
10m     152229   1.45%    153585   2.36%
20m     154408   2.9%     154504   2.97%
50m     160942   7.26%    156094   4.03%
100m    171833   14.52%   157665   5.07%
206.7m  195067   30%      159750   6.46%

As you can see this gives meaningful pledge benefit rewards to pools pledging less than 1m ADA.

1 Like

Just saw your reply @pparent76 .
I will have to think about it and reply tomorrow as it is after 2am here.

@pparent76 I think you have brought up some interesting points and had a good discussion in the other thread on your proposal.
I don’t claim that my proposal will address your concerns, only that it is an improvement on the current system.
I will defer to @Lars_Brunjes and others to discuss your general concerns.

@shawnim Thanks very much for tagging me! I wish that my math skills were up to the task of providing feedback on your proposal.

My contributions are at the conceptual level, and I have trying to understand how the current model works, so I can explain it in non-mathematical terms. I am afraid I am not qualified to give feedback on your suggestions. It looks like there is a good discussion going on, and I hope that Lars and others will continue to engage with you.

Someone also made a really good suggestion in Pierre’s thread about creating a monthly forum with IOHK for mathematically focused conversations. I hope that will happen, as that would be an excellent arena to discuss your ideas.

@AllisonFromm Thanks for the reply!
I think that more than the details of the math the important thing about my proposal is the concept that we need to incentivize stake pool operators to pledge even if they only have 10k, 50kor 200k ADA and we don’t need to give massive rewards to whale pools and private pools for pledging millions of ADA.

I hope that @Lars_Brunjes will respond at some point. I know it has been a super busy time for IOHK with the Shelley release but maybe he will have time in August.

1 Like

I think it would be useful that you publish a numerical comparison within your model and the current one, as you did above in post 21, but in a realistic situation. For example comparing a 200k-ADA-pledge pool saturated at 1% with a 2million-ADA-pledge saturated at 10% and a 20million-ADA-pledge saturated at 100%. Because a 200k-ADA-pledge pool will never ever be fully saturated in the real world, and if it did it would be a very bad sign that we are very weak to Sybill attacks.

By the way I think something else that can be problematic in your proposal is that

n*sqrt(1/n) → ∞ when n → ∞

In other words, on could get an infinite amount of “taken into amount pledge”, by splitting infinity many times their pool. Of course you could say this can be compensated by the fact that small pools won’t get any effect for a0, but still sounds disturbing to me, especially if we envisage that the reward function may evolve over time.

Hi all,
I submitted a Cardano Improvement Propopsal (CIP) for this idea.
You can see the pull request at: https://github.com/cardano-foundation/CIPs/pull/12
The pull request contains the CIP and the PHP test code.

The Specification section of the proposal is as follows:

This is a modification of the maxPool function defined in section 11.8 Rewards Distribution Calculation of “A Formal Specification of the Cardano Ledger”.

maxPool = (R / (1 + a0)) * (o + (s * a0 * ((o - (s * ((z0 - o) / z0))) / z0)))

where:
R = ((reserve * rho) + fees) * (1 - tau)
o = min(pool_stake / total_stake, z0) = z0 for fully saturated pool
s = pledge / total_stake
z0 = 1 / k
and the following are current protocol parameters:
k = 150
rho = 0.0022
a0 = 0.3
tau = .05

The idea is to replace s in the above equation with an n-root curve expression of pledge rather than the linear pledge value.

We use an expression called crossover to represent the point where the curve crosses the line and the benefit in the new and original equations is identical.
Because the a0 pledge benefit is spread over the pledge range from 0 to saturation there is a dependence on k and total_stake.
Since k and total_stake will likely change over time it is best to express crossover in terms of k and total_stake as follows:

crossover = total_stake / (k * crossover_factor)

where crossover_factor is any real number greater than or equal to 1.
So crossover_factor is essentially a divisor of the pool saturation amount.
For example, setting crossover_factor to 20 with k = 150 and total_stake = 31 billion gives a crossover of approximately 10.3 million.

Also, we can parameterize the n-root curve exponent.
This gives us:

s = pow(pledge, (1 / curve_root)) * pow(crossover, ((curve_root - 1) / curve_root)) / total_stake

The curve_root could be set to any integer greater than 0 and when set to 1 produces the current rewards equation.
The curve_root is n in n-root. For example, 1 = linear, 2 = square root, 3 = cube root, 4 = fourth root, etc.

By making this modification to the rewards equation we introduce two new protocol parameters, crossover_factor and curve_root, that need to be set thoughtfully.

The Test Cases section is as follows:

See rewards.php for some simple PHP code that allows you to try different values for crossover_factor and curve_root and compare the resulting rewards to the current equation.
For usage, run “php -f rewards.php help”.

An interesting set of parameters as an example is:

curve_root = 3
crossover_factor = 8

Running “php -f rewards.php 3 8” produces:

Assumptions
Reserve: 14b
Total stake: 31.7b
Tx fees: 0
Fully Saturated Pool
Rewards available in epoch: 29.3m
Pool saturation: 211.3m

Curve root: 3
Crossover factor: 8
Crossover: 26.4m

Pledge  Rewards  Benefit  Alt Rwd  Alt Bnft
0k      150051    0%      150051   0%
10k     150053    0%      150458   0.27%
50k     150062    0.01%   150747   0.46%
100k    150073    0.01%   150928   0.58%
200k    150094    0.03%   151156   0.74%
500k    150158    0.07%   151551   1%
1m      150264    0.14%   151941   1.26%
2m      150477    0.28%   152432   1.59%
5m      151116    0.71%   153282   2.15%
10m     152181    1.42%   154122   2.71%
20m     154311    2.84%   155180   3.42%
50m     160702    7.1%    157012   4.64%
100m    171352   14.2%    158821   5.84%
211.3m  195067   30%      161305   7.5%

As you can see this gives meaningful pledge benefit rewards to pools pledging less than 1m ADA.

5 Likes

The question is how decentralised do we want to be and how much does a potential attacker need to pay to control more than 50% of the stakepools.

If we consider k=150 as the level of decentralisation we can currently afford. An adversary would need 75+1 pools registered. This costs them 500 ada per pool in fees. 76*500 = 38,000 ada (appx $5,000), not prohibitive.

The delegators currently seem okay with 1PCT pools fees of 1% and 10K pledge.

10K pledge costs $1,400
Run 76 of these for only $106K - not prohibitive

Making pledge matter more would be good for security and good for ada price as people who invest for the longer term are better rewarded.

4 Likes

Nice analysis!
Totally agree.

1 Like

it is a fair proposal for all operators and should be voted/effected on time before the big players(exchange) join