waves_logo Docs
  • Why Waves
    Why Waves
  • Waves Basics
    Waves Basics
  • Account
    • Creating Account
      Creating Account
    • Address
      Address
    • Account Balance
      Account Balance
    • Account Data Storage
      Account Data Storage
    • Alias
      Alias
    • dApp and Smart Account
      dApp and Smart Account
    Account
  • Token (Asset)
    • Non-Fungible Token
      Non-Fungible Token
    • Smart Asset
      Smart Asset
    • Token ID
      Token ID
    • WAVES
      WAVES
    Token (Asset)
  • Transaction
    • Transaction Fee
      • Sponsored Fee
        Sponsored Fee
      Transaction Fee
    • Signature and Proofs
      Signature and Proofs
    • Transaction Types
      • Burn Transaction
        Burn Transaction
      • Create Alias Transaction
        Create Alias Transaction
      • Data Transaction
        Data Transaction
      • Exchange Transaction
        • Order
          Order
        Exchange Transaction
      • Genesis Transaction
        Genesis Transaction
      • Invoke Script Transaction
        Invoke Script Transaction
      • Issue Transaction
        Issue Transaction
      • Lease Cancel Transaction
        Lease Cancel Transaction
      • Lease Transaction
        Lease Transaction
      • Mass Transfer Transaction
        Mass Transfer Transaction
      • Reissue Transaction
        Reissue Transaction
      • Set Asset Script Transaction
        Set Asset Script Transaction
      • Set Script Transaction
        Set Script Transaction
      • Sponsor Fee Transaction
        Sponsor Fee Transaction
      • Transfer Transaction
        Transfer Transaction
      • Update Asset Info Transaction
        Update Asset Info Transaction
      • Ethereum-like Transaction
        Ethereum-like Transaction
      Transaction Types
    • Transaction Validation
      Transaction Validation
    Transaction
  • Mainnet, Testnet, Stagenet
    Mainnet, Testnet, Stagenet
  • Node
    • Leasing
      Leasing
    • Generator’s Income
      Generator’s Income
    • Monetary Policy
      Monetary Policy
    Node
  • Block
    • Block Generation
      • Base Target
        Base Target
      • Generation Signature
        Generation Signature
      Block Generation
    • Block Height
      Block Height
    • Block Signature
      Block Signature
    • Block Timestamp
      Block Timestamp
    • Transactions Root Hash
      Transactions Root Hash
    • Genesis Block
      Genesis Block
    Block
  • Oracle
    Oracle
  • Protocols & Data formats
    • Cryptographic Practical Details
      Cryptographic Practical Details
    • Waves-NG Solution
      Waves-NG Solution
    • Waves-NG Protocol
      Waves-NG Protocol
    • Fair Proof of Stake
      Fair Proof of Stake
    • Blockchain Data Types
      Blockchain Data Types
    • Binary Format
      • Address Binary Format
        Address Binary Format
      • Alias Binary Format
        Alias Binary Format
      • Block Binary Format
        Block Binary Format
      • Network Message Binary Format
        • Block Message Binary Format
          Block Message Binary Format
        • Checkpoint Message Binary Format
          Checkpoint Message Binary Format
        • Get Block Message Binary Format
          Get Block Message Binary Format
        • Get Peers Message Binary Format
          Get Peers Message Binary Format
        • Get Signatures Message Binary Format
          Get Signatures Message Binary Format
        • Handshake Message Binary Format
          Handshake Message Binary Format
        • Peers Message Binary Format
          Peers Message Binary Format
        • Score Message Binary Format
          Score Message Binary Format
        • Signatures Message Binary Format
          Signatures Message Binary Format
        • Transaction Message Message Binary Format
          Transaction Message Message Binary Format
        Network Message Binary Format
      • Order Binary Format
        Order Binary Format
      • Transaction Binary Format
        • Burn Transaction Binary Format
          Burn Transaction Binary Format
        • Create Alias Transaction Binary Format
          Create Alias Transaction Binary Format
        • Data Transaction Binary Format
          Data Transaction Binary Format
        • Exchange Transaction Binary Format
          Exchange Transaction Binary Format
        • Genesis Transaction Binary Format
          Genesis Transaction Binary Format
        • Invoke Script Transaction Binary Format
          Invoke Script Transaction Binary Format
        • Issue Transaction Binary Format
          Issue Transaction Binary Format
        • Lease Cancel Transaction Binary Format
          Lease Cancel Transaction Binary Format
        • Lease Transaction Binary Format
          Lease Transaction Binary Format
        • Mass Transfer Transaction Binary Format
          Mass Transfer Transaction Binary Format
        • Reissue Transaction Binary Format
          Reissue Transaction Binary Format
        • Set Asset Script Transaction Binary Format
          Set Asset Script Transaction Binary Format
        • Set Script Transaction Binary Format
          Set Script Transaction Binary Format
        • Sponsor Fee Transaction Binary Format
          Sponsor Fee Transaction Binary Format
        • Transfer Transaction Binary Format
          Transfer Transaction Binary Format
        • Update Asset Info Transaction Binary Format
          Update Asset Info Transaction Binary Format
        • Ethereum-like Transaction Binary Format
          Ethereum-like Transaction Binary Format
        Transaction Binary Format
      • Transaction Proof Binary Format
        Transaction Proof Binary Format
      Binary Format
    • Validation Rules
      Validation Rules
    Protocols & Data formats
  • Glossary
    Glossary
      • English
      • Русский
      On this page
        • Custom Token Parameters
        • Token Issue
        • Token Operations
        • Tokens of Other Blockchains
      waves_logo Docs

          # Token (Asset)

          Token is a digital asset on the blockchain. A token can be used:

          • as a cryptocurrency to pay for goods and services within a project, as well as for crowdfunding;
          • as an object or resource in games etc.

          A token can represent a physical or an intangible object.

          The words “token” and “asset” are used interchangeably in the Waves ecosystem.

          WAVES is the native token on the Waves blockchain; more about it in the WAVES article.

          All other tokens are custom tokens issued on behalf of some account. Any account that has enough WAVES to pay a fee can issue its own token. The new token is immediately available:

          • for transfers between accounts,
          • for trading on the WX Network exchange developed by the third-party team from the community (except for NFTs; smart assets trading is temporarily unavailable),
          • for payments attached to dApp script invocation.

          # Custom Token Parameters

          Custom token example: https://wavesexplorer.com/assets/DG2xFkPdDwKUoBkzGAhQtLpSGzfXLiCYPEzeKH2Ad24p

          Below is an example of JSON representation returned by the GET /assets/details/{assetId} method of Node REST API:

          {
            "assetId": "DG2xFkPdDwKUoBkzGAhQtLpSGzfXLiCYPEzeKH2Ad24p",
            "issueHeight": 1806810,
            "issueTimestamp": 1574429393962,
            "issuer": "3PC9BfRwJWWiw9AREE2B3eWzCks3CYtg4yo",
            "issuerPublicKey": "BRnVwSVctnV8pge5vRpsJdWnkjWEJspFb6QvrmZvu3Ht",
            "name": "XTN.",
            "description": "Neutrino Index",
            "decimals": 6,
            "reissuable": false,
            "quantity": 999999999395940000,
            "scripted": false,
            "minSponsoredAssetFee": 150000,
            "originTransactionId": "DG2xFkPdDwKUoBkzGAhQtLpSGzfXLiCYPEzeKH2Ad24p"
          }
          
          Field Description
          assetId Token ID: base58 encoded byte array. The token ID is calculated as a hash of the token parameters upon issue. See also the Token ID article
          issueHeight Blockchain height (the sequence number of the block) at which the token is issued
          issueTimestamp Token issue timestamp: Unix time in milliseconds
          issuer Address of issuer account: base58 encoded byte array
          issuerPublicKey Public key of issuer account: base58 encoded byte array
          name Token name. From 4 to 16 bytes (1 character can take up to 4 bytes)
          description Token description. From 0 to 1000 bytes
          decimals Number of decimal places, from 0 to 8
          reissuable Reissue availability flag
          quantity Total supply of token on the blockchain specified in atomic units. From 1 to 9,223,372,036,854,775,807. Total supply can change as a result of reissue or burning, see Token Operations below
          scripted There being a script: true for smart asset, false for regular token. More about smart assets
          minSponsoredAssetFee For sponsored asset only: an amount of asset that is equivalent to 0.001 WAVES More about sponsorship
          originTransactionId ID of the transaction that issued the token: base58 encoded byte array
          scriptDetails For smart asset only: asset script and its attributes

          # Atomic unit

          The amount of token is displayed differently in UIs and in the JSON representation used by the Node REST API. In API requests and responses, amount values are integers indicated in atomic units to avoid precision issues in floating-point calculations.

          An atomic unit is the minimum fraction (“cent”) of a token, it is equal to 10–decimals.

          The amount of token in JSON is the real quantity multiplied by 10decimals.

          For XTN in the example above:

          • decimals = 6,
          • atomic unit is 1/1,000,000 XTN.
          • "quantity": 999999999395940000 corresponds to 999,999,999,395.94 XTN in UIs,
          • "minSponsoredAssetFee": 150000 corresponds to 0.15 XTN.

          # Token Issue

          To issue a token, you have to create an Issue transaction within the token parameters:

          • name
          • description
          • decimals
          • quantity
          • reissuable
          • script (for issuing a smart asset).

          Transaction example

          There are the following options to send the transaction:

          • In the WX Network app developed by the third-party team from the community. See the Create Asset article in the WX Network documentation.
          • In Waves IDE , see the Issuing Smart Asset section.
          • Using one of the client libraries. See also the examples in the How to Create Transaction and Send It to Blockchain article.

          The transaction fee is 1 WAVES for a regular token or 0.001 WAVES for a non-fungible token (NFT).

          Moreover, the token can be issued by the dApp script as a result of the Invoke Script transaction when the callable function result contains the Issue action. The minimum fee for Invoke Script transaction is increased by 1 WAVES for each non-NFT token issued.

          # Token Operations

          • Transfer to another account

            Can be done via a Transfer transaction or a Mass Transfer transaction.

            A dApp script can transfer the token via a ScriptTransfer script action as a result of an Invoke Script transaction.

          • Exchange (trade deal)

            Three accounts can participate in the exchange: one user creates an order to buy a token, the other creates an order to sell a token. The matcher combines buy and sell orders with suitable parameters and creates an Exchange transaction. For more information on the matcher, see the WX Network documentation .

          • Burning

            Decreases the amount of token on the account and thereby the total amount of the token on the blockchain. Any token owner can burn it, not only the issuer. It is impossible to burning WAVES.

            Can be done via a Burn transaction.

            A dApp script can burn the token via a Burn script action as a result of the Invoke script transaction.

          • Payment to dApp

            An Invoke Script transaction can contain up to two payments to the dApp. Payment amount and token are available to the callable function.

          # Operations Available Only to Issuer

          The following token operations can only be performed by the account that issued the token:

          • Sponsorship setup

            The token issuer can enable sponsorship, that is, allow all users to pay a fee in this token (instead of WAVES) for Invoke Script transactions and Transfer transactions. More about sponsorship

            Enabling or disabling sponsorship can be done via a Sponsor Fee transaction.

            A dApp script can set up sponsorship using a SponsorFee as a result of the Invoke script transaction.

          • Reissue

            Increases the amount of token on the blockchain. The reissuable field of token determines whether the token can be reissued.

            Can be done via a Reissue transaction.

            A dApp script can reissue the token via a Reissue script action as a result of the Invoke script transaction.

          • Replacing the asset script

            Can be done via a Set Asset Script transaction. If the token is not a smart asset, that is, the script was not attached when the token was issued, then it is impossible to attach the script later.

          • Modifying the token name and / or description

            Can be done via an Update Asset Info transaction.

          # Tokens of Other Blockchains

          A token issued on another blockchain cannot be used directly on the Waves blockchain. A new token representing the original one can be issued on the Waves blockchain, and a gateway that pegs the two tokens 1:1 can be deployed. For example, gateway for a ERC20 token can be created using the Waves-ERC20-Gateway framework.

          dApp and Smart Account
          Non-Fungible Token
          dApp and Smart Account
          Non-Fungible Token