Waves Smart Contracts. What to Expect and When

in #cryptocurrency7 years ago (edited)

Wave's Smart Contracts. What to Expect and When

Cryptocurrencies are blockchain cash, but the same decentralised approach can be taken to computer code — resulting in apps that run trustlessly and automatically, with no chance of failure.

Bitcoin has established blockchain technology as a trustless way of sending cash online. But ‘cash’ in this context simply means information. That information can represent other things too, giving the blockchain a far wider set of use cases than financial transfers alone. In addition to making peer-to-peer payments, it’s also possible to write and run software on the blockchain.

Smart Contracts

Ethereum was the first smart contracts platform, and is still the best known and largest by market cap. It features so-called ‘Turing-complete’ smart contracts — which means that theoretically Ethereum can be used to run any programme. There are many projects being developed on Ethereum, from multi-sig wallets to sophisticated e-commerce platforms that aim to replace marketplaces like Amazon and eBay with a decentralised model.

Whilst Ethereum’s approach to smart contracts makes them extremely powerful, they’re also inaccessible to the vast majority of everyday users. Anyone who wants to create any smart contract functionality has to know how to programme them. Moreover, the costs of getting it wrong can be enormous. There have been a number of thefts and exploits as a result of badly-written smart contracts, some resulting in tens of millions of dollars in lost funds.

The Waves Approach

Smart Contracts. The Waves approach

Waves is taking a different approach to smart contracts. Whilst the platform is ultimately planning to develop highly-versatile Turing complete contracts, their initial iteration will include limited functionality. The idea is to release smart contracts that cover the most popular use cases, built into the client so that everyone can deploy them, regardless of whether they have any programming knowledge or understanding of smart contracts themselves.

This basic functionality will include account controls such as multi-sig accounts and the ability to lock tokens for a certain amount of time, to prevent them being moved. This will cover the majority of everyday usage safely.

Once this mass-use functionality has been thoroughly tested, Waves will release Turing-complete smart contracts. Like Ethereum’s smart contracts, these can be used for just about any use case. Also, smart accounts will be introduced.

Smart Accounts

A conventional account can only sign transactions before sending them to the blockchain. The idea of a smart account is the following: before the transaction is submitted for inclusion in the next block, the account checks if the transaction meets certain requirements, defined in a script. The script is attached to the account so the account can validate every transaction before confirming it.

The main requirement for our smart accounts is that they can be run for the price of normal transactions with a predefined fee, without any additional ‘gas’ or other costs. This will be possible due to the statically predictable execution time. Since Waves has been built on top of an account-based model like Ethereum or Nxt (instead of Bitcoin’s input/output system), we can set security scripts on accounts.

In our vision, smart accounts cannot send transactions themselves or transfer funds according to given conditions but can read data from the blockchain (for example, the height of a block or signatures from the transaction) and return the result of a predicate obtained on the basis of this data.

The language of smart accounts should be as simple as possible so that it is accessible to beginners or ordinary users who are not familiar with a particular language paradigm. Language grammar will be human-readable and user-friendly. We are consciously not going to provide users with the ability to write functions, recursions, and loops of indefinite nesting. We have explained earlier that we avoid constructions whose complexity cannot be predicted in advance and that cannot be executed in a definite number of steps. That is the reason why we also have no collections or ‘for each’ constructions.

Smart Assets

If we plan to apply constraints on all operations for a specific asset, we cannot use a smart account. In our paradigm, we have smart assets for this purpose: the script will be attached to the asset and will work in a similar way. Transactions for such assets are valid only if the script returns True. For example, a script can verify proofs from a transaction, check if a notary/escrow approves the transaction, and that operations with the asset aren't locked for a specified time. The script for the token is invoked upon the following operations with an asset:

  • TransferTransaction
  • MassTransferTransaction
  • ReissueTransaction
  • BurnTransaction

Waves Smart Contracts Implementation

Use Cases

The main focus for the first version of smart accounts will be different security, integration, and crowdfunding cases. An example of a security use case is multi-signature accounts. A multi-signature account is useful for contracts that need to be jointly owned, or shared, or when binding an agreement between multiple parties, or all of these. With its help, counterparties who do not trust each other can freeze a certain amount of tokens on the blockchain until the condition of having the required number of participants’ signatures is fulfilled.

The next group of use cases is integration, such as Oracles. An Oracle is the application that is responsible for connection to a given data source. It can place externally-sourced data on the blockchain as a series of transactions, but cannot change the data in them. Other people can receive money from a given account if this data meets the right conditions. Conversely, if we want to remove a third party from an operation, a smart contract can be involved in the creation of an Atomic Swap — the next step in decentralisation. An Atomic Swap is a direct trade between two users of different cryptocurrencies, the honesty of which is guaranteed by a single contract in all relevant blockchains that cancels the transfer of funds back to the participants if the agreed exchange has not taken place. (‘Atomic’ in this definition means that an operation will either be performed completely, or it will not be executed at all.)

Crowd sale processes like selling tokens on an exchange can be implemented trustlessly on Waves DEX without smart contracts. However, smart accounts can help investors after an ICO. For example, they can be used to control fund use via escrow, token holder voting, etc.

Waves Smart Contracts. Key Features

You can download the whitepaper on the Waves Smart Contracts and read more about them on our website.


Join Waves Community
Read Waves News channel
Follow Waves Twitter
Subscribe to Waves Facebook

Sort:  

Click the Play button below and start listening to the audio version of this article.

Great service 👍🏼
All respect ✊

Gre88

this will boost the competition between players doing a smart contracts platform, and waves is entering in the arena and hope this will make smart contracts more efficient, secure and a friendly-user. :)

👋

Waves is doing great. I just have one question, can someone compare waves with bitshares? If you use both.

😎

Waves is easy to get started in them of UI/UX for newbies who just wnat to issue a token and share among them. In terms of Dex functionnalities, Bitshares some cool features that company will want to have: Accnt permissions, hierarchical accnt mgmt, smartcoin, whitelisting/blacklisting accnt (good in case of regulation requirement), referal program. Many start-up and company could easily issue and manage their share on Bitshares. It's very powerfull when u good deep. It's a real DAC. Bitshares just need UI/UX to make it wow...that what some entrepreneur will realize and build better interface like Wave.

Crypto is so interesting everyday learning new things

Same to me ( learning new every crypto day ) lol

waves moon?

👋

WAVES is awesome and I fully expect it to go up at least 10x in the next few months!!

I would be happy with x3 at this stage (a fellow hodler).

This post, with over $50.00 in bidbot payouts, has received votes from the following:

appreciator payout in the amount of $140 USD.
boomerang payout in the amount of $61 USD.
upme payout in the amount of $59 USD.
buildawhale payout in the amount of $58 USD.
rocky1 payout in the amount of $57 USD.
upmyvote payout in the amount of $43 USD.
mercurybot payout in the amount of $13 USD.

For a total calculated bidbot upvote value in the amount of $432 USD.

This information is being presented in the interest of transparency on our platform @wavesplatform and is by no means a judgement of your work.

Holy shit, I'M not sure the bot creator sees this but that's an amazing idea.

I have 6 Bitcoin in My Wallet.
I am From Bangladesh..
how can I sell this?

I have some coin in my waves wallet I don't know how can I sell it

thank you for info

I think smart contracts have gotten a bit of a bashing because of their inflexibility that has caused funds to be locked up or stolen just because of some bug in the code of the contract.
This will hamper adoption.

Imagine the first cars were Ferraris. Many would have shied away from driving after seeing the first spectacular high speed crashes. The impression of driving in general would be damaged and maybe cars would be relegated to just fringe oddities!

Coin Marketplace

STEEM 0.22
TRX 0.20
JST 0.034
BTC 99006.74
ETH 3331.65
USDT 1.00
SBD 3.09