FROM:
http://agroff.github.io/posv/Much of the information here is compiled from the Reddcoin Source Code, the Reddcoin White Paper, and the original PoS White Paper.
Understanding PoSV
In its most basic form, we can think of PoSV simply as compounding interest. It was designed to offer 5-6% interest, compounding every time you stake (produce new coins). For a rough approximation of returns under near optimal conditions, we will calculate the returns for 5% interest compounded daily.
Reddcoin Stake Calculator
Estimated Annual gain: 5.126,75 RDD
Estimated Weekly gain: 98,591 RDD
Estimated Daily gain: 14,046 RDD
I'm not positive this is accurate. If it's wrong please fix it and/or blame hoppi.
Isn't it a bit more complicated than that?
It is of course. Under PoSV, your returns are greatly influenced by how often you successfully stake. This is due to the mathematical formula of PoSV, and not a product of how often your interest is compounded.
More Info: How Important is CompoundingTo begin understanding PoSV, we need to first understand when, or how often, you stake.
It's easiest to think about this in terms of a lottery. Everyone with reddcoins has many "lottery tickets." Approximately every minute, one lottery ticket is chosen, and whoever wins gets awarded newly created coins.
If you have reddcoins in your wallet, you have some lottery tickets. Whoever has the most lottery tickets has the best chance of winning. To enter the lottery just make sure your wallet is staking, and it will enter the drawing for you every minute.
Before we can understand how many tickets each person gets, we'll need to review a few important concepts.
What is staking ?
Staking is the process your wallet uses to validate transactions and award you with coins. When your wallet is staking, it is checking transactions to make sure everyone who sends coins actually owned those coins and had the right to transfer them. If most of the wallets online agree that a transaction is valid, then it gets accepted by the network. This concept of consensus is essential to all digital currencies, and is what keeps Reddcoin secure.
Tip: How to StakeAs a reward for keeping the network secure, every minute one person is chosen to receive some interest on the coins they own. Whoever has the most "lottery tickets" has the best chance of winning the award.
In Reddcoin terms, your lottery tickets are referred to as your "Weighted Coin Age" or simply weight, and your weight is a non-linear product of coin age.
What is coin age ?
Quite simply, coin age is the age of your coins. Imagine you get a new wallet and start out with zero coins. On Monday, your friend sends you 5,000 coins. On Wednesday, you decide to buy 10,000 more coins and withdraw them to your wallet.
Assuming it's Thursday, you'll have two groups of coins. The first group of 5,000 has 3 days of coin age, and the second group of 10,000 coins has 1 day of coin age.
When coins are sent to another address or successfully stake (generate interest), their coin age is reset.
More Info: Staking by GroupWhat is the network weight, total weight, and expected time until next reward ?
Tip: View Weight Information
According to the reddcoin protocol, every minute there's a lottery going on, which will result in a single block being discovered.
More Info: What's a Block?
The network weight can be understood as the number of tickets available for this lottery. In practice the network weight is the sum of "weighted coin age" of all the coins which are staking at this moment accross the entire network. Let's call this number NW (for "network weight").
Now your total weight is the number of tickets you own which allow you to participate in this lottery. It is calculated by summing up all the coinage of the coins which are staking in your wallet. Let's call this number TW (for "total weight").
A representation of tickets owned.
A visual representation of your "Tickets" compared to total tickets.
Now you need to know that this lottery is fair in the sense that each "ticket" is equally likely to win on the next round. The details by which the winner is found is internal to the protocol implementation, but a simplified explanation can be found in the
"What's a Block?" info section.
That being said, since different participants own different number of those tickets, the more of them you own, the quicker you can expect to be a winner, this is the expected time until your next reward. Of course the lottery is random so nothing is 100% certain. It could effectively take less time (if you're lucky) or more time (if you're less lucky
) than the expected time for you to actually win. But in the long run, those differences average out and you would see that the expected time is pretty accurate (as long as you keep your wallet online 24/7).
To be more mathematically specific, on each minute round you have a chance NW/TW to be the lucky winner. It is a simple result that as a consequence the expected time to be a winner is NW/TW minutes.
Reddcoin Icon Expected Time Until Reward
Your Total Weight Total Network Weight
CALCULATE Expected time to earn a reward in:
Minutes: 130.00
Hours: 2.17
Days: 0.09
To access these numbers in your wallet, you can go to Help -> Debug Window and type "getstakinginfo". It will show you staking numbers that can be easily copied and pasted.
Let's now see how these things work in practice. Let's assume that right now the network weight is about 13B (13,000,000,000) and that your total weight is 100m (100,000,000). According to what we explained above the expected time will be 13B/100m = 130minutes
so in expectation to get a reward, it would take you about 2hrs in that case. Check it with your wallet and see if the formula works!
Just to put things back in the context of posv, winning here means discovering a block which will not only award you those precious RDD but will also validate the most recent transactions for the network. That's how you get rewarded for providing a useful service to the community!
What is the average weight ?
We mentioned before that in the wallet, coins stake in groups of coins which arrived in your wallet during a single transaction.
Hidden feature: the Coin Control menuIf you take a look at the Coin Control menu you will discover how many groups your wallet is made of. Now each such group has a corresponding coin weight. As we said in the previous section the total weight is the sum of all those group's coin weights. Now the average weight is simply the average of the coin weights of each group!
So how is weight calculated?
The calculation of coin weight is the core of PoSV. Like traditional PoS, the weight is a product of total coins (stake) and the average age of those coins. In contrast to traditional PoS, which calculates weight as a linear product of age, PoSV uses an algorithm where new coins gain weight quickly, and old coins gain weight increasingly slowly. This is how PoSV offers a big incentive to be active.
To see the PoSV algorithm in action, we can look at a graph of coin weight over age.
PoS Coin Age
PoSV Weighted Coin Age
For the first week, you can see that coin weight is a linear function of coin age that grows faster than POS. On the other hand even though coins continue to accrue weight with time, they do a slower and slower pace compared to POS.
In order to better visualise the relative speed at which POSV and POS accrue weight for their coin, the next graph shows the ratio of POSV to POS weights. The peak of 1.2 means that at 1 week, the coins which stake in the POSV wallet accrue weight 20% faster than their POS counterpart.
On the other hand after 2 weeks the POSV coins start to accrue weight slower than POS. This is why it is said that POSV encourages staking over a relatively short period of time compared to POS.
Chart rendered with an adapted version of the weight algorithm from reddcoin's source.
How much do I earn when I mint?
Every time you successfully stake coins, you get paid interest on the weighted age of those coins. To make this more clear, we'll use some examples and compare weighted age (PoSV) to calendar age (Traditional PoS).
With traditional PoS, coins are not age-weighted. One calendar day corresponds to one coin age day. What this means is that you could gather 10,000 coins and close your wallet for a year. When you open it back up, your coins would have gained a year's worth of age. Since they're so old, they'll have a high probability of staking immediately. When they do stake, they'll pay the entire year's worth of interest. So those 10,000 coins will pay 5% interest (500 coins) on 365 days worth of age. Similarly, if they were to stake with an age of one month, they would earn one month worth of interest at 5% (~42 coins)
With PoSV, interest is paid on the weighted age instead of the actual age. So if you have 10,000 Reddcoins which stake with a calendar age of one year (365 days) you'll only get paid interest on 41 days. This means you would only get a return of 57 coins, instead of the 500 they would have got in traditional PoS. This is a great incentive to keep your wallet open and secure the network.
More Info: Shuffling Coins for Optimal AgeIn contrast to the example of staking with old coins, Reddcoin offers an extra reward for coins that stake with a low age. According to the PoSV algorithm, a coin which stakes with a calendar age of 7 days will receive 5% interest on 8 days. This means that under optimal conditions, you can receive more than 5% interest.
To understand a bit better, lets look at a graph of annual interest depending on the average coin age when staking occurs.
TODO: Create the graph
Putting it all together
To see how all of this fits together we've created a staking simulator. What we'll do here is define the total network weight and assume it remains constant for the entire simulated year. For simplicity, we'll also assume that all of your coins are in one group and that they will stay in that group the entire year. Your coins will start with a coinage of zero.
We will simulate every minute of the year by calculating your current weighted age and generating a random number to determine if you successfully stake that minute. If you do, you'll receive interest and your coinage will be reset. If you don't, we'll increase your coinage by one minute and then try to stake again.