Swagger

Fees

Reserve against the worst case, show the expected charge, reconcile what settled.

Reading the fee

Reserve against the worst case before signing, show the expected charge, then reconcile what the operation actually paid.

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.

UserOperation rail

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.

Executor rail

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.

Self-funded and plain rails

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.

Product fees

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.

The dollar parts are priced by a Chainlink feed

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.

Read the actual fee after settlement

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.

Fee token identity

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 versus expectedFee

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.

Gas and service split

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.

Required balance

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.

Settled amounts

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.

Inspect fee estimation in Swagger ↗