-
Notifications
You must be signed in to change notification settings - Fork 316
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add concept and specifications pages about Jettons #949
base: main
Are you sure you want to change the base?
Conversation
|
||
## What is a Jetton? | ||
|
||
**Jetton** is a fungible token standard on **The Open Network (TON)** blockchain, similar to **ERC-20 tokens** on Ethereum. It allows developers to create and manage custom tokens for various purposes, which can be used within decentralized applications and services on the TON blockchain, such as stablecoins, game tokens, governance tokens, and more. Unlike the native token **Toncoin (TON)** used for system operations, Jettons are custom tokens designed for specific use cases within the TON ecosystem. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We aim to focus our readers on the user's perspective, positioning the user as the central actor:
This technology enables users to…
|
||
## What is a Jetton? | ||
|
||
**Jetton** is a fungible token standard on **The Open Network (TON)** blockchain, similar to **ERC-20 tokens** on Ethereum. It allows developers to create and manage custom tokens for various purposes, which can be used within decentralized applications and services on the TON blockchain, such as stablecoins, game tokens, governance tokens, and more. Unlike the native token **Toncoin (TON)** used for system operations, Jettons are custom tokens designed for specific use cases within the TON ecosystem. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This explanation should be refined into a minimalistic and clear version. Let's avoid including any information that is not immediately useful to readers in this moment.
Example of structure:
- Provide a short easy to read definition using basic language that relates to everyday life rather than Web3 terms. 1-2 lines.
- Give a real-life use cases as well as examples from the TON Ecosystem. 1-2 lines.
- Give an example of tokens from Ethereum.
|
||
- [Jetton Master Contract](https://github.com/ton-blockchain/token-contract/blob/main/ft/jetton-minter.fc) | ||
- [Jetton Wallet Contract](https://github.com/ton-blockchain/token-contract/blob/main/ft/jetton-wallet.fc) | ||
- [Jetton Minter Contract (optional)](https://github.com/ton-blockchain/token-contract/blob/main/ft/jetton-minter.fc) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is incorrect; in this context, the minter and master are the same entity.
|
||
## How Do Jettons Work? | ||
|
||
Jettons are implemented using **a smart contract-based architecture** that ensures their creation, management, and interaction within the TON blockchain. The core components of the Jetton architecture include: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's useful to set a landing stage to smart contract terms. We need to educate users—who will check their balance in explorers—from the very beginning, not just developers.
For example:
When you use jettons, like USDT, jetton smart contracts manage the transfers, balance updates and enforce the rules. These contracts ensure that every operation is safe and fair without needing a classic bank-side to oversee it.
|
||
:::note Jetton Wallets should not be confused with general blockchain wallets for managing Toncoin or other assets. ::: | ||
|
||
### 3. Jetton Minter Contract (Optional) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minting operation is defined in the minter contract. Minter contract is not optional.
|
||
**Jetton** is a fungible token standard on **The Open Network (TON)** blockchain, designed to facilitate custom token creation, transfer, and management. This specification defines the technical requirements for Jetton smart contracts, ensuring seamless interoperability between wallets, dApps, and services. | ||
|
||
- **TEP:** [74](https://github.com/ton-blockchain/TEPs/blob/master/text/0074-jettons-standard.md) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Original standard formated for GitHub, but now it's harder to read. Could you refactor this, to make this read easer in docs.ton.org version?
Structure of entire document, should be more similar to Types of Wallet Contracts.
We have:
- Jetton master contract
- storage specification
- operations specified with op codes
- get methods
- Jetton wallet contract
- storage specification
- operations specified with op codes
- get methods
We can limit this version with Jetton minter and Jetton wallet TEP-74 without extensions.
|
||
Below is a Tact implementation of messages, including `transfer`, `internal_transfer`, `transfer_notification`, and `excesses`. | ||
|
||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, split long code snipets to short.
|
||
## Prior art | ||
|
||
1. [EIP-20 Token Standard](https://eips.ethereum.org/EIPS/eip-20) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We needn't links to Ethereum in this documentation.
@@ -0,0 +1,51 @@ | |||
# Jettons |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both files should be placed in the left side menu. Please add pages in menu and check rendered documentation locally with
npm run start
- [Jetton Wallet Contract](https://github.com/ton-blockchain/token-contract/blob/main/ft/jetton-wallet.fc) | ||
- [Jetton Minter Contract (optional)](https://github.com/ton-blockchain/token-contract/blob/main/ft/jetton-minter.fc) | ||
|
||
These contracts create, manage, and transfer custom tokens (Jettons) within the TON ecosystem. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please provide a more detailed explanation to readers about the different types of Jetton Wallet contracts.
For clarity, let's refer to the Tonviewer explorer types available in the UI. The Tonviewer jetton wallet types are defined according to this parser.
- 1 x jetton_master type
- 4 x jetton_wallet contract types
Which defined as:
jetton_master
corresponds to the standard TEP-64.
with any combination the jetton wallet contract:
1.jetton_wallet
- standard contract according the TEP-74 - example: jUSDC
2. jetton_wallet_v1
- standard extension, example: CATI
3. jetton_wallet_v2
- standard extension, example: DOGS
4. jetton_wallet_governed
- standard extension, example: USDT
These types offer different features and incur varying gas costs for transfers.
Every combination of [jetton_master + jetton_wallet_x] contracts may be minted according to the Mintless jetton standard.
Take in account this hint and do the following:
- Explain the basic concepts of jettons as additional contracts for users. (Remember, users ultimately operate with Wallet Contract addresses.) Use a recognizable example, such as the USDT jetton, to illustrate these concepts.
- Describe the differences among jetton types and provide examples to clarify each concept. Focus on the features they offer rather than on technical details.
- Explain the mintless jetton feature and how it works from the user's perspective.
- Combine theoretical explanations with practical examples and addresses.
- Avoid overwhelming the explanation with too many links or technical terms.
This PR introduces a concept page explaining Jettons' structure and functionality and provides a specification page detailing Jetton standards. These additions will help developers and users better understand and implement Jettons within the TON ecosystem.