Sunday, July 2, 2023

XPower: Adaptive Rewards Rates

Hasan Karahan, MSc ETH Zurich

Proof-of-Stake (PoS) Sybil protection has a serious problem: inequality and hence, centralization. The problem with proportionally rewarding stake is that richer holders have a relatively smaller expense than the poorer ones, giving the latter an unfair advantage regarding rewards. This advantage translates into a creeping centralization over the course of time.

Therefore, we propose the following scheme to ensure long-term decentralization:

  • Split a population of stake holders into groups based on their stake size, i.e. discretization. Represent those groups by NFTs and then name them with the corresponding SI-prefixes: unit, kilo, mega, giga, tera, peta etc.

  • To each group offer a flat rate of let’s say 1%, which would correspond to proportionality. Alternatively, use increasing reward rates such that the larger holders would have an initial incentive to upgrade their holdings to the largest possible NFT levels.

  • Introduce adaptive reward rates with the goal of keeping the total income of each group equal: This simple rule avoids any group dominating the others and curbs the worst excesses of proportionality, which leads to the dystopian Pareto distribution, where 20% of the population control 80% of the resources (or worse).

The rewards can be distributed as a token, which can then be used as stake on a PoS based blockchain. Further, this centralization-resistant mechanism can be built right into the stake and reward scheme of a blockchain to offer long-term censorship-resistance.

Initial Reward Rates ¶

Below you see (on a logarithmic scale), that we have opted – in the case of XPower tokens – for increasing initial reward rates per NFT level. This super-proportionality serves as a major incentive to attract capital to the protocol. No NFTs have been minted or staked yet:

XPower NFTs: Initial Reward Rates
XPower NFTs: Initial Reward Rates

Minting UNIT, KILO & MEGA NFTs ¶

Now, we are going to deposit 1’048’575 XPower ODIN tokens and mint 575 UNIT, 48 KILO and 1 MEGA NFTs:

XPower NFTs: Minting UNITs, KILOs & MEGAs
XPower NFTs: Minting UNITs, KILOs & MEGAs

Adaptive Reward Rates ¶

After minting and staking the NFTs, the reward rates self-adapt: Since, the UNIT NFTs are in a tiny minority – in terms of the deposited 575 ODIN – their rate jumped to 607.87% (from 0%). Similarly, the KILO NFTs are also in a minority – with respect to the deposited 1K ODIN. Hence, their rate increased to 7.28% (from 1%). Finally, the MEGA NFTs absolutely dominate the distribution – with 1M ODIN deposited. Therefore, their rate decreased to only 0.35% (from the initial 2%):

XPower NFTs: Adapted Reward Rates
XPower NFTs: Adapted Reward Rates

Note: In the example above, the initial rates adapted immediately to the new stake distribution, since they have been active for only a very short time (just a few blocks). However, if the initial rates would have been prevalent for a longer duration, then the adaptation would have also taken longer!

Actual -vs- Target Rates ¶

Since now, the UNIT NFTs have a very high reward rate of 607.87%, as rational actors, we mint more of them increasing their number from 575 to 1M. Now, the number of deposited ODIN for the UNIT and MEGA groups is the same, namely 1M tokens.

Therefore, their target rates should also be the same, which with 0.68% is indeed the case. For UNIT NFTs the target rate decreased from 607.87% down to 0.68%, while for the MEGA NFTs the target rate increased from 0.35% up to 0.68%. Further, the KILO NFTs are now in a relative minority. Hence, their target rate increased from 7.28% up to 14.22%.

XPower NFTs: Actual vs Target Rates
XPower NFTs: Actual vs Target Rates

Note: The actual rates lag behind the target rates, with the lag duration being dependent on how long the actual rates have been active for: The longer an actual rate remains at a certain value, the longer it takes to approach a new target value. For a detailed discussion regarding the mathematical relation between the actual and target rates please see our blog post on variable reward rates.

Upgrading NFTs ¶

Since now, the KILO NFTs have with 14.22% a higher target rate than the target rate of UNIT NFTs, which is 0.68%, it makes sense to upgrade the UNITs to KILOs – once, the former’s actual rate falls below that of the latter:

XPower NFTs: Upgrading to Higher Levels
XPower NFTs: Upgrading to Higher Levels

Above, all UNITs have been unstaked to upgrade them to KILO NFTs, which will result in converting the 1M UNITs into 1K KILO NFTs. Further in the future, if the actual rates would change in favor of the MEGAs then the 1K KILOs could then be upgraded to 1 MEGA NFT.

Conclusion ¶

We have shown, that it is indeed possible to design a reward scheme that results long-term in a distribution that is flat enough, and where the “rich” (owners of the higher level NFTs) collectively cannot dominate the “poor” (owners of the lower level NFTs).

Further, thanks to short-term incentives the “rich” individuals always have a reason to upgrade their NFTs, and hence become differentiable from the “poor” – without the need to resort to drastic privacy-infringing measures like KYC or digital IDs.

Having such a uniform-ish distribution and then maintaining it over time is absolutely critical to ensure censorship resistance on a PoS blockchain. Otherwise, the entire system would become dominated by a few “oligarchs”, who could then arbitrarily impose their will on the rest, or who could be forced by out-of-chain powers to do so.

Saturday, May 6, 2023

XPower: Decentralization by Design

Hasan Karahan, MSc ETH Zurich.

The Problem: Abject Inequality ¶

Most of the current block-chains today fail to deliver on their core promise: decentralization. Without proper decentralization the main goal, the entire ethos of a globally censorship resistant and anonymous liquidity market becomes just an illusion.

But why? It boils down to stake concentration: Due to a lack of a safe and anonymous technological base for a one-man and one-vote on-chain democracy, even modern chains have to rely on proxy identities underwritten by proof-of-work or proof-of-stake.

While proof-of-work has the advantage of allowing anyone with access to energy to bootstrap a proxy identity, which can then be used to vote on the validity of transactions, it suffers from a potential centralization of access to superior hashing technology and cheap energy.

With proof-of-stake the issue is much more pronounced, where you – by design – start from a centralized setting, and then try with marketing to distribute your tokens to hopefully enough stakeholders to have a viable network!

Few rich folks end up moving-in onto your block-chain and either become an oligopoly of stakeholders, which then together could censor any “undesirable” transaction or worse, could simply decide to collectively dump their entire (possibly pre-minted) stake to destroy the security of the block-chain at any moment of their choice – due to greed, intrigue or external political pressure.

The Solution: On-chain Democracy ¶

Hence, the goal becomes to design stake re-distribution into the heart of the token-economics, that empowers the block-chain, to approach the ideal case of a one-man and one-vote on-chain democracy. Any other model seems to degenerate into tyranny, where the many are at the mercy of the few.

XPower: Proof-of-Work on Proof-of-Stake ¶

Our XPower project delivers the best approximation possible to on-chain democracy: (1) We use proof-of-work to distribute tokens, (2) which can then be burned to mint stake-able NFTs of various levels. (3) If you burn more tokens, then you can mint higher level NFTs with higher reward rates, (4) but which get reduced if a particular level gets too “crowded” – i.e. if the total rewards for that level become higher compared to that of the other ones.

So, the protocol equalizes the total share on the rewards across all levels, while preserving proportionality within them. Further, since XPower NFTs are upgrade-able, if you have minted (or bought) enough NFTs of a particular lower level, then you can “escape the crowd” to a higher one with higher reward rates, by reminting many of your lower level NFTs as a single higher level one.

The result is democracy between the XPower NFT levels, but capitalism within them! By design, none of the levels can dominate any of the other ones.

Using these rewards, which are distributed as aged XPower tokens (APower), we will run our own Avalanche subnet. The APower tokens wrap 1-to-1 XPower, as long as the project treasury has enough of the latter – where the treasury gets funded by a co-minting process on each newly mined and minted XPower. If however, mining stops and the treasury becomes empty, then APower will be backed by XPower only fractionally, to ensure a steady supply of APower for the stakers.

Since each subnet validator requires a minimum amount of AVAX, our XPower subnet will initially be protected by that stake until enough APower liquidity has accrued to ensure the safety of the block-chain.

Mine and mint proof-of-work tokens on Avalanche at xpowermine.com! We’ve got stake-able NFTs, too.

Sunday, February 26, 2023

XPower: Variable Reward Rates

Hasan Karahan, MSc ETH Zurich

Let’s say you offer stakeable NFTs with fixed reward rates of 1%: So, if a user stakes an NFT with a nominal face value of 1’000 units over a year then he should be rewarded with 10 units.

So, far so good. Now, let’s say you would like to introduce variable reward rates. Let’s discuss the most naive implementation of such variability, and the associated problems.

The Naive Approach to Increasing Rates ¶

The easiest way to realize variable reward rates would be to just increase the current value immediately to the desired target rate:

$$\textbf{rate}_t=\textbf{target[rate]}_t $$

Let’s investigate how such a sudden transition of the current rate would look like:

Reward Rates: Sudden Increase
Reward Rates: Sudden Increase

Above, you see that the reward rate has been doubled (in the middle of the year) from 1% to 2%. While such an increase is easy to understand, it has unfortunately many down sides:

  • In the rate curve above we would like to reward NFT stakers with respect to only the purple area without the rectangle in the red upper-left corner: So, instead of 10 units the reward should now be 15.

  • However, that is not what is happening here: At the end of the year the reward will be 20 units including the red area!

The issue is, that if we naively increase the reward rate then the staking period of the 6 months before the increase is also rewarded at 2%, which is obviously wrong. If the past staking period was long then this could even result in a dangerous situation, where the pool distributing the rewards could immediately be drained due to a sudden spike of the claims.

The Naive Approach to Decreasing Rates ¶

Reward Rates: Sudden Decrease
Reward Rates: Sudden Decrease

Alright, let’s investigate the reverse situation: What happens when an initial reward rate of 2% is dropped down to 1%? Nothing good:

  • Again, above we would like to reward with respect to the purple area (without the rectangle in the red upper-right corner): So, instead of 20 units the reward should be 15.

  • However, that is not what is happening here: At the end of the year the reward will only be 10 units excluding the area of the purple upper-left corner!

So, this time we have the reverse problem where the staking period before the decrease is not rewarded at 2% but instead only at 1%, which again is obviously wrong.

The Correct Approach ¶

Well, how can we solve this conundrum? Simply setting the reward rate to a new target does not work. So, we need somehow to defer a full update, and allow the current value to approach the target slowly over time.

But how slow? We would like the approach to be as fast as possible, but it apparently needs to be slower than an immediate switch. The solution lies in recognizing that the new target rate needs to blend in in proportion to the passage of time compared to the duration the current rate has been active for:

$$\textbf{rate}_t=\sum_{\tau\leqslant t} \textbf{target[rate]}_\tau \times \Delta[\tau] \Bigg{/} \sum_{\tau\leqslant t}\Delta[\tau]$$

The formula states in a nutshell that the reward rate corresponds to the area under the targets divided by the total duration.

Reward Rates: Asymptotic Increase
Reward Rates: Asymptotic Increase

Above, we see that the target rate switched after 6 months from 1% to 2%. If you look at the current value of the purple curve, you notice that it corresponds to the area under the red one at any point in time. For example, in the 12th month of the year the area is in total $1\%\times{6} + 2\%\times{6} = 1.5\%\times{12}$, which corresponds to an average reward rate of $1.5\%$. Obviously, a similar relation holds true if the target rate is decreased (instead of being increased).

Conclusion ¶

As we have seen, to offer variable reward rates on the XPower NFTs we are forced to operate with targets which are then asymptotically approached by the actual reward rates. A nice side effect of this natural constraint is that the stakers of the protocol can be assured that rates which have remained persistent over a long period of time, are hard to change to a new value: We call this property the “Lethargic Principle” which induces trust into the current rate configuration of the protocol.