Assets Issuance: Manage digital assets effortlessly on Stellar
Last updated
Last updated
Whether you're looking to create your own tokens or control how your assets are used, Stellar offers a simple and secure way to do it. In this blog, we’ll walk you through the basics of issuing assets on Stellar, how to maintain control over them, and share some best practices to help you get the most out of the platform. If this is the first time you’re approaching Stellar’s asset feel free to take a look at our first delivery on this topic
Now that you’ve check the basics you’ll know that issuing an asset is as simple as setting a payment operation in Stellar network and enabling a trustline in the receiving account. Now, this may work for learning or developing scenarios, but if you’re planning on settling your business on Stellar assets you’ll probably need more security than this. Stellar is the right fit to handle real money transactions, offering a wide set of options to control and decide how your issued assets should be handle. A secure and stron asset will provide more confidence to whoever you intend to trade with
Let’s start by checking the best practices when issuing an asset:
Do not rely on a single account:. Stellar recommendation is to create two accounts: One for issuing your asset and one for distributing it. This provide a more secure handle of your asset. The issuing account creates (or mints) the asset on the network by executing a payment operation. The issuing account will always be linked to the asset’s identity. Any account wanting to hold the asset must first establish a trustline with the issuing account. This will also mean that the account in control of your asset wont be performing frequent operations, the distribution account is the first recipient of the issued asset and handles all other transactions. By following this pattern you will issue your asset by sending it to the distributor account, which will be the one in charge to move it. If for any reason the distribution account is compromised, you can freeze the account’s asset balance and start with a new distribution account without changing the issuing account. This approach will also facilitate auditing on your asset, as an issuer account can’t hold a balance of it’s own asset, but you can keep track of balance and movements on the distributor one
Name your asset properly: You’ll have to set a proper and definitive name for your asset. You are allow to name it as you prefer, however if you’re issuing a currency you should follow the appropriate ISO 4217 code, and if you’re issuing a stock or bond, the appropriate ISIN number. Doing so makes it easier for Stellar interfaces to properly display and sort your token in their listings and allows potential token holders to understand what your token represents.
Publish the right info: Once an asset goes on the mainnet it will be defined by who issued it, which are its terms and what it represents. The more information you provide the more chances your asset will be used by many. You provide that info by linking your issuing account to a home domain, publishing a Stellar info file on that domain, and making sure that file is complete and accurate. This file is called stellar.toml
. It’s find in a common place where the Internet can find information about your organization’s Stellar integration. You write it in TOML, a simple and widely used configuration file format designed to be readable by both humans and machines, and publish it at https://YOUR_DOMAIN/.well-known/stellar.toml
. You can set your domain by using a set option operation, enabling potential users to understand your asset and trust you as much as possible.
Once you’ve set a home domain for your account just make sure to deploy your toml file for it to be find at the correct location (https://YOUR_DOMAIN/.well-known/stellar.toml.
)
It should look something like this
Stellar provides a lot of examples on how to complete your toml, make sure to check it here
Now that you’ve issue and publish the right info about your file you should define how it should work. By default anyone on the network can own your asset once you issue it. This is helpful if you’d like your asset to be used by many, but if you need to restrict it for compliance or purpose reasons you can easily do so by enabling flags on your issuing account.
You set flags to your asset through a set_options operation at any time you’d like. There’s different types of flags:
Authorization Required When AUTH_REQUIRED_FLAG
is enabled, the issuer must enable an account before hold its asset. This setting allows issuers to vet potential token holders and to approve trustlines. To allow access, the user creates a trustline, and the issuer approves it by changing the AUTHORIZE flag with the Set_Trust_Line_Flag
operation.
AUTHORIZED_FLAG: signifies complete authorization allowing an account to transact freely with the asset to make and receive payments, place orders, and deposit into a liquidity pool.
AUTHORIZED_TO_MAINTAIN_LIABILITIES_FLAG: denotes limited authorization that allows an account to maintain current orders, withdraw from a liquidity pool, or cancel current orders - but not to otherwise transact with the asset.
Authorization Revocable When AUTH_REVOCABLE_FLAG
is enabled, an issuer can revoke an existing trustline’s authorization at anytime, the asset held by an account. Doing so prevents that account from transferring or trading the asset and cancels the account’s open orders for the asset. AUTH_REVOCABLE_FLAG
also allows an issuer to reduce authorization from complete to limited, which prevents the account from transferring or trading the asset but does not cancel the account’s open orders for the asset. This setting is useful for issuers of regulated assets who need to authorize transactions on a case-by-case basis to ensure each conforms to certain requirements. This flag enables three levels of authorization an asset issuer can remove using the Set_Trust_Line_Flag
operation:
AUTHORIZED_FLAG: signifies complete authorization allowing an account to transact freely with the asset to make and receive payments and place orders.
AUTHORIZED_TO_MAINTAIN_LIABILITIES_FLAG: denotes limited authorization that allows an account to maintain current orders but not to otherwise transact with the asset.
CLAWBACK_ENABLED: enables the issuing account to take back (burning) all of the asset. Any subsequent trustlines established with this account will have clawbacks enabled. This flag requires that revocable is also set. You can, however to cherry pick on which accounts to enable the clawback and in which not. For this, simply enable the flag before authorizing an account and disable it to set trustlines for the accounts you do not wish to clawback.
Authorization Immutable The other way around, this flag is not so much for controlling your asset as to communicate with others. With this setting, none of the other authorization flags (AUTH_REQUIRED_FLAG
, AUTH_REVOCABLE_FLAG
) can be set, and the issuing account can’t be merged. You set this flag to signal to potential token holders that your issuing account and its assets will persist on the ledger in an open and accessible state.
Any of this flags can be set or disable through a Set_Options
> Set_Trust_Line_Flag
operation that should look something like this:
Conclusion Issuing and controlling assets on Stellar offers a flexible and secure way to manage your digital assets. By following best practices, such as using separate accounts for issuing and distributing assets, properly naming your asset, and publishing detailed information, you can ensure your asset is trustworthy and easily accessible. Additionally, Stellar’s options for controlling access to your assets, such as setting authorization flags, give you full control over who can hold and trade your asset. With these tools, you can confidently issue assets that meet your business needs and ensure their security and compliance.