Skip to main content

Stardust for iota.js: Value Transactions

This tutorial will get you acquainted with the structure and functionality of transactions in IOTA's Stardust protocol in the Shimmer network using iota.js primitives to issue value transactions.


Starting from Chrysalis, IOTA is a UTXO-based (Unspent Transaction Output) Ledger. Each UTXO, also known as output, has an associated number of tokens that determines its value. Thus, the permanent data on the ledger is composed of a set of records (outputs) that can be unlocked by the owner of its associated address, i.e., the one who knows the address' private key.

There are different output types. This tutorial series will only focus on value outputs known as IBasicOutput. Outputs are generated by transactions that unlock and consume already existing outputs. When a transaction consumes them, these outputs turn into inputs and generate new outputs. At pruning time, consumed outputs will be removed by Nodes. However, they might be stored permanently by Nodes that have enabled the INX Chronicle plugin. Each output in the Ledger has a unique identifier as it has each transaction that mutates the Ledger state by manipulating other outputs.

Storage Costs and Deposits

UTXOs need to be stored by Hornet Nodes, so there is a storage cost. The Stardust protocol defines a parameter, named "vByte cost", that establishes the cost of storage of each "virtual byte" in Glow (one Glow corresponds to 0.000001 Shimmer). As each output consumes a number of vBytes in the Ledger, it is a necessary condition for an output to cover the vByte cost with its value in the Ledger. This means that Nodes will reject transactions whose outputs do not meet this condition. For instance, in the current Shimmer network, you cannot send 1 Glow to a new output because the storage deposit cost of such an output will be higher. The size of a UTXO and its cost depends structurally on the type and any additional data it may carry.