PoW vs PoS: Proof of Work and Proof of Stake