Launching a Stellar ICO

Intro

In June 2017, Ripple co-founder Jed Mccaleb wrote an article about launching an initial coin offering (ICO) on the Stellar Lumens (XLM) cryptocurrency and infrastructure.

In December 2017, Kik decided to shift its tokens from Ethereum to Stellar. Kik CEO Ted Livingston quoted Stellar’s faster and cheaper transactions as the main reason for the change.

This got me interested in how to actually launch an ICO based on Stellar. In this post, I’m going through every step of Jed’s article, from the perspective of somebody who never actually used Stellar before.

Building the ICO

Step 1 - Create issuing account

Go to the Stellar Account Viewer and click “Generate”. You will get a public key and a secret key. The secret key is the login to your account. Keep both keys save. Never share your secret key.

For an account to be activated, it needs to be funded. The blog post mentions 31 XLM minimum balance.

I bought 100 XLM on the Kraken and sent 31 of them to my public key.

The withdrawal fee was 0.00002XLM, which is currently 4e-6 USD. Two minutes later, I could see the XLM had transferred to my wallet.

The public key for my issuing account is GD7I5FCDZRCW44JF5MPNKA3XZJ6NXVD5G32DBEGBKISUZZYTVZTBAYOW.

Step 2 - Create distribution account

Get another keypair. Fund the account with 41 XLM.

The public key for my distribution account is GBJIW24XMNIBZ3OZRANODEEJD6QLCMQ75R36W6NVIUISKLTVRWWPUF4E.

Step 3 - Trust the issuing account

The original post is a bit cryptic here. Go to the Stellar Laboratory. Enter the following values:

Source account: the public key of your distribution account

Transaction sequence number: press the blue button.

Base fee: empty

Memo: None

Time bounds: empty

Operation type: Change Trust

Asset: name of your token. I will call mine Silly Coin (SICO)

Issuer account ID: public key of your issuing account

Trust limit: number of tokens you want to distribute. I will set it to 1e6.

Source account: empty

See the full form here.

Once all this is put into the form, click “Sign in Transaction Signer”. Sign it with the private key of your distribution account.

Click “Submit to Post Transaction endpoint”.

Step 4 – Create tokens

After completing Step 3, the distribution account trusts the issuing account. Now, SICO tokens can be created. Go back to the Stellar Laboratory and build the following query:

Source account: public key of your issuing account

Transaction sequence number: press the blue button

Base fee: emtpy

Memo: None

Time bounds: empty

Operation type: Payment

Destination: public key of your distribution account

Asset: Name of your token, public key of your issuing account

Amount: the amount you specified above. In our case, 1e6

Source Account: empty

Again, sign (with the private key of your issuing account) and submit your transaction.

Step 5 – Publish information about your token

Jed created a simple doc for his token, so we will do this here as well.

{ "code": "SICO", "name": "Silly Coin Token", "desc": "The Silly Coin is an absolutely useless token.", "conditions": "If you find a use for SICO, please ask for a refund." }

Jed signed it with a key from keybase.io and published it on the IPFS. We’re not going to do that here.

Step 6 – Limit the supply

We will now lock the issuing account by using the multi-sig feature of Stellar. Time for some more Stellar Laboratory fun!

Source account: public key of your issuing account

Transaction sequence number: press the blue button

Base Fee: emtpy

Memo: empty

Time Bounds: empty

Operation type: Set Options

Inflation destination: empty

Set flags: empty

Clear flags: empty

Master weight: 0

Low threshold: 1

Medium threshold: 1

High threshold: 1

Signer type: select signer type (don’t change it.)

Source account: empty

According to the documentation this means that the weight of the master key of this account is now zero, there are no other signers, and to perform an action, we need a threshold of 1. So this account is now locked forever.

Sign with your issuing account private key and submit it to a post transaction endpoint, just like before.

Step 7 – Distribute your Token

Back to the Laboratory! We will make an offer to sell some of those sweet, freshly minted Silly Coins to unsuspecting strangers! We will sell at 1XLM per SICO, an absolute steal!

Source account: public key of your distribution account

Transaction sequence number: press the blue button

Base fee: empty

Memo: empty

Time bounds: empty

Operation type: Manage Offer

Selling: name of your coin, public key of the issuing account

Buying: native

Amount you are selling: 1e6

Price of 1 unit of asset: 1

Offer ID: 0

Sign it with the private key of your distributing account and post it to a transaction endpoint.

See the current market here.

Step 8 - How to Buy?

Now, of course I want people to send me buckloads of XLM to fund a shady company with unclear goals!

To buy tokens, make an account and fund it (see Step 1).

Then head to the Stellar Laboratory and place an offer, basically the opposite of Step 7:

Source account: public key of your buyer account

Transaction sequence number: press the blue button

Base fee: empty

Memo: empty

Time bounds: empty

Operation type: Manage Offer

Selling: native

Buying: SICO, GD7I5FCDZRCW44JF5MPNKA3XZJ6NXVD5G32DBEGBKISUZZYTVZTBAYOW

Amount you are selling: ???

Price of 1 unit of asset: 1

Offer ID: 0

Sign it and submit it, and the decentraliced exchange will meet you demands! You can also set time windows for your trades.

Conclusion

It is very simple to build an ICO on Stellar. In less than one hour, you can issue your very own, limited supply, tokens based on the Stellar infrastructure.