The first release of smart contracts will focus on account controls, making Waves more secure, powerful and flexible.
Unlike platforms such as Ethereum,Waves is taking a phased approach to its smart contract releases. The first iteration of smart contracts will be a non-Turing complete implementation that will make advanced business logic available, but without the vulnerabilities of fully Turing complete contracts. These will enable several forms of account controls, which will be accessible directly from the Waves client. So what kind of operations will it be possible to carry out with Waves’ smart accounts?Multi-sig
One of the first and likely most immediately popular use cases for Waves smart contracts will be multi-sig accounts. These will require two or more users to approve a transaction before a transfer is made. This is a hugely important security feature, and makes it possible for teams to manage their own finances securely and without giving control to any one individual. For example, it will be possible to create an account with five different members, any three of whom are needed to approve a transaction before it is executed.
This will be particularly useful for token sales, since funds can be held safely pending deployment. Given the high-profile problems with some Ethereum implementations of multi-sig, Waves has deliberately taken a more cautious and simple approach to such basic account controls.Freezing
Another useful application will be token freezing. This involves sending a token to a user, but ensuring it remains non-transferable and unspendable for a period of time. The most obvious use case for this is as a vesting mechanism or for team/contractor payments after an ICO takes place. Most initiatives reserve a proportion of tokens for the core team and the external professionals who help them raise money. This is a smart way of doing business since if the team does its job well the tokens will be worth more in the future. Interests are aligned, just like vesting a new member of a startup with equity in the company.
However, it’s important to avoid the (unfortunately common) problem of recipients taking a short-term approach and dumping their tokens on the market, depressing the price and leading to adverse sentiment and publicity. Freezing tokens for a period of time (perhaps 6–12 months) allows initiatives to pay their contributors in tokens but to ensure these only constitute long-term incentives.Balance sweeping
A further application of account controls is balance management. A user might want to make regular monthly payments, but to ensure that their account does not fall below a certain balance. Or they might want to keep a fixed amount of funds in one address and move everything above that to a separate account.
For example, you might have an address that contains 10,000 WAVES leased to a mining pool. Once a month, you sweep all the WAVES and tokens (e.g. MRT) earned by that account into a separate address, which you sell for regular income.
These are just some of the account controls that will be available based on the first iteration of Waves smart contracts. Many further use cases will be developed, with more sophisticated logic possible with the release of Turing complete contracts.