seems promising. Waiting to know pricing strategy i have bookmarked this
could you explain better the shares calcs?
Of course.
Firstly you need to understand which is the need, which is the problem to solve. Let's do it with an example:
There are three users: A, B and C.
- A deposits 100 today at 12:00am, B to the same. Hence, total wallet balance is 200.
- Assume that in one day 200 coins generate 2 coins.
- Tomorrow at 11:45am user C deposits 200.
- At 12:00am the wallet generates 2 coins.
- If the calcs would based only on the amount deposited, User A receives 0.5 coin (25%), User B receives 0.5 (25%), User C receives 1 (50%)
As you can understand, this is not fair for two reasons:
1) User A and User B have paid one day of Cloud Staking service, Users C has paid 0 days. If you replicate this scenario for 30 days, you will understand that User A and B would never get benefits from Cloud Staking, or even they get disadvantages.
2) As you know, in PoS coins the mining process is based on your balance. But, probably not all people know this, balance is not the only variable taken to calculate your weight in coin's net. Indeed, QT/C++ wallets do the same calcs i have explained in the Open Post: wallets weight is based on 1) your balance 2) the time that balance passed (untouched) into the wallet.
Now that you got the point, understand the math is easy:
- assume that t1, t2, t3, .... , tN are the time of each cash flow
- assume that cf1, cf2, cf3, ...., cfN are the amounts of each cash flow
- take the time of the first deposit (t1) of the user and do the difference between t1 and t2. Call the result "TimeFrame_1".
In TimeFrame_1 we are sure that the balance of the user has not been touched. Now multiply it for the amount of coins deposited (cf1) => cf1 x TimeFrame_1 = w1. The result you get is a number (which does not have a unit, a measure) which represents in numbers "
the X amount which has been kept for T time", where X = cf1 and T = TimeFrame_1. Call it "w1".
- now take the cf2 and do the same. Assume that cf2 is a withdrawal instead of a deposit. Math is still math: t3 - t2 = TimeFrame_2 . (cf1 -cf2) x TimeFrame_2 = w2. What w2 is? It is "
X amount which has been kept for T time", where X = (cf1 - cf2) and T = TimeFrame_2.
- and so on until the end. Then do the sum of w1, w2, w3, .... , wN. That is the total weight of a certain user. Call it "TW_user_1"
- now do the sum of TW_user_1, TW_user_2, TW_user_3, ..... , TW_user_N . That's the total weight. That's the allocation base. Call it "AB"
- Finally, get the shares: TW_user_1 / AB % ; TW_user_2 / AB % ; TW_user_3 / AB % ..and so on..
Cheers