Proof-of-Stake (POS)
Last updated
Last updated
Proof-of-Stake is a term referring to the use of currency itself (ownership) to achieve certain goals. In the Fichain Network, proof-of-stake is used to provide mining and transaction processing on a par with proof-of-work.
Fichain token(MBB) uses the mixed Coin-Age[2]/CoinDayWeight[3] approach to provide proofs of the stake. The proof-of-stake difficulty is adjusted so as to limit the rate at which new blocks can be generated by the network to 10 minutes target spacing rate. Due to the very low probability of successful proof generation, this makes it unpredictable which computer in the network will be able to generate the next solution.
1. It's supposed to work
It's performed by scanning all available inputs in order to find the lucky one that satisfies the following condition:
Miner has to find a SHA256 hash that is under the target value. Target is derived from network target using CoinDayWeight parameter. The proof is presented by kernel hash and header signature. Each coin stake kernel is represented by a structure of 6 fields, a some of these fields could be varied pretty freely.
The hashing result of a valid proof-of-stake value must be lower than the block target. Miner tries to find this suitable solution by scanning all available unspent inputs with suitable CoinDayWeight.
2. Time to generate a proof-of-stake
Just like with proof-of-work, no-one can say exactly. But there is an estimation of how long it might take. Calculations are quite similar to proof-of-work, but instead of hash, we have coin-day-second here. So, at difficulty 1.0 we need ~ 4294967297 coin-day-seconds to find a block.
The probability of successful block generation during one day could be calculated from available CoinDayWeight using the formula:
Let's estimate the probability for current difficulty (0.23482093):
Average block generation time could be calculated as:
If you have a balance then Fichain token would automatically try to generate proof hashes for you. If you find a stake the reward is calculated using the current proof-of-stake difficulty and coin-age amount consumed. The reward amount is added to your stake amount and is shown together in the "stake" field of get info output.
Because stake is withheld from spending for 520 blocks, if you do need to keep your balance around to be spent soon we provided a configuration option "reserve balance" to help you keep your balance from being used by stake. You can add a line "reservebalance=10000" to Fichain and restart your TUNA token. This way TUNA token would try to keep your balance above 10000 coins when generating stakes.
3. Reward
Block reward is based on Coin-Age parameter and proof-of-stake difficulty. A reward can be calculated using the formula:
In other words, a reward is limited by 10 coins value, starts from 1 coin per Coin-Year, and is cut half every 8x multiplied by difficulty.