One of the defining aspects of a public blockchain is that anyone can add information to it. However, before it is added, the information must be verified. All cooperating nodes in the network must agree on the definitions of valid, and invalid, information. For example, in the case of Bitcoin, there must be a consensus on what defines a legitimate transaction. When the new information is deemed valid by all participating nodes in the network, then the consensus is reached. This article explores how a decentralized network could achieve consensus through two different algorithms: proof-of-work and proof-of-stake.