$2.74 -1.03%

We've just published a new article about Smart Contracts and RIDE's use cases for businesses in Waves blog!

Application of Waves Smart Accounts: from Auctions to Customer Loyalty Schemes

Blockchain is often associated solely with cryptocurrencies, but application areas for DLT are far broader. One of the most promising directions for blockchain application is smart contracts: code that is executed automatically and that doesn’t require trust between the parties who agree it.

RIDE: a smart contract language

Waves has developed a special language for smart contracts, RIDE. Complete documentation is available here.

A RIDE-based contract is a predicate and returns either “true” or “false”. Respectively, a transaction is either added to the blockchain or rejected. A smart contract fully guarantees the execution of conditions set out in it. At this point, the option of generating transactions from a RIDE contract is not available.

Currently, Waves offers two types of smart contracts, smart accounts and smart assets. A smart account is a user’s regular account, for which a script can be set that controls all transactions. A Smart Account’s script could look, for instance, like this:

match tx { case t: TransferTransaction | MassTransferTransaction => false case _ => true }

tx is a processed transaction that we allow, using the pattern matching tool, unless it is a TransferTransaction. In RIDE, pattern matching is used for checking the type of transaction. All existing [transaction types] (https://docs.wavesplatform.com/en/waves-environment/waves-protocol/transactions-structure.html) can be processed in a Smart Account’s script.

A script can also use variables, “if-then-else” statements and other methods of proper verification of conditions. To facilitate contracts’ provable termination and complexity (value) that can be predicted prior to the contract’s execution, RIDE doesn’t have cycles or jump operators.

Among Waves accounts’ other features is the state. An indefinite number of pairs (key, value) can be added to an a...

Continue on blog.wavesplatform.com
Recent news
WAVES -1.03% · blog.wavesplatform.com · 8h

Tradisys Re-Launches Fhloston Paradise

In the new version of the blockchain game, which is inspired by the movie ‘Fifth Element,’ the chances of winning will be much higher. Do you remember the blockchain game Fhloston Paradise, which…