Odysseia - Native Tokens

Odysseia - Native Tokens
Photo by Michael Longmire / Unsplash

The EIP-20: ERC-20 Token Standard that was published in 2015 was the first implementation of something close to native tokens but it has a lot of flaws and exploits because they are not native - meaning they aren't equal to the ETH token - when it comes to how they are handled.

The most recent implementation was done by Cardano when they introduced real native tokens that are equal to the ADA token in terms of how they are treated. All rules that apply to ADA also apply to a native token. This is important because it means there's less of a chance a critical exploit in smart contracts can be used to drain all tokens. It also significantly reduces the burden of maintenance on people that need native tokens for their own projects but don't necessarily need a whole blockchain of their own because the token is the primary need they have.

Limitations

Before jumping into what you can do with native tokens; lets talk about what you can't do compared to the primary native token of any Odysseia-based blockchain.

  1. Native Tokens can be minted and burned. The primary native token can't be minted or burned.
  2. Native Tokens can't be used to pay for transaction fees. The primary native token is required to be used for fees.
  3. Native Tokens can't be used to receive forging rewards. The primary native token is used to reward validators for their participation.

Registration

Registering your own native token with any Odysseia-based blockchain is a fairly straightforward process that only requires a few values that will make it easy for anyone to identify your native token and interact with it.

export interface TokenRegistrationAsset {
	name: string;
	description: string;
	ticker: string;
	url: string;
	logo: string;
	decimals: number;
	supply: BigNumber;
}
Implementation contract for the native token registration asset
  1. The name has to be unique and no longer than 8 characters.
  2. The description has to be no longer than 64 characters.
  3. The ticker has to be no longer than 8 characters.
  4. The url has to be an URL and no longer than 255 characters.
  5. The logo has to be an URL and no longer than 255 characters.
  6. The decimals have to be an integer and no greater than 24.
  7. The supply has to be no greater than 1 Septillion.

Minting

Minting more tokens is a common need for utility tokens. Imagine a token that is used to purchase in-game items for a mobile game. You might start with an initial supply of 1 million tokens but then the amount of people that play the mobile game is rapidly growing but there aren't enough tokens for everyone to purchase in-game items.

export interface TokenMintAsset {
	hash: string;
	amount: BigNumber;
}
Implementation contract for the native token minting asset
  1. The hash has to be the transaction ID of the native token registration. If the sender of the minting and registration transactions are not the same it'll be rejected.
  2. The amount has to be the amount of tokens to mint. If the number of decimals of the amount does not match the number of decimals in the registration it'll be rejected.

Burning

Burning tokens is something that price-focused tokens like to do to artificially increase the value of a token. Often times this helps to boost the price because there are now less tokens by creating artificial scarcity. If the token has any value or application does not matter because the artificial scarcity is the selling point.

export interface TokenBurnAsset {
	hash: string;
	amount: BigNumber;
}
Implementation contract for the native token burning asset
  1. The hash has to be the transaction ID of the native token registration. If the sender of the burning and registration transactions are not the same it'll be rejected.
  2. The amount has to be the amount of tokens to burn. If the number of decimals of the amount does not match the number of decimals in the registration it'll be rejected. It'll also be rejected if the amount to burn is greater than the total amount left in the founder wallet.