XMR20 tokens
XMR20 tokens relate to XMR721 as BRC-20 tokens relate to Ordinals. A token is announced by an inscription on the XMR721 ledger, anyone can mint it, and the balances are worked out from the Monero chain alone.
Open tokens are live on mainnet from block 3,812,510. The rules are in xmr20-tokens/OPEN.md.
#Three kinds of token, one list
| Kind | Announced by | Named by | Supply on Monero comes from |
|---|---|---|---|
earlier | A deploy in the first XMR20 format, by the launchpad | Its Solana mint | The bridge |
launched | A deploy inscription by the launchpad's listed inscriber | Its Solana mint | The bridge |
open | A deploy inscription by anyone | The id of its deploy inscription | The deploy itself and mint records |
Every mainnet reader lists all three. The first two are bridged: a token on Monero stands for one held on Solana. An open token has no issuer, no launchpad and no bridge. Its supply follows from the chain and nothing else.
#Create a token
node cli/xmr20.mjs create # once; prints the wallet's address
node cli/xmr20.mjs balance
node cli/xmr20.mjs deploy --tick PEPE --max 21000000 --lim 1000 --dry-run
node cli/xmr20.mjs deploy --tick PEPE --max 21000000 --lim 1000The command prints the token's id. Install the command first: see Inscribe from the command line.
| Option | Meaning |
|---|---|
--tick | The ticker: 1 to 32 characters, any script |
--max | The whole supply in whole tokens. It can never be raised |
--lim | The most one mint may take |
--pre | A share for the creator, credited at once. With --pre equal to --max the creator gets everything and nobody mints |
--token-name | An optional name |
#The deploy text
The deploy is an XMR721 mint record with no collection, type JSON, whose content is exactly one line:
{"p":"xmr20","op":"deploy","tick":"PEPE","name":"Pepe","max":"21000000","dec":"6","mode":"open","lim":"1000"}The fields come in this order, with no spaces and nothing else in the object, at most 600 bytes. Every XMR20 token has 6 decimals, so dec is always "6". The creator is the address that signed the record.
#Mint
node cli/xmr20.mjs mint <token id> 1000 # to this wallet's address
node cli/xmr20.mjs mint <token id> 1000 --to <address> # to any Monero address
node cli/xmr20.mjs status- The token is named by its 64-character id, or the 16 characters signed texts show after its ticker.
- Each mint takes at most
limtokens. The last mint gets what is left. When nothing is left, mints are refused. - A mint needs no signature. Anyone can mint to any Monero address. Each mint is one record in one transaction.
- Cost. The Monero network fee of each transaction. There is no mint fee in the rules.
#Tickers repeat
Anyone can deploy another token with the same ticker, including one a bridged token already uses. Tokens are told apart by their id: pages and wallets show its first 16 characters next to the ticker. Check the id before you mint or buy. Two open tokens never share the same first 16 characters.
#Afterwards
Tokens at a Monero address are moved and traded by signing a message in Feather, Cake Wallet or any Monero wallet, on xmr20.org/move and xmr20.org/market. An open token cannot be withdrawn, renamed or changed by anyone, its creator included.
#Without the command line
Feather and Cake Wallet cannot write a record into a transaction, so their users go through a relay:
- Deploy by signing one message. The relay hands out the exact line to sign (
POST /xmr20/open/deploy-text) and carries the signed deploy (POST /xmr20/open/deploys). - Mint by paying the relay's fee, with no signature (
POST /xmr20/open/mints). The project's relay charges 0.0005 XMR a mint (relay.fees.tokenMintinGET /info).
#Reading tokens
curl https://api.xmr20.org/xmr721/xmr20/open # open tokens, newest first
curl https://api.xmr20.org/xmr721/xmr20/open/<id or first 16> # one open token with its deploy record
curl https://api.xmr20.org/xmr721/xmr20/tokens # tokens from the launchpad
curl https://api.xmr20.org/xmr721/xmr20/earlier # tokens of the first XMR20 formatThe reader lists what was announced. What was minted, what is left and who holds a token is the token ledger's to say: the XMR20 wallet engine reads the same blocks and holds the balances. See the HTTP API.