Blockchain consensus algorithms use the scarcity of a resource and economic incentives to protect the security of the distributed ledger.