How To Create Your Own Token On Stellar... Steps - by TeaSea - Coinmonks - Medium

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

1/6/2021 How to create your own token on Stellar in 5 easy steps | by TeaSea | Coinmonks | Medium

How to create your own token on Stellar in 5


easy steps
TeaSea Follow
Jan 10, 2019 · 6 min read

Photo by Tyler van der Hoeven on Unsplash

I thought I would attempt to broaden my horizons and create a new token. I have
previously done so on Ethereum and wanted to challenge myself to learn more about the
other blockchain protocols out there, so I decided to choose Stellar.
https://medium.com/coinmonks/how-to-create-your-own-token-on-stellar-in-5-easy-steps-6d0956e3fede 1/8
1/6/2021 How to create your own token on Stellar in 5 easy steps | by TeaSea | Coinmonks | Medium

Before I started this project I knew very little about Stellar, and considering it is sitting in
the top 10 based on Market Cap I thought I owed it to myself to dig a little deeper.

Today we are going to create a new token to save the world called Earth token. We can
use this new token in many ways such as, Sending tokens quickly and without third
parties to aid disaster relief, all the way to rewarding people for doing good deeds like
walking to work instead of using the car or helping out with their local charity.

What Is Stellar?
Stellar began as a fork of Ripple in 2014 by the Stellar Foundation and Jed Mcaleb who
also founded Ripple. However, Stellar is no longer a simple fork of Ripple and have
completely re engineered their code base since then to use the Stellar Consensus
Protocol. One of the main concepts behind Stellar is to facilitate very fast payments with
low fees and as such Stellar has a confirmation time of between 2–5 seconds and can
support thousands of transactions per second. This is perfect for the new token we are
creating as it allows us to quickly and cheaply make micro payments to our users. This is
only a very brief introduction to Stellar at a very high level, there are tons of great
resources out there on the technical details of Stellar, their website is a great place to
start at stellar.org

It turns out that setting up your own token on Stellar is pretty simple once you know the
steps involved and no programming experience is necessary like on some other
platforms, so follow along to create your very own token on Stellar.

Creating the Token


Step 1: Create an Issuing account.

The first step of creating a new token on Stellar is to create an issuing account. The
issuing account is used to issue the token supply to a distribution account (that we will
create next). We do this so that so we can lock the issuing account after we have
generated the tokens and prove to our users that we will not increase the token supply in
the future.

Go to the Steller Laboratory and ensure “Test” is selected, then click “Generate keypair”
and keep a note of the public and secret keys in a safe place.

https://medium.com/coinmonks/how-to-create-your-own-token-on-stellar-in-5-easy-steps-6d0956e3fede 2/8
1/6/2021 How to create your own token on Stellar in 5 easy steps | by TeaSea | Coinmonks | Medium

Create an issuing account.

Step 2 : Fund the Issuing account

Next, click “Fund this account on the test network using the friendbot tool below” this
will copy your public key into the text box, then click ‘Get test network lumens’

Once this is completed you will see a green bar confirming successful funding of your
new account with test lumens.

Step 3: Create and fund the Distributing account

Follow steps 1 and 2 above to create and fund another account and make a note of the
public and private keys.

Once you have done this you can check to ensure both accounts have a balance by
appending each public key individually to the end of this URL: https://horizon-
testnet.stellar.org/accounts/YOURPUBLICKEY

https://medium.com/coinmonks/how-to-create-your-own-token-on-stellar-in-5-easy-steps-6d0956e3fede 3/8
1/6/2021 How to create your own token on Stellar in 5 easy steps | by TeaSea | Coinmonks | Medium

Stellar testnet balance returned as a JSON object

This page will return a JSON object and part way down you should notice a balance of
10,000 testnet Lumens

Step 4: Create a Trustline between the issuing and distribution account

Next we need to create a Trustline that says the distribution account trusts the Issuing
account. To do this go to the transaction builder page and enter the public key for the
distribution account into the source account field.

Next, click the button “Fetch next sequence number for account starting with..”

We can leave the next three fields; Base Fee, Memo and Time Bounds alone and move
down to operation type and set that to “Change Trust”

Then set the “Asset” to Alphanumeric 4 or 12 depending on the number of characters


you want to use and enter the Asset code of your choosing. With our token we are going

https://medium.com/coinmonks/how-to-create-your-own-token-on-stellar-in-5-easy-steps-6d0956e3fede 4/8
1/6/2021 How to create your own token on Stellar in 5 easy steps | by TeaSea | Coinmonks | Medium

to save the world so we are going to create “Earth” tokens, so select Alphanumeric 12
and enter EARTH in the asset code field

Set the “Issuer Account ID” field to your Issuing accounts public key.

In the “Trust Field” field enter the number of tokens you want to generate, we are
creating 500,000,000 as there is a lot of work to do, and a lot of tokens needed if we are
going to fix this thing.

To complete the transaction click the “Sign in Transaction Signer” button at the bottom
of the page. On the next page scroll to the bottom to the signatures section. For this
example we will add our distribution account secret key in the “Add Signer” field. In
reality, if we were doing this for real we would use a ledger to sign this transaction, but
as this is just for fun we will paste the key in as described above.

Once you have pasted the secret key scroll to the bottom and click “Submit to post
transaction endpoint”.

https://medium.com/coinmonks/how-to-create-your-own-token-on-stellar-in-5-easy-steps-6d0956e3fede 5/8
1/6/2021 How to create your own token on Stellar in 5 easy steps | by TeaSea | Coinmonks | Medium

You will then be directed to the Endpoint Explorer page, scroll to the bottom of this page
and click the “Submit” button. Once this is successful you will receive a JSON Response
below the submit button.

Tokens Successfully Issued

Step 5: Lock the issuing account

Our final step is to lock down the issuing account so that no more tokens can be
generated for our new token.

Once again, go to the transaction builder page and enter the public key of the issuing
account in the “source account” field and fetch the next sequence number, just like we
did before.

Next scroll down and set the “Operation Type” to Set Options and the “Master Weight” to
0 and click “Sign Transaction in Signer” at the bottom of the page.

Then add your issuing account secret key in the “Add Signer” field and click “Submit to
post Transaction Endpoint” then click “Submit” to finalise the transaction.

https://medium.com/coinmonks/how-to-create-your-own-token-on-stellar-in-5-easy-steps-6d0956e3fede 6/8
1/6/2021 How to create your own token on Stellar in 5 easy steps | by TeaSea | Coinmonks | Medium

That’s it, you did it! you created your first token on the amazing Stellar network, now go
and check your new token on testnet by adding your distribution account into this url:

https://horizon-testnet.stellar.org/accounts/YOURDISTRIBUTIONPUBLICKEY

You can see from the limit above we now have 500 Million Earth tokens to save the
planet with.

Thank you for reading this post, if you have any questions please leave a comment
below.

Get Best Software Deals Directly In Your Inbox

https://medium.com/coinmonks/how-to-create-your-own-token-on-stellar-in-5-easy-steps-6d0956e3fede 7/8
1/6/2021 How to create your own token on Stellar in 5 easy steps | by TeaSea | Coinmonks | Medium

Sign up for Coinmonks


By Coinmonks

A newsletter that brings you week's best crypto and blockchain stories and trending news directly in
your inbox, by CoinCodeCap.com Take a look

Your email

Get this newsletter

By signing up, you will create a Medium account if you don’t already have one. Review our Privacy Policy for more information
about our privacy practices.

Ethereum Blockchain Blockchain Development Stellar Stellar Lumens

About Help Legal

Get the Medium app

https://medium.com/coinmonks/how-to-create-your-own-token-on-stellar-in-5-easy-steps-6d0956e3fede 8/8

You might also like