Smart Assets and Smart Account Trading Features Released on MainNet

Waves Tech
Waves Protocol
Published in
3 min readDec 13, 2018

Miners need to vote to activate two proposals before this functionality goes live.

After a month of intensive testing, Waves team is very glad to announce we are releasing two new and related features on MainNet: Smart Assets and Smart Account Trading. We’re pleased to say the testing process went well and are thrilled we can offer these features to the community so quickly!

What’s in this update?

Two major features are included in this release, as we continue to build out our smart contract capabilities:

  • Smart Assets are implemented as Feature #9
  • Smart Account Trading is implemented as Feature #10

Miners: please vote to activate these features! 80% miner approval is required in each case. You can track the progress of feature voting here: http://dev.pywaves.org/activation/.

In addition, we are including several minor features in this update — mainly bug fixes and security improvements. These include:

  • Duplicate variable names are now allowed in scripts (previously we had disabled this due to an error)
  • We have provided a method for getting balance distribution at a given block height (up to 2,000 blocks down): GET /assets/{assetId}/distribution/{height}
  • We have expanded the list of weak (small order X25519 point) public keys
  • Decreased block ban time in configuration — we recommend using 5 minutes instead of 1 day
  • Optimisation in microblock verification procedure
  • Various other bug fixes

What are Smart Assets?

Smart Assets use the same approach to tokens that Waves Smart Accounts do for addresses. A Smart Asset is an asset with an attached script that places conditions on every transaction made for the token in question. Here are some further details:

The Smart Asset script is specified using IssueTransaction. The fee for this is 1 WAVES. A Smart Asset’s script cannot be set to null.

The script validates each transaction involving this asset. Each validation of a transaction by a Smart Asset’s script increases the transaction fee by 0.004 WAVES. For example, if a regular tx is made for a Smart Asset, the cost is 0.001 + 0.004 = 0.005 WAVES. If an exchange transaction is made, the cost is 0.003 + 0.004 = 0.007 WAVES.

Assets that have already been issued without a script cannot become scripted. However, it is possible to create a token that behaves as non-scripted asset but that can be upgraded later, by issuing an asset with a script: ‘true’.

A Smart Asset’s script can be changed using SetAssetScriptTransaction (the fee to change the script is 1 WAVES). Only the Issuer can change an asset’s script. Sponsorship of Smart Assets is prohibited.

For more detailed information and examples of Smart Asset scripts, see documentation at https://docs.wavesplatform.com/en/technical-details/smart-assets.html. Differences between Smart Accounts and Smart Assets are described here: https://forum.wavesplatform.com/t/smart-assets-distinctions/6091

Smart Account Trading

When the Smart Account feature was first released, the use of exchange transactions containing orders from Smart Accounts was prohibited. With the Smart Account Trading feature we enable the use of exchange transactions from these addresses. The Matcher has also been updated to receive and validate orders from Smart Accounts. You can find a more detailed explanation in this forum post: https://forum.wavesplatform.com/t/trading-with-smart-accounts/3021.

Yet another big thank you goes out to our community from the Waves team for your help in testing these ground-breaking new features, and (we hope) for voting for their approval!

--

--

Waves Tech
Waves Protocol

Waves Tech is a powerful blockchain-agnostic ecosystem focused on inter-chain DeFi, the embodiment of technological freedom for blockchain-based finance.