TON Jettons
TON Jettons — is the standard interface for fungible tokens on TON blockchain. Fungible means that tokens are indistinguishable from one another. The standard is necessary to unify and simplify token development and usage and make them compatible with various platforms.
Developers implemented the Jetton interface as smart contracts with the FunC and Tact programming languages. Creating your Jetton coin is possible even without coding knowledge, using TON Minter or TON Raffles. To do this, you need to fill out a form specifying the main parameters of the coin.
Jetton standard tokens are on DEX exchanges Ston.fi and DeDust. Some are also on CEX. Coin ratings are on the TON App.
Description and Mechanics
The standard was proposed on August 24, 2022, in TEP-0074 and published on GitHub. The interface comprises two smart contracts: the main (master) and wallet contracts. The main contract is for each token, and a separate wallet contract is for each user's address.
In the main contract:
- the total number of tokens is stored;
- metadata about the coin: name, description, logo, number of decimal places, symbol, additional information about quantity (schema presented as a separate standard TEP 0064);
- wallet contract code;
- there is a function for issuing new tokens.
The main contract must have methods for retrieving coin data and calculating the wallet contract address for a specific owner address.
With the wallet contract, we can:
- transfer funds;
- burn tokens: decrease the balance with notification to the main contract;
- get balance, wallet owner address, main contract address, get wallet code.
When transferring tokens, the message is primarily sent to the sender's Jetton wallet contract (decreasing the balance) and then to the recipient's Jetton wallet contract (increasing the balance). If a wallet contract does not exist, it will be created.
Types of Jetton Coins
- Wrapped tokens: These are coins whose value is tied to another coin held as collateral to ensure the value of the wrapped coin. They can exist either within one ecosystem or across different blockchains. Essentially, they act as a «wrapper» for the underlying asset, allowing it to function in new conditions. For example: WTON, jUSDT, jUSDC, jWBTC. Wrapped tokens are necessary for transfers between blockchains, DEX exchanges, and voting in DAO. For instance, jWBTC is equivalent to BTC but on the TON network. It allows us to use the equivalent of BTC without paying high fees.
- Memecoins: Tokens in the form of jokes. They are needed to attract community attention and as a highly speculative asset. For example: Notcoin, Arbuz. Thanks to the viral spread of the game, the Notcoin coin attracted a multimillion audience in a short time, including those who were previously outside the crypto market. After gaining popularity, Notcoin was released and distributed to game participants as Jetton.
- Utility tokens: allow users to access services or features on the platform. For example, JetTon is a gaming coin on the gambling platform, Web3 TON Token is for trading domains on TON DNS, TRIBE is for monetizing digital content.
Differences Between Jetton and ERC-20
Decentralization: Jettons are more decentralized due to the large number of wallet contracts storing balances. In ERC-20, only one smart contract stores and manages all balances. The owner of the ERC-20 standard contract can freeze accounts.
Sending Mechanism: In Jettons, token transfers occur through the interaction with wallet contracts. In ERC-20, they occur through the invocation of one contract's «transfer» function.
Associated Transfer: During Jetton's transfer, additional data and Toncoin can be transferred. ERC-20 does not have this capability.
Burning: Jettons have a unique burning mechanism. In ERC-20 — transfer to an address that does not belong to anyone.
Balance Inquiry: Obtaining the current Jetton balance during transfer can be difficult because the recipient's balance increases on the wallet contract in the next block. In ERC-20, balance data can be retrieved from the last block, meaning the transfer data is in one block.
Mintless Jetton
Mintless Jetton is an extension of the Jetton standard that distributes tokens without directly minting them on the blockchain. It enables airdrops to millions of users while reducing the load on the network.
How it works:
- A system creates a Merkle tree with token recipients and their balances. The tree is stored off-chain (for example, in IPFS).
- The user provides proof (Merkle proof) to verify their right to the tokens.
- The blockchain verifies the proof and mints the tokens to the user's wallet. Until that moment, tokens have not existed on the blockchain.
During the development of the standard, a test token called Mintless Points was created and distributed to 18 million TON wallets. The popular game project Hamster Kombat also uses this airdrop technology.