# [DEPRECATED] Era Scores for Highway Reward Distribution This proposal is deprecated. Refer to https://hackmd.io/@onur/SJItG9I6B instead. ## Idea Our idea: - You get 1 point for every one of your rounds (according to your round parameter, but even if you weren't the leader) whose block was finalized within that round, and where you fully participated (with lambda response and omega message). - E.g. assume Alice is the leader, makes a block, and indicates that her rounds are 2 seconds. She also sends her ballot in that round, as expected. - With the help of Bob, Carol and Dave, who all behave correctly, the block gets finalized after 1.8s. Bob has a 1s round time, Carol 2s, and Dave 4s. - Eve has 2s but doesn't send her omega response. - Then Alice, Carol and Dave would each get 1 point for that. Bob wouldn't (1s round time was too fast) and Eve wouldn't either (liveness failure). - At the end of the era, the total rewards (according to the target inflation) would be distributed proportionally to the number of points each validator has. ## Specification Let $n_\alpha$ be the round exponent of validator $\alpha$, and let $\lambda$ designate the leader in the context of a certain tick and the corresponding block. Given a block, let its tick be $i$ and $i+c$ be the exact tick where we detect a level-1 summit on the block with a quorum size $q$. From now on, a block "being finalized" will mean just that and nothing else, for brevity's sake. Every validator announces their round exponent. From the round exponents, we obtain the blocks that each validator must propose. When a block is finalized, every validator that was supposed to participate in that block---i.e. each validator $\alpha$ such that $i \;\text{mod}\; n_\alpha = 0$---receives points. We describe how to calculate those points below. Given that the block was finalized after $c$ ticks, we assign a *overdue degree* to each validator $$ d_\alpha(c) = \max(\text{ceil}(\log_2 c) - n_\alpha, 0) $$ Example: Let there be a leader $\lambda$ and two other validators $\alpha$ and $\beta$. Observe the overdue degree for different $c$: | Validator | $n_\ast$ | $d_\ast$ when $c = 30$ | $d_\ast$ when $c = 35$ | |-|-|-|-| | $\lambda$ | 5 | 0 | 1 | | $\alpha$ | 3 | 2 | 3 | | $\beta$ | 7 | 0 | 0 | We use the overdue degree to scale down points exponentially. Let $k$ be the decay rate. Then a validator $\alpha$ receives $$ k^{-d_\alpha(c)} $$ which depends on the time elapsed until finalization. The maximum point a validator can receive when they don't undershoot their round exponent and the block gets finalized in time is 1, and the set of possible points is $\{1,\frac{1}{k},\frac{1}{k^2},\frac{1}{k^3},\dots\}$. ### Reward Distribution Each validator collects a number of points during the era. The points are the multiplied with each validator's weight, which becomes their score. At the end of the era, a certain number of tokens are minted, and distributed to the validators proportional to their score. ## Analysis TBD