Skip to content

Fees and gas

The 0.75% fee arithmetic, how NEAR charges gas (bought up front at the purchase floor, burnt at the gas price, the rest refunded), and what six measured transactions paid.

A trade costs two things: our 0.75% fee on the NEAR side, and NEAR’s gas. The fee is worked out by your trading account and paid in the same transaction. Gas is charged by NEAR itself: a transaction pays for all the gas it attaches when it becomes a receipt, burns what it uses, and gets the rest back a block later.

The rate is 75 bps, 0.75%, and the contract allows at most 100. An account copies the rate when it’s created and has no method to change it. The factory shows the rate new accounts get:

Terminal window
curl -s https://rpc.mainnet.near.org -H 'content-type: application/json' -d '{
"jsonrpc": "2.0", "id": 1, "method": "query",
"params": { "request_type": "call_function", "finality": "final",
"account_id": "trade.unrlzd.near", "method_name": "get_config", "args_base64": "e30=" } }' |
jq -c '.result.result | implode | fromjson | .fee_config'
# {"fee_bps":75,"fee_recipient":"fees.unrlzd.near"}
  • Buy: the NEAR that goes in, charged only on the share of it the venue used. A swap that uses nothing pays nothing.
  • Sell to NEAR: the signed minimum, not what arrives. For a 24/7 order it’s the order’s stored minimum, even when the fire signed a higher one.

The fee goes to fees.unrlzd.near as plain NEAR, in the same transaction, after the swap settles.

Gas is counted in units; a TGas is 10¹² of them. NEAR prices gas per unit, with a floor of 10⁸ yoctoNEAR (0.0001 NEAR per TGas), and the price moves with how full blocks are. Today the price sits at the floor. Two prices apply to every transaction:

  • The buy price is the higher of the gas price and min_gas_purchase_price, 10⁹ yoctoNEAR (0.001 NEAR per TGas). When the transaction is first processed and becomes a receipt, NEAR takes the attached gas plus the action fees at this price from the signer’s balance.
  • The burn price is the gas price at execution, never above the buy price. Each receipt’s gas is burnt at it.

The difference comes back in refund receipts a block later: the gas not used, plus the price difference on the gas that was. So the real cost is the gas burnt at the gas price, but the account needs the larger amount free at the moment it sends.

What six transactions paid up front for gas, and what they kept

Each transaction bought its attached gas when it became a receipt, at the 1e9 purchase floor, and burnt only what it used, at the 1e8 gas price. Buy: 0.2039 NEAR up front, 0.0025 burnt, 0.2015 refunded. Sell: 0.1469 NEAR up front, 0.0033 burnt, 0.1436 refunded. 24/7 fire: 0.1959 NEAR up front, 0.0025 burnt, 0.1935 refunded. Place order: 0.0309 NEAR up front, 0.0004 burnt, 0.0306 refunded. Wrap: 0.1509 NEAR up front, 0.0005 burnt, 0.1504 refunded. Cross-chain send: 0.1009 NEAR up front, 0.0015 burnt, 0.0994 refunded. 0.00 0.05 0.10 0.15 0.20 0.25 Buy 203 TGas attached 0.0025 of 0.2039 Sell 146 TGas attached 0.0033 of 0.1469 24/7 fire 195 TGas attached 0.0025 of 0.1959 Place order 30 TGas attached 0.0004 of 0.0309 Wrap 150 TGas attached 0.0005 of 0.1509 Cross-chain send 100 TGas attached 0.0015 of 0.1009 Burnt, at the gas price Refunded, seconds later

What six transactions paid up front for gas, and what they kept

Each transaction bought its attached gas when it became a receipt, at the 1e9 purchase floor, and burnt only what it used, at the 1e8 gas price. Buy: 0.2039 NEAR up front, 0.0025 burnt, 0.2015 refunded. Sell: 0.1469 NEAR up front, 0.0033 burnt, 0.1436 refunded. 24/7 fire: 0.1959 NEAR up front, 0.0025 burnt, 0.1935 refunded. Place order: 0.0309 NEAR up front, 0.0004 burnt, 0.0306 refunded. Wrap: 0.1509 NEAR up front, 0.0005 burnt, 0.1504 refunded. Cross-chain send: 0.1009 NEAR up front, 0.0015 burnt, 0.0994 refunded. 0.00 0.05 0.10 0.15 0.20 0.25 Buy 0.0025 of 0.2039 Sell 0.0033 of 0.1469 24/7 fire 0.0025 of 0.1959 Place order 0.0004 of 0.0309 Wrap 0.0005 of 0.1509 Cross-chain send 0.0015 of 0.1009 Burnt, at the gas price Refunded, seconds later
Figure 1.What each measured transaction paid for gas when it became a receipt (the whole bar) and what it actually burnt (the white sliver), on one scale. The rest came back in refund receipts. Read from the chain: the burnt NEAR of every receipt plus every refund to the account.

A measured 0.04 NEAR buy attached 203 TGas. Here is every amount it touched:

Line NEAR
Into the swap 0.04
Fee, 0.75% of 0.04, all of it used 0.0003
Gas paid up front, 203 TGas at the purchase floor plus action fees 0.203920
Gas burnt, 24.56 TGas at 10⁸ 0.002456
Refunded in eight refund receipts 0.201464
Reserve that stayed in the account 0.05

So the account needed about 0.2942 NEAR free to send it (the swap, the fee, the gas paid up front and the reserve), and the buy cost 0.04 + 0.0003 + 0.002456 = 0.042756 NEAR in the end. The gap between those two numbers is the refund: the gas money is paid when the transaction becomes a receipt, and most of it comes back within a few blocks.

Sources

  1. NEAR docs, Gas: buy price, burn price, refunds, 1,000 TGas per transaction (read 2026-10-15)

Last verified 15 October 2026 against R4.