Jetton Withdrawals: Reservations, Confirmation and Ledger

Crypto / FinTech · Jetton ledger

A withdrawal request is not a completed chain transfer. Between the button click and network confirmation, funds need a reservation and each status update must be safe to retry.

Available funds differ from total funds

In the Jetton ledger, the available amount is the total balance minus frozen_atomic. The service locks the balance row and checks this remainder before reserving. A reservation increases the frozen part without reducing the total: the system still owes the funds while the external wallet service processes the withdrawal.

Amounts use atomic units and string-based arithmetic. This avoids rounding errors with tokens that may have different decimal precision.

Confirmation and failure are different ledger entries

Confirmation reduces both total and frozen balances. Rejection or failure releases only the reserve, making the funds available again. Each stage writes a ledger entry with its own idempotency key; a repeated status must not cause a second deduction.

The project also includes TON balance audits and a custody snapshot service. They compare internal obligations with wallet-side data rather than replacing a journal with one “balance” number.

What to test before launch

Test confirmation, rejection, repeated callbacks and concurrent withdrawals. The invariant is the same in every case: frozen funds cannot exceed the total balance, and each external outcome affects the ledger once.

Full P2P platform case study → · TON treasury collection →