Wallet architecture
On TON, wallets are smart contracts. Dfns uses wallet contract version 4 (v4), which provides a good balance of features and gas efficiency.Wallet lifecycle
- Address generation: When you create a TON wallet in Dfns, an address is derived from the public key
- Receiving funds: You can receive native TON immediately at this address
- First outbound transfer: The wallet contract is deployed on-chain when you make your first outbound transfer
You don’t need to manually deploy the wallet - Dfns handles this automatically on your first outbound transaction.
Jetton tokens (TEP-74)
TON uses Jettons for fungible tokens, following the TEP-74 standard. Each token you hold is stored in a separate Jetton Wallet - a dedicated contract derived from your main wallet address. You cannot interact with Jetton Wallets directly; transfers go through your main wallet.Transferring Jettons
Use the Transfer Asset endpoint withkind: Tep74 and the token’s master contract address.
How Jetton transfers work
- You send an “external IN” message to your wallet contract
- Your wallet sends a transfer request to your Jetton Wallet
- Your Jetton Wallet transfers tokens to the recipient’s Jetton Wallet
- The recipient’s Jetton Wallet sends a notification to the recipient’s main wallet
- Excess TON (from fees) is returned to you
If you see a
skipped_all_actions error, it means the transaction didn’t have enough TON to pay fees for all messages in the chain. The compute phase succeeded, but the action phase couldn’t execute because funds ran out. Ensure your wallet has sufficient TON balance.Indexing behavior
Dfns relies on notification messages to index inbound Jetton transfers. If a sender omits the notification (to save fees), the transfer may not appear in your transaction history until a subsequent transaction triggers a balance update. Similarly, Dfns does not index all bounce messages. If a transaction fails and bounces, the balance will be updated on your next successful transaction.Transfers
Use the Transfer Asset endpoint for TON transfers:- Native TON: Use
kind: Nativewith amount in nanoTON (1 TON = 1,000,000,000 nanoTON) - Jettons: Use
kind: Tep74with the token’smastercontract address
memo field.
Address formats
TON addresses come in two formats:| Format | Prefix | Description |
|---|---|---|
| Bounceable | EQ... | For smart contracts; failed transactions bounce back |
| Non-bounceable | UQ... | For regular wallets; failed transactions don’t bounce |
Fee structure
TON has a complex fee model where you pay fees when:- Sending messages
- Receiving messages (deducted from the message value)
- Storing data on-chain
