How to process TON deposits safely

TON deposits · Webhooks · Opcodes · Dust protection

How to process TON deposits safely

An incoming blockchain message is not automatically a customer deposit. Treating every transfer as money to credit is one of the most dangerous shortcuts in a crypto backend.

A production deposit pipeline must classify protocol messages, apply economic thresholds, confirm finality and separate blockchain detection from balance delivery.

Opcodemessage type
Dustminimum value
Hashdeduplication
Confirmfinality
Outboxdelivery

Not every incoming message is a deposit

Protocol notifications

Jetton wallets may send transfer_notification or excesses messages containing TON value that must not be credited as the transferred token.

Message classification

Opcode, source, destination, bounced state and decoded payload are checked before the event enters deposit logic.

Expected asset and network

The service verifies the wallet role, chain, token master and address mapping rather than trusting provider labels.

Dust and economic validation

Minimum credit threshold

Tiny transfers below the configured threshold are recorded but not turned into customer balance.

Fee awareness

The pipeline considers whether the value can be moved or processed without consuming more in network fees.

Abuse resistance

Rate limits and aggregation prevent cheap incoming messages from creating an unlimited processing workload.

Detection and delivery are separate

  1. Detect and normalize

    Webhook and polling produce the same normalized transaction record.

    Provider · polling · transaction
  2. Confirm and classify

    Wait for the required state, decode the message and validate the asset and amount.

    Confirmation · opcode · value
  3. Store idempotently

    Use blockchain identifiers and wallet context as unique keys.

    Hash · logical time · unique constraint
  4. Publish through outbox

    Retry delivery to the main platform until the same deposit is acknowledged once.

    Outbox · HMAC · acknowledgement

Technology and delivery

TON Transactions · Opcodes · Jetton notifications · confirmations
Backend Webhook + Polling · unique keys · outbox · idempotent crediting

Expected result

A deposit pipeline that credits only verified customer transfers, ignores protocol noise and dust, and survives repeated events or temporary service outages.

TON Deposits · Webhooks · Opcodes · Jetton · Dust Protection · Outbox · Idempotency

Discuss your project

If you have a project involving Python, Laravel, Node.js, CRM, Telegram, AI/RAG, API integrations, automation or TON/GRAM logic, send me a short description of what you need.

You can simply explain what exists now, what is not working, what outcome you expect and which services are already involved.


Let’s discuss your project

Tell me what you would like to build. I will reply by email.

Or message me on Telegram @ifwcom