What Is Waves’ Leased Proof of Stake Consensus?
With its Waves-NG protocol, the Waves network has achieved high scalability and transaction throughput. The network employs a Leased Proof of Stake (LPoS) consensus algorithm to achieve this.
Basics
The Waves network, which provides a comprehensive blockchain ecosystem for use in business processes, was launched in 2016. It was developed after raising 30,000 BTC through an ICO that was worth approximately $16 million at the time. The network offers a diverse toolkit that satisfies different needs, such as the creation of custom cryptocurrency tokens, the development of smart contracts, and peer-to-peer trading on a built-in decentralized exchange. The Waves Keeper browser plug-in also offers a secure and convenient means of interacting with dApps and web services.
Scalability
Recognizing the need for scalability to facilitate the mass adoption of blockchain technology, Waves made it a priority to develop technology that addressed the limitations of existing blockchains. One example of such a limitation is the relatively slow transaction processing speed of Bitcoin, which can only handle around 7 transactions per second, despite its high level of security.
Consequently, Bitcoin is not an efficient solution for everyday global use. Second-tier solutions, such as the Lightning Network, are necessary for Bitcoin to fulfill this role. Waves, on the other hand, took a different approach, initially prioritizing high on-chain scalability rather than second-tier applications.
Balance Leasing
Initially, Waves implemented a simple Proof of Stake consensus algorithm, distributing all 100 million WAVES tokens following the ICO. Unlike PoW-mined coins, WAVES tokens have a fixed supply and no inflation. As a result, block validators receive only transaction fees for processing blocks and no block rewards.
In May 2017, the Leased Proof of Stake (LPoS) system was fully launched, enabling users of the Waves lite client to lease their WAVES tokens to mining nodes. Leased tokens are locked in the user’s account, prohibiting transfers or trades, although the account holder retains full control over them, and leases can be terminated at any time. Since operating a mining node involves significant technical overheads and the requirement of a 24/7 online presence, only a small proportion of the Waves community operates nodes.
When WAVES tokens are leased to a mining node, the miner's stakeweight increases, thereby improving their chances of discovering the next block. The Leased Proof of Stake system provides two key benefits that enhance network security. Firstly, an increased quantity of leased WAVES tokens enhances network security by raising the barriers to carrying out a 51% attack. Secondly, leased WAVES tokens can be assigned from a user's cold storage address to a node, which has only a small balance but remains online. This significantly decreases the chances of WAVES tokens being hacked from an online computer since the leased funds are not transferred to the miner.
Waves-NG: A New Consensus Approach
In December 2017, the Waves network received a significant upgrade with the implementation of Waves-NG, which is based on a proposal by Cornell IT professor Emin Gün Sirer known as Bitcoin-NG. The traditional Bitcoin protocol chooses a miner retrospectively after a block has been added to the blockchain, and miners then compete to find a valid hash for the next block based on the current blockchain state. Meanwhile, newly-generated transactions remain pending in the mempool until a miner validates them.
Byzantine Fault Tolerant System
In 2015, Bitcoin-NG was proposed as a Byzantine fault-tolerant (BFT) system that provides scalability. Waves updated this idea for a proof-of-stake network, creating the Waves-NG protocol, which was launched in December 2017. Waves-NG is the first deployment of Bitcoin-NG for an open, public blockchain. Unlike the original Bitcoin protocol, Waves-NG selects the next miner in advance who creates an empty 'key block'. Microblocks, consisting of a few transactions each, are then added in real-time to this key block, making it possible to add transactions to the blockchain within seconds, with network latency being the only real delay. The protocol allows for higher throughput and faster confirmation times while retaining BFT properties.
MassTransfers
The MassTransfers feature is another recent addition to the Waves ecosystem. It enables users to include up to 100 transfers in a single transaction, which translates into reduced fees. The reason why 100 transfers are the limit for MassTransfers is that it balances the need for more capacity and convenience with the need to prevent the sending of very large batches of low-cost transactions at once. If a user needs to make more transfers, they can do so by submitting multiple MassTransfers sequentially.
Users can simply select MassTransfer as a different kind of ‘Send transaction,’ which allows them to include up to 100 recipients in one go. What’s more, recipient addresses can be included via JSON or uploaded from a CSV file, making it easy to conduct airdrops or weekly payouts to WAVES lessors. The combination of Waves-NG and the MassTransfer feature allows for high throughput on the network.
Stress Tests
The Waves network has undergone several stress tests to assess its throughput capacity. A significant stress test was performed on MainNet in October 2018. This test showed that the public blockchain protocol (not simply a limited and controlled TestNet) could handle more than 6.1 million transactions in 24 hours, with an average of 4,200 transactions per minute or 71 transactions per second. The peak throughput even reached hundreds of transactions per second.
Conclusion
Waves prioritizes on-chain scalability while keeping fees low through the Leased Proof-of-Stake system. This allows everyday users to help secure the network by leasing WAVES to full nodes. Additionally, Waves-NG enables a high throughput of up to 100 TPS, which is an order of magnitude higher than many blockchains. However, there are limits to on-chain scaling due to storage and bandwidth constraints.
The developers believe that the current approach can be optimized to support up to 1,000 TPS before additional scaling solutions are needed. In the meantime, Waves is exploring options for a second-tier scaling solution involving sidechains, which can process a large number of transactions in parallel but ultimately secure them on the main Waves blockchain.