Developer guide

Fees, ledger and reconciliation

5 min read

Quotes and fees

All monetary values use integer base units. A quote separates the ChatterPay service fee, provider fee, sponsored network fee and total debit. The initial policy charges 25 basis points for swaps and cross-chain transfers; provider fees remain explicit components rather than hidden markup.

Whose policy prices an operation

A fee policy is resolved by (partner, chain, operationType), most specific first, and the lookup always terminates on the reference catalog — so a deployment that configures nothing prices exactly as the paragraph above describes. A Partner's own policy is versioned, and the version is frozen into the quote and the operation, so a past fee stays explainable after that Partner renegotiates.

A service fee is expressed either in basis points or as a fixed amount in USD, converted to the operation's asset when the quote is priced. A fixed_usd policy freezes the rate, its source and the instant it was read into the quote; a quote that cannot be priced within the policy's freshness bound is refused by name rather than falling back to a stale rate, to zero, or to basis points.

Charging and collecting are separate

A fee is accrued when the operation is booked: the debit on the payer has a counterpart credit to a collection account per (partner, asset), so the ledger conserves it. It is collected by a sweep — scheduled or triggered by a per-asset threshold — into the Partner's ChatterPay collection wallet, as a durable operation reconciled against its own on-chain evidence.

Sweeping rather than moving the fee inside every operation is deliberate: charging on chain per operation would roughly double its gas for an amount usually smaller than that gas.

The collection wallet is configuration of the Partner, is reported as a platform account of its own role, and is rotatable by an administrative operation that records the previous address, the new one, who ordered it and when. An accrual binds the address in force when it was booked; an in-flight sweep is never silently retargeted.

What the surfaces report

Alongside what an operation cost, the surfaces report the revenue side: the collection wallet's balance per asset, what is accrued and not yet swept, and whether each fee was paid out of the user's balance or absorbed by the Partner.

Append-only ledger

The ledger uses a PostgreSQL ledger_postings table that is insert-only. Corrections use compensating entries, never silent mutation. Its projection is a fast read-model cache rebuilt from the ledger, which remains the durable source of truth for what the platform has accounted and for what it will let a wallet spend. What a wallet is reported to hold is read from the chain, and the projection travels beside it: the two differ by whatever arrived at an address without this platform sending it.

Reconciliation

For direct EVM transfers, reconciliation independently reads the transaction receipt and ERC-20 Transfer event. LI.FI, ERC-4337 and Bitcoin transfers are reconciled against their own on-chain and provider evidence, with durable reservations, fee disaggregation and scheduled discrepancy handling.

Operational rule

Declared limitation The operation is re-admitted to execution from broadcast_unknown by a durable compare-and-set, which rebuilds and re-signs the transaction before submitting it again, rather than resolving that submission against the chain first. The specification asks for the chain to be consulted before it is sent again, and a deployment does not guarantee that today.

Notification delivery can fail without changing the financial outcome.

Capabilities in this area

This area covers the capabilities below. The Roadmap states the current availability of each one.

  • Initial fee catalog and calculation — Each type of operation has its fee defined in a catalog. The quote returns the amount that will be charged and what it corresponds to, calculated before the operation executes.

  • Crediting funds that arrive from outside the platform — Money paid into a wallet's address by somebody else is observed and credited once its network's depth is reached; what cannot be attributed is recorded instead of credited, and a credit the chain drops is undone. What is open is the EVM network's own coin: on the deployed test networks a native deposit from an external address is not yet credited, and Bitcoin and Cardano deposits, read by the same component, have not been exercised on a public network yet.

  • Partner fee policies, accrual and sweep — A fee is priced by the policy of the Partner, the chain and the operation type, accrued to a collection account when the operation is booked, and swept to the Partner's collection wallet as an operation of its own. Charging on chain per operation would roughly double its gas for an amount usually smaller than that gas.

  • Rotatable collection wallet — The collection address is configuration of the Partner and is replaced by an administrative operation that records the previous address, the new one, who ordered it and when. A rotation for every network rewrites every network that has a destination of its own, and says which ones it kept.

  • Per-tenant reconciliation reports — A Partner can pull the reconciliation of its own operations for a period: what was recorded, what the chain proved, and every case where the two disagree, separated into the ones the reconciler resolved and the ones left for manual review.

  • Daily operational close — A daily process closes the period, calculates the balances of each tenant and produces a report with the movements and fees of the day, so the Partner can compare it against its own accounting.