How to create your own Asset on Stellar Blockchain.

Esteban Suárez

One of the main features of Stellar is issuing assets. You can tokenize any asset and then transfer or trade it through the Stellar network. It can be done quickly, cheaply, and by anyone (from banks, money service businesses, payment processors, local communities, businesses, and individuals). You can also tailor these assets to specific use cases with the help of Stellar’s built-in mechanisms, list them on the Stellar decentralized exchange, and use market-making bots to benefit from Stellar’s global reach and ensure the required liquidity. Currently, tokenizing fiat currency to streamline processes like cross-border payments is the biggest use case for Stellar.

Before we begin, let’s look at the requirements needed to create an asset.

  1. Have a PC
  2. Internet connection
  3. Create a Stellar wallet
  4. Have XLM lumens, the currency of this Blockchain network.

What is an asset and what is its fundamental characteristic

Digital assets have an asset code or name, which is how users will recognize it, an issuer. The issuer is the account that creates said asset and a distributor account.

Code:

Asset codes in Red Stellar meet the following characteristics, Your name can be in 4 and 12 alphanumeric characters.

Transmitter:

Stellar assets are created through a payment operation in which the issuing account is in charge of managing the number of tokens that will be in the network as well as controlling them.

Distributor:

You receive tokens from the issuer account and it is the account you will later use to distribute your tokens to other Stellar wallets etc. Starting

To make this example easier to explain, I will be using the Stellar Laboratory and the first thing we will do is enter it, choose the network that we will be using, which can be Public or Testnet for tests. All this example or we will be carrying out in the public network to make the whole process more realistic and that at the end of this tutorial they can review the asset created.

Crear Asset Stellar Imagen 1

We open the laboratory, click on create Account and there we generate a new account.

By doing this step you will get two pairs of keys. A public key and a private key that you cannot share with anyone.

Then we repeat the same procedure. By creating two accounts we are making an Issuer of the Asset and a Distributor of the same. Remember that you must add some XLM so that they remain active on the Network.

In our example we have created as Issuer account: GAT6H6WAHDHMOE4BW22T5BBCSVF6AL2UQP4FRCKWR4MSD4CGUMERBXTN

Distributor Account: GDOMWO7H7JJOSMABGQYZLVWSRIWRXG73XXWNMVDTFOZA7GQPAYPF6TRO

Now we turn to building transactions:

Crear asset stellar Imagen 2

There we fill in the requested data.

  1. Source account or origin of the transaction.
  2. Sequence of the transaction. (This is a number that is generated through the transactions that a Stellar account creates on the blockchain network)
  3. Type of Operation (Change Trust)
  4. Type of asset you want to add Name of the same and number of characters of 4, 12 or create liquidity to an asset.
  5. ID of the account that creates the asset. (Issuer of the Asset)
  6. Then you must click Sign in Transaction Signer. In this way we will sign the operation with our private key and make it effective in the Blockchain.

In this case we are creating a transaction with the Distributor account creating a trust line for an asset whose name will be CUT issued by the account that we already have defined as the issuing account.

Now you just have to click on Sign in Transaction Signer to create the transaction and sign it.

Crear stellar Asset Imagen 3

In this window we must sign our transaction. As you can see, signing it can be done manually by copying the secret key, using hardware wallets or with Albedo, something like a Metamask wallet for the Stellar Blockchain network.

After choosing the signing method, we are going to select Submit Transaction. This will take us to the page to create said operation.

Crear stellar Asset Imagen 4

You click on Submit Transaction and if everything goes well you should get an output on the screen like the one I present here.

Until this step we already have a line of trust created between the Distributor account and the asset that we are creating whose name is CUT.

Now we are going to put some CUT tokens inside the Distributor account, for this we are going to create a transaction again, but in this case the origin account will be the issuing account of the asset that we are creating.

We follow the steps we did at the beginning but changing the type of operation that we are creating.

Crear Stellar asset Imagen 5

Data that we must put.

  1. Source account or origin of the transaction. (Asset Issuing Account)
  2. Sequence of the transaction. (This is a number that is generated through the transactions that a Stellar account creates on the blockchain network)
  3. Type of Operation (Payment)
  4. Destination address. (In this case we put the address of our distributor account)
  5. Type of asset you want to send. Here you can find Native (XLM), 4 Characters, 12 Characters. (CUT) the asset we are creating.
  6. ID of the account that creates the asset. (Issuer of the Asset)
  7. Amount of Assets that we are sending. In our example we are creating only (1000 CUT) that we will transfer to the distribution account.
  8. Then you must click Sign in Transaction Signer. In this way we will sign the operation with our private key and make it effective in the Blockchain.

Crear Stellar asset Imagen 6

Now we add the private key with which we are signing the transaction and click Submit in Transaction Submitter.

Crear Stellar Asset Imagen 7

In the next window we sign the transaction to send it to the Blockchain. And if everything is correct we will obtain a window like the one I present here.

Until this step we have already created 1000 CUT and they are deposited in our distributor account. And to verify it you can click on this link.

If you have followed this manual and want to verify the one you have created you can go to Explore EndPoints -> Accounts -> Single Account and write the public address of your Distributor account.

Crear Stellar Asset Imagen 8

Then you click on Submit to obtain the account data.

Now that we have our asset created, we are going to proceed to give our issuing account options to guarantee the security that meets the requirements of the Stellar network.

To do this we go again to Build Transaction

Crear Stellar Asset Imagen 9

Data that we must put.

  1. Source account or origin of the transaction. (Asset Issuing Account)
  2. Sequence of the transaction. (This is a number that is generated through the transactions that a Stellar account creates on the blockchain network)
  3. Type of Operation (Set Options)
  4. Set Flags is not touched unless you want to create some kind of restrictions on the use of the asset you are creating.
  5. Clear Flags removes the constraints you have previously created
  6. Master Weight if set to zero blocks the account permanently and does not allow further operations.
  7. Home Domain the domain where the data of the created asset will be read. This is a mandatory step to comply with the SEPS of the Stellar network.
  8. Sign Transaction Signer

Once we are in the Transaction Signer, we sign the transaction with the private key of the Issuer account.

Crear Stellar Asset Imagen 10

And click on Submit in Transaction Submitter.

Crear Stellar Asset Imagen 11

If everything went well you will have a window as it is and you will have already created your asset in the Stellar network, with the domain assigned and a maximum amount issued of 1000 tokens.

Next steps:

  1. Create the Stellar.toml file
  2. Create the Market Makers for the asset you just created.
  3. Start using the assets you’ve created in your project.

I hope this tutorial was helpful if you want to start a new project on Stellar Blockchain.

If you want to schedule an appointment to create smart contracts, create anchor or comply with Red Stellar regulations, you can contact us to obtain a quote according to what you want to do.