Proof-of-Stake (PoS) Consensus Protocol Algorithm