How to Create Token On Stellar Blockchain Network?
Most of the startups released their tokens on Ethereum because it has a good ecosystem and is Turing-complete. But Ethereum has some downsides as well. Ethereum carries out 14 transactions per second. It is becoming a real issue now and is causing existing dApps to move off the Ethereum platform. Therefore, it is good to look for other options.
Stellar Lumens is one of the best blockchain platforms that allow you to create a custom token to form the basis of an ecosystem. In this article, we will explain how to issue and create a token on the Stellar network.
- Step 1: Create two accounts (One for Issuance, Another for Distribution)
- Step 2: Create a trustline between two accounts
- Step 3: Lock the issuer account
- Step 4: Distribution
Here are the steps to create a custom token on the Stellar Blockchain
Step 1: Create two accounts (One for Issuance, Another for Distribution)
To do that, Go to Stellar Laboratory and make sure to select the “test” tab. Then click on “Generate keypair” and take a note of secret and public keys in a safe place.
Once the key pair is generated, the next step is to fund the issuing account on the test network using the friend bot tool. It will copy your public key into the text box, then click “Get test network lumens.”
When the account is funded, you will see a green bar that confirms your new account’s successful funding with test lumens.
Similarly, create and fund another account for the distribution and note down the public and private keys. Once it is done, you can check to ensure both accounts have a balance by appending every public key to the end of the following URL:
https://horizon-testnet.stellar.org/accounts/your public key
For example, in our case, it looks like:
https://horizon-testnet.stellar.org/accounts/GDO3DT4QDLWF7532E2CEDX6C6GSPGGB53XUDKNWLXLCJEF4XCQUDQRTV
Once you open this URL, it will return a JSON object and you will notice a balance of 10,000 testnet Lumens.
}, "balances": [ { "balance": "10000.0000000", "buying_liabilities": "0.0000000", "selling_liabilities": "0.0000000", "asset_type": "native" } ],
Tokenize your assets on Stellar and efficiently manage the ownership rights.
LeewayHertz Stellar Token Development Services
Step 2: Create a trustline between two accounts
Then, click on “Fetch next sequence number for account starting with..”
TAfter clicking, you will get a transaction sequence number.
We can keep the next three fields: Memo, Base Fee and Time Bounds alone and move to operation type and set that to “Change Trust.”
After selecting operation type as “change trust”, set the asset to alphanumeric 4 or 12 based on the number of characters you want to use and enter the asset code of your choice. For example, we are creating a token for the gold asset; therefore, select Alphanumeric 4 and enter “Gold” in the asset code field.
Add your issuing accounts public key in the “Issuer Account ID.”
Enter the number of tokens you want to generate in the “trust field” field. For example, we are going to generate 200,000 tokens.
Complete the transaction by clicking the “Sign in transaction signer” button at the bottom of the page.
It will navigate you to the next page where you need to scroll down to the signatures section. We will add the distribution account secret key in the “Add Signer” field. We would use a ledger if we were doing it in reality, since it is just an example, we will paste the key as described above.
Once the secret key is pasted, scroll to the bottom and click “Submit in transaction submitter.”
Step 3: Lock the issuer account
Then, scroll down and select the “operation type” as Set Options and the master weight to 0 and click “Sign transaction in signer” at the bottom of the page.
After that, add the issuing account secret key in the “Add Signer” field and click “Submit to post transaction endpoint,” and then “submit” to finalize the transaction.
THere you go and the token is created on the Stellar network. Now, check your newly created token on testnet by adding a distribution account into the URL:
https://horizon-testnet.stellar.org/accounts/your distribution public key
Step 4: Distribution
Make sure to remember the following tips when distributing tokens:
- Inflating token supply in a predefined schedule with pre-authorized transactions.
- Issue a dividend.
- Restrict who can hold your token.
- Conducting an auction for your tokens.
Now, we have successfully issued a token on the Stellar network. Also, it is easier to do as compared to Ethereum. Transactions on the Stellar network will be cheaper and quicker.
If you are also looking to build a custom token on the Stellar network but do not have technical expertise, consult our Stellar Developers who can do it for you the way you want.
Start a conversation by filling the form
All information will be kept confidential.
Insights
Stellar-vs-EVM-Based-Blockchains
Stellar and EVM-based blockchains are decentralized, open-source platforms designed to develop smart contracts and decentralized applications.
How to Issue and Anchor Assets on Stellar?
Stellar Distributed Network is used to hold, transfer and issue assets, including dollars, euros, stocks, gold and other tokens of value.
How to set up deposits and withdrawals on Stellar?
Supporting deposits and withdrawals of an asset on the Stellar blockchain requires interaction between anchor and wallet apps.