Reserve the estimate
POST /fee/estimate is a pre-execution planning value. Reserve and check sufficiency against estimatedFee, and keep that reserve outside the transfer or swap so the submitted operation can pay for itself.
Reserve against the worst case, show the expected charge, reconcile what settled.
Reserve against the worst case before signing, show the expected charge, then reconcile what the operation actually paid.
POST /fee/estimate is a pre-execution planning value. Reserve and check sufficiency against estimatedFee, and keep that reserve outside the transfer or swap so the submitted operation can pay for itself.
The Paymaster deducts the network gas plus a $0.05 static fee plus 0.1% of the transferred input value, all denominated in the fee token. Gas is a cost rather than a rate; only the static and percentage parts are configured.
The executor prices an operation identically to the Paymaster and collects it in an ERC-20 fee token. Its terms travel with the request and are capped on-chain, so the signed maximum is a ceiling the settled charge stays under.
The account pays its own gas in the network's native coin and UGTP charges nothing, so no ugtpFee is returned. Reserve against the estimate anyway: the balance must cover the amount plus the gas ceiling, or the prepare is refused with INSUFFICIENT_NATIVE_BALANCE.
Swap routing and private tokens carry their own fee on top of the rail fee, resolved per project. For private tokens only a deposit and a withdraw pay one — a percentage of the PUBLIC amount, 0.25% by default — while a private transfer and a one-time registration cost the account nothing. The rate is per-project configurable, so read productFee and the quote figures the endpoint returns rather than assuming it.
A $0.05 static fee and a percentage of value have to become an amount of the fee token, and that conversion happens on chain: the fee-collecting contracts read a Chainlink USD price feed for the token and for the network's own coin. A preview is a read of those same contracts, so it prices the same way — and a feed tick between the preview and settlement is one more reason estimatedFee, not expectedFee, is the figure to reserve against.
GET /transaction/history reports the fee an operation actually collected, and only once a terminal receipt has persisted it. Before settlement it can be absent.
The returned symbol identifies the asset every amount in the response is denominated in. Every Raw field is that asset's base units; the paired field without the suffix is the same value formatted for display.
estimatedFee is the worst case — the gas limits priced at the bumped ceiling — and is the only figure to reserve, cap, or check a balance against. expectedFee is what the operation is expected to actually bill and is the one to show a user before they confirm.
gasFee and serviceFee divide expectedFee into the network's own cost and the UGTP markup, and they sum back to it exactly. Display only: they arrive together or not at all, so never reserve or check sufficiency against either half.
requiredBalanceRaw is what the account must hold of the fee token for the request to pass validation, which is not always the fee alone. It is returned on the executor rail only, and its absence must never be read as zero.
After a terminal receipt, compare what the operation was quoted with what history reports it collected. A ceiling that was signed before execution is not the charge that settled.