Skip to content

Outputs

An output is a tranche of Siacoins or Siafunds controlled by a Spend Policy. Most outputs are created by Transactions, but some are created by Blocks themselves, such as miner payouts and Foundation subsidies.

An output can only be used (or "spent") once; enforcing this rule is one of the most critical responsibilities of consensus. Sia uses a cryptographic accumulator for this purpose. Outputs that have not been spent are often referred to as "UTXOs." Outputs used to fund a particular transaction are called "inputs" to distinguish them from the outputs being created by the transaction.

Certain outputs are not immediately spendable, instead remaining locked until they "mature." These include miner payouts, Foundation subsidies, siafund claims, and File Contract payouts. This restriction minimizes the disruption caused by shallow reorgs. When a reorg occurs, the transactions in the reverted block can typically be placed back in the transaction pool, and—crucially—any children of those transactions are unaffected. This is not the case for the four output types above, so they are locked to prevent other transactions from depending on them until they are highly unlikely to be reorged.

An output can be spent within the same block that created it; these are known as "ephemeral" outputs. Despite their short lifespan, they are added to the Element Accumulator just like any other output.

Outputs are referred to by their ID, which is a hash of the information that uniquely identifies the output: typically, the ID of the transaction or block that created the output, concatenated with a monotonically increasing integer. This stands in contrast to cryptocurrencies like Bitcoin, which do not hash this information, instead identifying outputs as a combination of (parent) transaction ID and an index. Technically, an output is also also uniquely identified by its leaf index within the accumulator Merkle tree, but this is not serviceable in practice: since the index depends on the output's position within a block, it cannot be computed in advance, making ephemeral outputs impossible. Also, IDs have, in a sense, the "full PoW of the chain" behind them, whereas indices are not tied to any chain in particular.