Skip to content

Standards for Asset Issuance#

Ergo supports custom tokens as first-class citizens as outlined in EIP-0004.

  • A special register R2 of a box contains (tokenId -> amount) pairs.
  • A box can contain at most 255 secondary tokens.
  • However, there are also some indirect limits:
    • A box can be no more than 4 kilobytes
    • Tokens add to the computational cost of the transaction.

There is an exception to the rule of weak preservation (the total amount in inputs is no less than the total amount in outputs) a transaction can create tokens from thin air in its outputs if the asset identifier matches the identifier of the transaction's first input box. Since the box identifier is cryptographically unique, it's impossible to have a second asset with the same identifier, assuming the hash function used is collision-resistant (which it indeed is). This rule also implies that only one new asset can be created per transaction.

The Ergo reference implementation wallet employs specific registers in a particular manner, though the protocol doesn't mandate this:

  • R4 - verbose name
  • R5 - description
  • R6 - number of decimal places
  • Additional registers (R7, R8, R9) can hold asset-specific information