The most critical and novel property of blockchains is undoubtedly their decentralization. Creating and maintaining a decentralized ledger at scale comes with its own set of challenges, the main one being reaching a consensus. Indeed, all the people/machines involved need to come to an agreement regarding which blocks are valid (and therefore incorporated into the blockchain) and which are invalid (and not added to the blockchain).
Reaching a consensus between all the nodes is necessary to preserve the decentralization of the network. However, the algorithm used to reach this consensus impacts many other features of the network, most notably the speed at which the transactions can be validated and the amount of energy it requires. Different algorithms exist: Bitcoin and Ethereum use Proof of Work, a mechanism theorized in the nineties but never really used at scale before.
Proof of Work (PoW)
With PoW, miners provide computing power to get a chance to earn a significant reward if they validate a block. To do so, they use a function (Hashcash/SHA-256) to solve highly complex math problems. For a block to be valid, the hash of its header must be a 256-bit alphanumeric string that starts with a certain number of zeroes.
The miners can find this hash ("the target") by varying a small portion of the block header's called the "nounce." The whole process is hit or miss and many attempts must be made to succeed.
The only way to increase one's chances of getting the block reward is to dedicate more computing power to the task, which is why PoW requires a tremendous amount of computing power and electricity. The Ethereum network is currently using more energy than Iceland to validate its transactions.
Moreover, as the network matures, the difficulty keeps getting higher, which causes a concentration of the mining power. Indeed, the miners with the most optimized mining devices reap the benefits more consistently and can reinvest their mining rewards to consolidate their advances.
Both the centralization and the energy consumption raise serious questions regarding the network's ability to scale. Besides, this mechanism is environmentally harmful and wasteful since the algorithmic problems solved are serving no other purposes than securing the network.
Proof of Stake (PoS)
An alternative to PoW was proposed in 2012 to address the concerns regarding the increasing energy consumption required by PoW: Proof of Stake. In this model, mining is no longer necessary: instead, it's the "stake" (coins stored in the system) that matters to determine the chances of validating a block. The system selects participants pseudo-randomly (among the stakers) to forge and add blocks onto the blockchain.
Since there is no mining with PoS, it solves many issues raised by PoW, including the progressive centralization and the problems caused by the excessive energy consumption. Indeed, the absence of mining makes it much easier to become a validator in the network. Besides, each validator, because of its stake, is directly interested in the success and the perennity of the whole network.
While mining coins is wasteful, it has the benefit of anchoring the system in the real world (through the need for computing power or energy cost). On the other hand, most of the problems with the PoS protocols stem from the fact that the protocol is not aware of anything but its own blockchain. PoS weaknesses are known and documented, the team working on its Ethereum implementation are figuring out solutions to solve them.
Casper: Proof of Stake for Ethereum
Casper is a protocol in development since 2014; its goal is to switch Ethereum from its current model (PoW) to Proof of Stake. Indeed, to achieve Ethereum's vision of becoming "The World Computer," scalability is critical. The current energy consumption, as well as the costs associated with PoW (currently $1.2 billion/year), are unsustainable in the long run. The Casper rollout is planned in three phases to ease the implementation process:
- Casper FFG (Friend Finality Gadget): this phase is a PoW/PoS hybrid. Regular blocks are still mined through PoW but every fifty blocks there is a PoS checkpoint where a network of validators assesses finality. Finality is achieved when transactions are irreversible.
- Casper CBC (Correct-by-Construction): this phase is essentially a tune-up phase for Casper. Instead of implementing a fully specified PoS protocol, only a partially specified one is implemented. The protocol can then be actively and constantly derived using a safety oracle (called "ideal adversary").
- Final Casper Protocol: the final Casper protocol will be specified using the learnings of both FFG and CBC.
The future of Ethereum
Ethereum's transition to PoS is only part of the solution to help Ethereum scale. Scaling up the network will require a mesh of layer one solutions (protocol level, requiring a hard fork), such as Casper and sharding, and layer two solutions (deployed through smart contracts) like Plasma and Raiden. Learn more about the state of scaling Ethereum here.
As the blockchain ecosystems develop, different consensus algorithms are being theorized to answer diverse needs: PoW and PoW are the most common options, but not the only ones. You can learn more about the various decentralized consensus methods here.