Skip to content
CTRL K
    Fees and costs

    Fees and costs

    Writes can cost money. This page is about showing those costs in your UI.

    Today’s documented ledger is Infinite Mainnet (EVM). Cost kinds such as bridge and multi-ledger gas lines are contract shapes for when a quote path spans ledgers — they may be absent on single-ledger Infinite Mainnet quotes.

    Two different things

    QuestionAnswer
    Do writes cost something?Yes — network gas and Nutrimatic’s service fee apply on writes. Swaps can also include market / bridge costs.
    Does the SDK give you a cost list before you execute?Only for swaps. Call routing.quote; the quote includes a costs array you can show on screen.

    routing.quote is the method that asks for a swap quote (amounts, slippage, expiry). That quote’s costs field is the breakdown for your “you will pay…” UI.

    For liquidity, approve, stake, and farm, those writes can still charge gas and the service fee when they run, but the SDK does not return a costs list beforehand. Your UI can confirm the action and follow status; it does not get a swap-style cost breakdown for those calls.

    Cost lines on a swap quote

    Each entry in Quote.costs has kind, amount, instrumentId, and sometimes estimated.

    FieldTypeDescription
    kindQuoteCostKindWhat this line is — see kinds below.
    amountstringDisplay decimal in that instrument’s units (same style as other write amounts).
    instrumentIdInstrumentIdAsset this line is denominated in. Resolve the symbol via the catalog if your UI needs a ticker.
    estimatedbooleanOptional. When true, treat amount as approximate until the write confirms on-chain. Common for gas; sometimes for bridge.
    kindWhat it isPaid in
    gasNetwork execution costLedger native
    tradeMarket / swap fee for the routeThat line’s instrumentId (often a trade asset)
    bridgeExtra cost when the plan moves value across ledgersThat line’s instrumentId
    serviceFixed Nutrimatic fee for the writeLedger native

    Example — Quote.costs on a swap

    [
      {
        "kind": "trade",
        "amount": "0.0045",
        "instrumentId": "evm:421018:instrument:42"
      },
      {
        "kind": "gas",
        "amount": "0.0007",
        "instrumentId": "evm:421018:instrument:42",
        "estimated": true
      },
      {
        "kind": "service",
        "amount": "0.0001",
        "instrumentId": "evm:421018:instrument:42"
      }
    ]

    When each kind appears (swap quotes)

    KindOn a swap quote
    gasAlways; usually estimated: true
    tradeAlways
    serviceAlways
    bridgeOnly when the quote path needs a cross-ledger step
    • A successful swap quote includes the lines that apply — show those; if a kind is absent, it does not apply to that quote.
    • Do not sum lines that use different instrumentIds into one number — show each line with its own asset (or convert in your UI if you have prices).

    Multi-ledger quotes

    When a quote’s path spans more than one ledger:

    • You may see more than one gas or service line — one per ledger involved, each in that ledger’s native instrument.
    • A bridge line appears when there is a cross-ledger step; its instrumentId is the asset that line is charged in.
    • Quote.ledger is still the primary ledger for the quote; cost lines carry their own instrumentId (and thus ledger) per line.

    Service fee

    • Fixed per ledger — same amount for all writes on that chain.
    • Always in that ledger’s native instrument.

    Amounts can differ across ledgers: native tokens vary a lot in price, so each ledger’s fee is set to stay modest in real terms.

    This small fee helps us keep building Nutrimatic with care — so you can keep shipping on a product we love making.

    Infinite Mainnet (evm:421018): 0.0001 42 on every write. See Ledgers.

    Related

    GoalStart here
    Get a swap quote that includes costsSwaps — routing.quote
    Multi-step path feesSettlement — Path
    QuoteCost shapeTypes — QuoteCost
    Write overviewWrite operations
    Liquidity / stake / farm (no pre-execute costs list)Liquidity · Staking · Farming