Introduction
To understand this document, you should be familiar with the other basic Jetton standards.
Overview
Mintless jettons are an extension (TEP-177 and TEP-176) of the standard Jetton implementation (TEP-74) on TON Blockchain. This implementation enables large-scale, decentralized airdrops to millions of users while minimizing costs and blockchain load. Note that to use mintless jetton to its full extent, you will need to establish off-chain architecture.Basic features
- Scalability: Traditional minting processes can be resource-intensive and costly when distributing tokens to a vast number of users.
- Efficiency: By utilizing Merkle trees, mintless jettons store a single hash representing all airdropped amounts, reducing storage requirements.
- User-friendly airdrops: No separate pre-claim: wallets attach a Merkle proof on first transfer, so users don’t perform a manual claim action.
How it works
Mintless jettons leverage Merkle trees and cryptographic proofs to enable efficient, decentralized airdrops without traditional minting. Here’s a detailed breakdown of the technical implementation:Merkle Tree Foundation
The core innovation lies in representing all airdrop data as a single Merkle tree, where:- Leaf nodes contain airdrop information for individual addresses
- Internal nodes store cryptographic hashes of their children
- Root hash represents the entire airdrop dataset with a single 256-bit value
Data Structures
Airdrop HashMap represent how we store individual users airdrop information.amount
: Number of tokens allocated to the recipientstart_from
: Unix timestamp when claiming becomes availableexpired_at
: Unix timestamp when claiming expires
merkle_hash
: 256-bit root hash of the Merkle tree containing all airdrop data.
Standard wallet storage is extended with:
merkle_hash
: Copy of the master’s merkle hash for validationalready_claimed
: Boolean flag indicating whether the airdrop has been claimed
Claiming Mechanism
custom_payload
field in standard jetton transfers with:
0x0df602d6
: Operation identifier for Merkle airdrop claimsproof
: MerkleProof exotic cell containing the cryptographic proof
custom_payload
.
Cryptographic Proof Validation
When a jetton wallet receives a transfer with a claim payload, it performs these validation steps:- Merkle Proof Verification
- Extracts the MerkleProof exotic cell from
custom_payload
- Verifies the proof’s cryptographic integrity against the stored
merkle_hash
- Ensures the proof path leads to a valid
AirdropItem
for the sender’s address
- Timestamp Validation
- Checks that
now() >= start_from
(claiming period has begun) - Verifies that
now() <= expired_at
(claiming period hasn’t expired)
- Claim Status Check
- Ensures
already_claimed == false
(prevents double-claiming)
- Amount Validation
- Extracts the airdrop amount from the validated AirdropItem
- Credits this amount to the wallet’s balance
State Transitions
Before Claim:Off-chain Infrastructure
Merkle Tree Generation
- Data Collection: Gather all recipient addresses and their allocated amounts
- Tree Construction: Build a binary Merkle tree with AirdropItem structures as leaves
- Hash Computation: Calculate SHA-256 hashes recursively up to the root
- Proof Generation: Create individual Merkle proofs for each recipient
Proof Serving
- Static Storage: Host the complete Merkle tree data at
mintless_merkle_dump_uri
- Dynamic API: Implement
custom_payload_api_uri
to serve individual proofs on demand - Caching: Optimize proof retrieval with appropriate caching strategies
Supporting mintless jettons in wallet applications
Wallet applications play a key role in improving the user experience with mintless jettons:- Display unclaimed jettons: Wallets should show users the jettons they are eligible to claim based on the Merkle tree data.
- Automated claim process: When users initiate an outgoing transfer, wallets should automatically include the necessary Merkle proof in the transfer message’s custom payload.
- Check if the jetton is mintless.
- Verify whether the wallet owner has claimed it.
- If unclaimed, retrieve data from the custom payload API and add the off-chain balance to the on-chain one.
- If the user hasn’t claimed the airdrop, retrieve the custom payload and initialization data from the Custom Payload API and include it in the
transfer
message to the jetton wallet.
- Download the airdrop tree from
mintless_merkle_dump_uri
in the jetton metadata. - Parse the data as explained in Merkle tree generation.
- Make the parsed result available via API.
Wallets are not required to support mintless claims, including indexing airdrop trees. Wallet applications may charge the jetton issuer for this service.