Press "Enter" to skip to content

Let’s create a Token on Stellar Network – Step by Step

StellarChurch 0

Here is the official explanation on how to create a Token on Stellar.

The pre-requisite is to have two existing accounts on Stellar. 5 XLM per each is more than sufficient nowadays since the minimum threshold has been lowered.

In this example, we are using
GBMRDKGMW2XDH7AB52E5KMTEC7FWJFFEEYWVIB7NY3ZFX2E3IMA5EMUF
as the issuing account (generating the tokens) and
GDIRKCREK333OXJMZ5ND2WBORH4AO6JBIZIY3J3XEXX7KNTHAUAPUVTJ
as the distributing account (selling the tokens).

Setting up the Trust Line

If you’ve ever created a token on ethereum, you’ll notice there are difference besides the lack of a smart contract. What we do first is creating a trustline between issuer (GBMR…) and distributor (GDIR…). Note: The token is not created at this step. The distributor needs to trust the issuer before he can receive the tokens that will be created later:

To better understand which value you have to enter, I edited the pre-setting with an explanation. Click here to open the Stellar Laboratory (official website). You need to edit the fields with red error text below as the script expects other values than the explanation. You can ignore all the other fields.

Source Account = distributor = the account that will receive/sell the tokens.
Once you entered the address designated to receive the tokens, click on ‘Fetch next sequence number…’

Scroll down and change the values for Asset to the name or short you want to give your token. In my case this is DIRK. Below you have to paste the issuers address (that’ll generate the tokens later). The trust limit is the maximum amount of tokens the distributor can hold at a time. This can be any number depending on the amount of tokens you want to generate. Note: If you don’t limit the supply of your tokens, you can generate more later!

Scroll to the bottom and click ‘Sign in Transaction Signer’. On the next page, you have to confirm the process by entering the secret key of the distributing account (GDIR…), then click on ‘Submit to Post Transaction endpoint’.

Generating/sending the initial tokens:

Click here for the form with pre-set explanations.

Source Account = issuer = the account that will send/generate the tokens.
After you entered the issuers address, click on ‘Fetch next sequence number…’

Scroll down and set Destination to the address that will now receive the tokens. Edit the Assets name to the same name you set the Trust Line to in the previous step (DIRK in my case) and enter the distributing account. Finally, enter the amount of tokens to generate/send now. This number can not exceed the amount you set the Trust Line for previously!

Scroll to the bottom and click ‘Sign in Transaction Signer’. On the next page, you have to confirm the process by entering the secret key of the issuing¬†account (GBMR…), then click on ‘Submit to Post Transaction endpoint’. To confirm, click ‘Submit’ on the next page. Your distributing account (GDIR…) now has the amount of tokens you just generated/sent.

This is the transaction that established the Trust Line:

Click to view on stellar.expert

This is the transaction for generating/sending DIRK:

Click to view on stellar.expert

To buy DIRK, you need to establish a Trust Line first. Click here to open the transaction (official website), enter your Public Key and confirm with your secret key on the next page. There is no transfer of funds or buying tokens at this point! This is only to establish a Trust Line.

To buy DIRK, you can click here (using stellarterm.com).

Leave a Reply

Your email address will not be published. Required fields are marked *