TON and tokens: transfers
What makes up the fee
The fee for sending TON or token transactions on the TON network is estimated locally in the application based on the current network configuration (config) and message parameters. The calculation includes:- Storage: fee for using contract cells; depends on data volume and network rates.
- Import message: fee for processing incoming external message that the user initiates the transaction with.
- Gas: fee for code execution; depends on the number of outgoing messages (1 message — less gas, several — more; the code uses fixed gas values for 1–4 messages).
- Forward fees: fee for delivering each outgoing message across the network.
Who pays
The fee is always paid by the sender in TON. Without sufficient TON balance in the account, neither TON nor tokens can be sent (exception — gasless scenario for supported jettons, see below).Where it’s shown
Before sending a transfer (TON or token), the preview screen displays a line with the fee in TON and, if necessary, the fiat equivalent. For simple transfers, a “Network fee” block is used with a brief description (and a “more details” button, if available).Gasless
Gasless — the ability to pay the fee for token transfer in the token itself (for example, in USDT), rather than in TON. The TON fee is paid for the user by a relayer (Tonhub service); the equivalent is deducted from the user in the transferred token.When available
- Supported only for specific tokens (list is set by backend config:
gas_jettons). - Available only for W5 wallet (v5R1); gasless is not offered for other wallet versions.
- Configuration (token list and relayer address) is requested from Tonhub API:
gasless/mainnetorgasless/testnet→config. The config specifiesrelay_addressandgas_jettonsarray (master_id).
How gasless fee is calculated
Before sending, the application requests a gasless estimate: request togasless/.../estimate with parameters (wallet address, public key, messages in BOC format). The response includes:
- relay_address — relayer address;
- commission — fee (deducted from user in token);
- from — address from which it will be debited;
- valid_until — until what time the estimate is valid;
- messages — final messages (including fee consideration).
gasless/.../send); the relayer sends it to the network and pays gas in TON.
Limitations and errors
- Cooldown: a pause (several minutes) may be required between gasless transfers; otherwise the user is asked to wait or pay the fee in TON.
- Insufficient funds: if the transfer amount including fee in token exceeds the balance, gasless is unavailable — need to reduce the amount or pay in TON.
- Try later / Not enough: in case of estimation or sending errors, the user sees “Try later” or “Insufficient funds” message and can switch to paying fee in TON if necessary.
SOL and SPL tokens: transfers
The fee for sending SOL or SPL tokens on the Solana network is not calculated in the application. It is requested from the Tonhub backend: POST to/solana/transaction/fees/mainnet (or devnet) with body { transaction } (serialized transaction). The response contains an object with a value field — the fee (displayed to the user in SOL and, if necessary, in fiat equivalent).The fee is paid by the sender in SOL. Without sufficient SOL balance, the transaction will not be signed/sent.
Where it’s shown
In the Solana transfer preview screen, a “Network fee” (blockchain fee) block is displayed with the amount in SOL and fiat (if exchange rate is available).Staking fees
When participating in TON staking, users encounter several types of fees that are set individually by each pool. All fees are clearly displayed in the staking interface before performing operations.- Deposit fee - the fee for sending funds is 0.2 TON.
- Withdrawal fee - the fee for withdrawing funds ranges from 0.2 to 0.4 TON.