Lesson 4
Issuing tokens and currencies
Digitally representing value
Did you know that you can issue your own tokens and currencies on the XRP Ledger (XRPL)? In fact, the XRPL was the first blockchain to support the tokenization of various assets.
Tokens are digital assets that can be used to represent anything of value on the ledger. This means that you can use tokens to represent real-world assets, whether that’s a stablecoin like the US dollar, piece of art, or a physical commodity.
Universal token creation
You can create a token on the ledger without needing smart contracts or a special programming language. Here’s a quick guide on how to issue your own token:
- You need another account to establish a trustline with you for this new token.
- Make sure both accounts have enough XRP reserve.
- Send a payment transaction to the account that you established a trustline with.
It’s that simple to bring new tokens into existence on the XRPL.
A trustline is important because it’s a way for a potential user of a token to express confidence in the account issuing the token. On the XRPL, you will never receive a token you don’t trust.
Note that the account matters a lot in this case—for example, you will probably feel better holding dollars tokenized by a bank than dollars tokenized by “Dave.”
If you want to create a loyalty program for your customers, issue a currency, create a token for voting, and soon, turn your drawing into an NFT, you can do it all on the XRPL.
Now that you understand the basics of token creation on the XRP Ledger, let’s dive into a few common token scenarios—like stablecoins or governance tokens.
Example: fiat-backed stablecoin
One common use of tokens is stablecoins. You may work for a bank’s stablecoin initiative that will create USD tokens on XRPL backed by customers’ deposits.
In order to have an easier time checking how many tokens exist at all times, instead of just having the issuer account and the recipient account, you may want to use an in-between account often called a hot account. Tokens would be created through a payment between 2 accounts under your control. These two accounts are often called ‘cold’ and ‘hot.’
- The cold account will issue tokens by sending them through a payment transaction to the hot account. The created tokens will be sitting in the hot account as a reserve.
- The hot account will be in charge of sending the tokenized dollars to fiat depositors’ accounts as deposits occur.
If the system is hacked, the real issuer of the tokens remains unaffected (that’s why it’s called a cold account). One thing to note here is that token holders need to establish a trustline with the issuing (cold) account in order to be able to receive, hold, and use the token.
Example: fixed supply token for governance purposes
You can limit the supply by first distributing your tokens and then permanently removing access to your account. This is done by changing the keys that can access your account to one that no one knows the private key for, and then disabling your original private key. There are some well-known XRPL accounts that no one knows the private key for called blackhole addresses which you can use to publicly show that your issuing account is no longer accessible.
For a technical guide for how to issue your own tokens on the XRPL, please check out this tutorial.
Trading on XRPL’s decentralized exchange (DEX)
Once your token has been created, you can use the DEX to trade it with other assets (you will learn more about the DEX in the next lesson). You can also hold your token in a wallet, send it to others, or even use it to power applications built on the XRPL.