Understanding the Differences Between Proof-of-Work and Proof-of-Stake