This article is part of the ongoing “Origin” series that tracks the emergence and evolution of projects in the cryptocurrency-based smart contract ecosystem. Today we’ll look at how Waves could challenge today’s dominant platform, Ethereum.

The Waves Platform aims to address some key limitations of existing blockchains in the areas of scalability and user experience. It implements a Proof of Stake (PoS) flavor of Bitcoin-NG’s scaling solution and provides some novel mechanisms, such as integrated fiat gateways, token launcher, and decentralized exchange, that greatly simplify the process of issuing and trading custom tokens. Waves is applying its user-focused philosophy to roll out smart contract functionality, starting with a limited and possibly more secure offering that could provide a compelling alternative to Ethereum’s.

The Waves Platform was founded in early 2016 by a theoretical physicist Sasha Ivanov, whose appreciation for gravitational waves reportedly inspired the name. The project’s philosophical and technical roots come from the Nxtblockchain project, upon which Ivanov had built decentralized businesses such as Coinomat, which was launched in 2013. Ivanov saw potential in Nxt’s innovative and powerful features but, frustrated by the platform’s limitations and the project’s direction, he decided to create the Waves platform to better serve the needs of businesses building and operating decentralized applications.

Waves held an ICO that ran from April — June of 2016 and raised 30,094 Bitcoins. At the time, this was equivalent to about $16 million USD, making Waves the third largest crowdfunded cryptocurrency project behind Ethereum and The Dao. After the completion of the ICO, Waves was able to quickly launch its mainnet by leveraging ideas and code from multiple projects including Nxt, Scorex, SuperNet/Komodo, and BitShares. A large development budget enabled Waves to quickly roll out important UX and scalability features, such as an integrated decentralized exchange, gateways to support the trading of external fiat and blockchain currencies, and an implementation of the Bitcoin-NG protocol.

At the end of 2017, Waves announced the launch of Waves Lab incubator to provide advice, expertise, and resources to projects wishing to build on Waves. These developments have attracted dozens of projects from a wide range of industries and countries to launch on the Waves platform. At the time of writing Waves is the second most popular platform next to Ethereum for hosting ICO tokens.

Waves recently announced its first phase support of smart contacts, which will provide built-in support for the most common use-cases to make deploying them simpler and more secure than rolling your own. The next phase will support all possible use cases by implementing Turing-complete smart contracts. With this strategy Waves could become the preferred platform for issuing custom tokens and ultimately challenge Ethereum to become the dominant platform for all smart contract use cases. To get a better sense of how this might happen let’s take a closer look at how Waves technology compares to that of Ethereum.

Scalability

Waves once claimed to be the “fastest decentralized blockchain” platform in the world. This claim was based on a stress test of the Waves testnet in which an average throughput of 33 tx/sec and a peak throughput 283 tx/sec was measured. From this data, Waves extrapolated an expected throughput of 100 tx/sec, which is anywhere from 8–14 times the current capacity of Ethereum’s non-sharded, Proof of Work (PoW) implementation.

Waves, like most platforms we’ve looked at thus far in this series, implements a PoS consensus algorithm in which all stakeholders can participate and earn rewards, but block production is handled by a small subset of stakeholders who are able to consistently stay online to process transactions and blocks. However, the set of Waves block producers isn’t elected by vote, as in delegated Proof of Stake (DPoS) systems, but through a stake leasing system called Leased Proof of Stake (LPoS).

LPoS effectively serves the same purpose as PoW mining pools, allowing users with a small stake (and thus a small probability of winning the right to produce a block) to pool funds and share profits, so that payouts are more consistent overtime. Instead of contributing hash power to the pool, users lease WAVES tokens to full nodes (analogous to a mining pool operators) that do the work of validating transactions and maintaining the ledger. Participation in consensus is open to any full node that has at least 1000 WAVES (currently about 6K USD) leased to it. The node gets selected to produce blocks with a probability proportional to its total leased stake, and earns transaction fees which it normally shares with its lessors.

Unlike Ethereum’s Casper, where deposits are locked up, in Waves leased funds can be spent or leased to a different node at any time. The Waves Lite Client allows users to lease their WAVES balances to full nodes with two clicks, and terminate these leases just as easily. Once funds are leased they begin earning rewards after 1000 blocks (about 16 hours). The ability to easily redirect one’s stake toward any node that wishes to mine can help address the issues of voter apathy and cartel formation common to many DPoS systems, where a fixed number of delegates are elected by user votes and hold tenure between voting cycles.

Much like PoW consensus, Waves miners earn the right to produce blocks by broadcasting a solution to a cryptographic puzzle, but instead of expending energy constructing billions of solutions, they periodically perform a very small amount of computation to check if they are eligible to produce a block at the current time. Unlike some PoS systems where every time interval is associated with a block producer, in Waves LPoS a long and variable time may pass before some node becomes eligible and produces a block. During this time transaction serialization is indefinitely paused, resulting in a relatively low transaction throughput (on par with PoW systems).

To address this, Waves has implemented the Bitcoin-NG protocol for scaling. Bitcoin-NG allows transactions to be continuously serialized throughout the long and variable periods of leader selection. The miner who finds a solution to a cryptographic puzzle produces a single key block, which contains their qualifying solution. This grants the miner the right to extend that block with a sequence of microblocks that serialize additional transactions and earn the miner transaction fees until a new leader emerges by publishing a valid key block on the latest microblock. To incentivize miners to build key blocks on the longest chain of microblocks rather than serialize existing microblock transactions into their own microblocks, Bitcoin-NG splits the transaction fees in a chain of microblocks between the miner that produces it (40%) and the miner that builds on it (60%).

Concerns have been raised about certain protocol deviations not being properly disincentivized in Bitcoin-NG because the production of microblocks is relatively free (in terms of electricity in PoW systems). However, since Waves-NG is a PoS system without deposit slashing, all block production is cheap, and protocol deviations are disincentivized only by the threat of losing transaction fee revenue. The PoS implementation that Waves inherited from NXT is vulnerable to multibranching attacks such as the nothing at stake problem.

In June 2018, Waves is planning to activate a new and improved PoS implementation that makes these kinds of attacks less effective. Rather than introduce major changes like requiring miner deposits, the Waves team is trying to improve their current PoS algorithm with a few simple changes that they hope will sufficiently disincentivize these attacks.

For years Ethereum has been planning to implement a pure PoS consensus algorithm that is highly resilient against such attacks and would likely increase transaction throughput. However, with over 70 billion USD in assets at risk, evolution toward that goal has been necessarily slow and cautious. The first small step in gaining experience with PoS on Ethereum will come with the deployment of Casper The Friendly Finality Gadget, which provides a PoS layer on top of PoW consensus and no increase in transaction throughput.

The more immediate performance boost for Ethereum will likely come from sharding. Despite a recent change in direction, the design for sharding is now “well-established” according to Vitalik Buterin, who pointed to the existence of proof of concept code as evidence that sharding is nearing deployment. The first phase rollout of sharding is slated to add 100 additional high capacity chains to the Ethereum mainnet, which would increase on-chain throughput by at least 100x. So, when sharding goes live on the Ethereum mainnet, Ethereum will most likely surpass Waves in transaction throughput, despite using PoW to secure the main chain. For now Waves maintains a distinct advantage of having a live mainnet capable of processing an order of magnitude more transactions per second than Ethereum’s.

Another scaling solution that may come to Ethereum even sooner than sharding is Plasma. Plasma is a specification for adding high capacity baby chains that are secured by smart contracts on the main chain. Practical implementations, such as Plasma Cash are being developed and launched. One interesting implementation is Altcoin’s use of Plasma to develop a high speed, decentralized exchange for cryptocurrency tokens. If this project or one like it succeeds, it could narrow or eliminate a key advantage Waves currently holds over Ethereum, which is providing an integrated, low cost, high speed token exchange with fiat onramps.

Decentralized Exchange

One of the novel features of the Waves platform is a built-in decentralized exchange (DEX) that supports direct swaps of custom tokens issued on the platform. It is designed to provide the speed of a centralized exchange with the security of a decentralized exchange. Specifically, this means orders are matched with the same speed and efficiency of centralized exchange, but the exchange never has custody of the tokens, avoiding the creation of the kind of honeypot that attracts hacks to centralized exchanges.

This is achieved by combining a centralized Matcher with decentralized settlement on the blockchain. Users who wish to exchange tokens submit signed limit orders to the Matcher, who maintains an order book. When the Matcher finds pairs of orders that satisfy each other’s limits (e.g. Alice will purchase 1000 XRP for at most 1.1 ETH and Bob will purchase 1 ETH for at most 1100 XRP) it combines them into a settlement transaction that it submits to the blockchain. Settlement is not executed in smart contracts (as in Ethereum), but the token swap is performed by executing the built-in Exchange Transaction. Having support for token exchange integrated into the protocol layer makes the settlement process more efficient and cheaper to execute than through a series of smart contracts at the application layer.

Having a centralized Matcher addresses some common problems related to race conditions that occur in decentralized exchanges on Ethereum. Although Waves is designed to allow for multiple matchers, every order must specify a specific Matcher, which eliminates race conditions by ensuring that only one Matcher can successfully execute an Exchange Transaction containing that order. I was unable to find any documentation on how Waves plans to thwart denial of service attacks on Matchers.

With multiple Matchers maintaining exclusive order books, practical liquidity issues can arise. A single Matcher that maintains a book of all orders in the system would be able to perform optimal order matching and create the most efficient market. Conversely, if liquidity is fragmented across the order books of several Matchers, market efficiency is reduced, and can result in degraded user experience and price volatility that can wreak havoc on crowdfunded projects. The Liquidity Wave and BlackBot projects are aimed at adding liquidity and reducing price volatility in the DEX, but guaranteeing liquidity for tokens post ICO remains an issue for Waves.

Liquidity is also a practical concern for ERC20 tokens traded through Ethereum’s myriad of decentralized exchanges and protocols. The Bancor project has developed a novel approach to adding liquidity using smart contracts to act as counterparty to buyers and sellers, adjusting prices based on demand. The viability of Bancor’s implementation has been questioned, but Bancor has become one of the most heavily used DEXs on Ethereum. Bancor currently handles more than 4x the volume of the Waves DEX.

Today, decentralized exchanges account for just a small fraction of overall trade volume, which is dominated by centralized exchanges. The first implementations are experiencing a variety of problems, but the technology is evolving rapidly due to a tremendous amount of desire to realize a viable system. High speed DEX’s built on Plasma chains and layer 2 payment channels are just a couple of examples of innovation happening in the Ethereum ecosystem right now.

Ethereum’s choice to be a featureless platform has made the development of a viable DEX more difficult than it is on Waves, where token exchange is an inexpensive built-in feature. However, this choice also enabled unfettered innovation by an unlimited number of competing and cooperating projects. If the decentralized exchange of tokens turns out to be the next killer blockchain app, then the platform that provides the first adequate solution could attract a significant number of investors and token issuers and ultimately benefit from the network effects that Ethereum currently enjoys.

Governance

Like many of the projects covered in the series, Waves touts decentralized voting as a feature of its platform. Despite being slated for a Q1 2018 delivery in the Waves Roadmap, very little public information about this or any governance feature of Waves currently exists.

In October 2017, Waves announced its participation in a collaborative effort to create a blockchain-based voting system, based on the concept of liquid democracy. The system would allow voters to cast votes directly or delegate their votes to others on an issue-by-issue basis. No subsequent information on this project appears to have been made public.

We’ll defer an in-depth comparison of Ethereum’s governance model with Waves’ to a future article when more information about Waves governance is available.

Smart Contract Security

If you’ve read any of the previous articles in this series, you already know that Ethereum’s dominance is threatened by the poor security of its smart contracts. The DAO and Parity wallet are evidence of a systematic problem: the deficiencies of the Solidity programming language that make it unsafe for smart contract programming. For a more detailed explanation, please see this expanded treatment of the subject.

The Waves approach to smart contracts appears to be a step forward in terms of smart contract security. The first phase release will provide a highly constrained scripting language that, similar to Bitcoin’s scripting language, provides a limited set of operations for constructing simple predicates that can be efficiently evaluated to determine whether or not a transaction is valid. This language is powerful enough to support many common use cases without the complexity of gas metering or the broad attack surface of a Turing complete language such as Solidity. Waves is planning to build into its client the ability to configure and deploy pre-built smart contract implementations for most popular use cases without having to write code.

One key use case that can be supported is multisig wallets. If developing this functionality with a highly constrained scripting language results in a vulnerability-free implementation that can deployed with a few clicks, this could provide a significant advantage for Waves over Ethereum. Consider the damage caused by the Solidity implementation of the popular Parity multisig wallet. Despite being implemented by a highly respected team of developers following a rigorous code review process, the Solidity code contained vulnerabilities that resulted in theft and freezing of ETH worth hundreds of millions of USD. The ongoing debate on whether and how to unfreeze those funds is as contentious as the one that resulted a permanent Ethereum community split. Such are the wide-ranging effects of using a language that is too complex for the job at hand.

The Ethereum community is working to improve the current situation by developing new, more constrained programming languages such as Bamboo, Vyper, Flint, and Pyramid-scheme that allow compilers and other analysis tools to catch a wider class of vulnerabilities before they get deployed. Although Solidity is currently the leading smart contracts language on Ethereum, it is likely that safer languages will start to gain adoption soon. Additional high profile attacks on Solidity contracts could speed this process and/or cause users to look to other platforms for safer smart contracts.

The Waves first phase smart contract implementation was launched on the Waves testnet on April 28, 2018. This deployment will allow users to experience an easier to use and lower cost option for common smart contract use cases. However, until smart contracts are deployed to the Waves mainnet (scheduled for July 2018) with real money at stake, we won’t really know for sure the extent to which security is improved by the Waves approach.

Conclusion

The Waves project contrasts itself to Ethereum by its focus on mass adoption in two specific areas that it claims are “very ripe for disruption”: crowdfunding and fiat transfers. As such the platform’s design is heavily focused on making the issuance and trading of custom tokens as easy as possible. The Waves platform includes a built-in Token Launcher that allows users with no programming experience to create and issue custom tokens that can be traded immediately on an integrated decentralized exchange. In addition to its built-in DEX, Waves supports token exchange by providing numerous fiat and cryptocurrency gateways that allow users to move these external assets in and out of Waves with less friction. By focusing development efforts on meeting the specific needs of crowdfunding projects, Waves already provides a compelling offering that has made it the second most popular platform for issuing tokens.

Although the Waves mainnet currently does not support smart contracts, the first phase implementation on the testnet indicates that basic smart contract functionality will likely be available on the mainnet by July as planned. Despite its limited capability, the simpler scripting language will allow Waves to add some key pieces of functionality including a secure multisig wallet and ERC20 gateways to enable trading of Ethereum’s ERC20 tokens in the Waves DEX. These could be the missing pieces that allow Waves to threaten Ethereum’s dominance as a crowdfunding platform. If Waves can provide a secure multisig wallet that adequately protects funds before Ethereum can, it will attract crowdfunding projects that don’t want to risk losing their funds due to Solidity vulnerabilities (i.e. all crowdfunding projects).

Crowdfunding is arguably the killer app for Ethereum at present, and a platform that provides a better user experience (including not losing funds) has a good shot at disrupting the network effects Ethereum currently enjoys as the number one ICO platform. Even though Waves lags Ethereum in many important ways and will face numerous challenges as it grows, its focus on crowdfunding and approach to smart contracts represent a clearly visible path to disruption. However, until smart contract functionality is being used on the Waves mainnet, its ability to provide a more secure, easier to use, less expensive offering remains unproven. If and when that does happen the level of threat it poses to Ethereum will likely rise. For now Waves remains a solid challenger, with promising and possibly disruptive innovations.

Thanks to @kimbimlim for input on early drafts. Thanks to David Bleznak for enlightening discussions about decentralized exchanges and liquidity.

If you’d like to support this series with an ETH donation, please send it to 0x7e83982eb92502ad5d38c400ba2af7b135469ac9

Your support allows and encourages me to devote more time to these articles and is greatly appreciated.