Assets: Powering Digital Value Exchange
Last updated
Last updated
Dive into the fundamentals of assets on the Stellar network, where value is represented digitally through tokens or credits. Explore how Stellar enables seamless cross-border transactions, tokenization, and trading. Learn about the distinction between native assets like XLM and custom-issued assets, and understand how trustlines are used to manage and facilitate asset exchanges within Stellar's decentralized ecosystem.
Discover how assets on Stellar represent value digitally, from native XLM to custom tokens. Learn how they enable seamless transactions, tokenization, and real-world applications like stablecoins and tokenized commodities.
Assets on the Stellar network are digital representations of value that enable seamless transactions and tokenization. These assets can represent a wide variety of real-world values, such as FIAT currencies, bonds, commodities, or tokenized goods and services. They can be native, like XLM, or custom-issued tokens backed by trustlines, ensuring secure and transparent exchanges in Stellarโs decentralized ecosystem.
Assets on the Stellar network are identified by a combination of the asset code and the issuing account. The asset code is a short identifier (e.g., USD, EUR, GOLD), and the issuing account is the Stellar address of the entity that created the asset. Together, these elements make each asset unique and traceable. When creating an asset, the issuer must specify an asset code and provide the Stellar account that will issue the asset. However, the issuer cannot hold the assetโthey must rely on other accounts trusting the issuer and holding the asset through a trustline.
Assets codes can range from 4 to 12 alphanumeric characters.
Asset Code (4 Characters): This format is typically used for short, recognizable identifiers, such as USD for the U.S. Dollar or EUR for the Euro. These shorter codes are ideal for well-known currencies or frequently used assets.
Asset Code (12 Characters): Longer asset codes provide flexibility and allow for more descriptive names. This is useful for custom tokens or less common assets. For example, a bond might be represented by the asset code "UST_Bond."
This is an example of how an asset is represented in Stellar laboratory - Stellar Expert
After defining the asset code and issuing account, the asset can be created, and trustlines can be established for users to interact with it. These steps form the foundation for creating assets that can be distributed, traded, and used in a variety of decentralized applications, such as stablecoins, loyalty points, or tokenized commodities.
Creating an asset on the Stellar network doesnโt involve a direct operation. Instead, the issuerโthe account responsible for issuing the assetโmust perform a payment operation to the account receiving the asset. The issuer maintains control and accountability over the asset.
The issuer cannot hold a strict balance, meaning to remove or burn an asset, it must be sent back to the issuer account.
Stellar assets have a default precision of 7 decimal places, represented as a 64-bit integer in XDR. When sending whole or fractional assets, you need to multiply by 10,000,000 to account for decimal places. For example, sending 0.05 of an asset would be represented as 500,000.
Languages like JavaScript may struggle with large numbers, leading to data loss when working with Stellar assets. To prevent inaccuracies, itโs recommended to use libraries capable of handling big numbers for precise asset transactions.
In the Stellar network, establishing a trustline is a key step for users who wish to interact with a particular asset. Trustlines define the relationship between the user and the asset issuer, specifying how much of an asset a user is willing to trust from the issuer. Users can create trustlines to hold and transact with assets, but these trustlines must be approved by the issuer. The issuer has control over whether or not an asset is allowed to be transferred or traded, based on the established trustline configuration.
Trustlines not only control the flow of assets between parties but also serve as a security mechanism, ensuring that only trusted entities can hold and trade specific assets. The process of managing trustlines and the associated security measures ensures that users' interactions within the Stellar network remain compliant with the issuer's intentions, preventing unauthorized access or transfer of assets.
When creating an asset or adding a trustline for an existing asset on the Stellar network, both the issuer and the user can configure flags to manage the assetโs usage and security. These flags allow the issuer to control aspects like whether the receiving account is allowed to move the asset, or how much of the asset they are willing to trust. This ensures that only trusted parties have access to the asset and that it is handled in a manner consistent with the issuer's intentions.
These security measures are essential for protecting assets from unauthorized transfers and mitigating potential risks. By using these controls, both the issuer and user can safeguard their assets, ensuring that interactions within the Stellar network remain secure and aligned with their preferences.
These flags can be defined at any point during the asset's lifecycle
Authorization Required: An account that wants to hold an asset must first be approved by the issuer. To do this, the account (the holder) must create a trustline for the desired asset. The issuer will then need to approve this transaction by setting a Set_Trust_Line_Flag.
Revocable Authorization: When activated, the issuer can revoke an existing trustline authorization, effectively freezing the asset held by an account. This prevents the account from transferring the asset and cancels any open orders. A common use case for this feature is enabling a user to hold an asset without being able to transfer it. For example, if business rules require the account owner to have approved KYC, the issuer can ensure compliance by verifying the authorization through a smart contract or checking the user's balance. This flag also allows reducing the authorization from full to limited, preventing the account from transferring or trading the asset, but without canceling any open orders. This is useful when issuers need to approve transactions on a case-by-case basis to ensure they meet specific requirements.
Clawback Enabled: This flag allows the issuer to recover assets from an account. For this to work, the AUTH_REVOCABLE_FLAG must also be enabled. It is useful in the following cases:
Recovering assets that were obtained fraudulently
Complying with regulatory actions
Enabling a person to recover assets in the theft or account loss
Authorization Immutable: This flag disables the previous flags and prevents the issuer account from performing a merge, meaning the asset cannot be removed from the network. It is useful for ensuring that the asset will persist on the blockchain in an accessible and transparent state.
The Stellar network offers an efficient and secure way to represent and manage assets digitally. Whether itโs native assets like XLM or custom tokens, Stellar makes it easy to create, distribute, and trade these assets, enabling real-world use cases.
Assets on Stellar are identified by a combination of asset codes and issuing accounts, ensuring that they are traceable and secure. The ability to create assets with flexible identifiers helps accommodate both popular currencies and more specialized tokens.
Issuers have control over how their assets are used through trustlines, giving them the ability to set rules like authorization requirements and permissions. Features like revocable authorization and clawback allow issuers to manage and protect their assets from misuse, while ensuring compliance with regulations.
Overall, Stellarโs asset management features provide a robust and secure framework for anyone looking to manage digital value, whether for personal use or in decentralized applications. With these tools, Stellar paves the way for secure, global, and transparent value exchange.