DOCUMENTATION

Network Fees

Understand how Onyx network fees are priced, calculated, and converted between XCN and USD.

Documentation

Onyx network fees are paid in native XCN. The network assigns USD-denominated costs to transaction resources, converts those costs into XCN using the current network conversion rate, and exposes wallet-compatible gas values through JSON-RPC.

The XCN amount can change as the conversion rate changes, even when the intended USD cost is broadly stable. Always obtain a fresh gas estimate and gas price immediately before signing.

This page focuses on EVM transactions submitted through the public JSON-RPC endpoint. Native service transactions can include additional resource-based charges; use the final transaction record or explorer entry for the amount actually charged.

Current fee snapshot

The following values were verified against Onyx Mainnet on July 21, 2026 at 19:38 UTC:

ItemCurrent value
Wallet gas price from eth_gasPrice620 Gwei (0x905ae13800)
Wallet gas price in native units62 tinyXCN per gas
Wallet gas price in XCN0.00000062 XCN per gas
Network conversion rate$0.00477 per XCN
Approximate USD cost per gas$0.0000000029574

The raw EVM network fee estimate was 54 tinyXCN per gas at the same snapshot. The public RPC gas price included the network's current 15% safety margin and rounded the result to 62 tinyXCN. This margin helps prevent a transaction from becoming underpriced if the XCN conversion changes between estimation and submission.

At this snapshot, the wallet-facing calculation was:

raw network price = 54 tinyXCN per gas
safety margin = round(54 x 15%) = 8 tinyXCN per gas
wallet gas price = 54 + 8 = 62 tinyXCN per gas

These are dated values, not permanent constants. Query the live RPC before every transaction.

How the fee is calculated

For an executed EVM transaction:

network fee in XCN = gas used x effective gas price / 10^18
network fee in USD = network fee in XCN x current USD-per-XCN conversion rate

The gas limit is a maximum execution allowance, not necessarily the amount charged:

maximum gas budget = gas limit x maximum fee per gas
final execution charge = gas used x effective gas price

Unused gas is not charged. A reverted or otherwise unsuccessful transaction can still consume gas and incur a fee for the work performed.

Example costs at the current snapshot

Gas usedFee in XCNApproximate fee in USD
21,0000.01302 XCN$0.0000621
100,0000.062 XCN$0.000296
800,0000.496 XCN$0.00237

A transfer to an existing account may use 21,000 gas. A transfer that creates its destination account can require substantially more. Use the actual transaction with eth_estimateGas; do not select a gas limit from this table. See Lazy Account Creation.

XCN, tinyXCN, Gwei, and USD

Native XCN settles at 8-decimal ledger precision while EVM JSON-RPC uses 18-decimal wallet units:

1 XCN = 100,000,000 tinyXCN
1 tinyXCN = 10,000,000,000 EVM wallet units = 10 Gwei
620 Gwei = 62 tinyXCN = 0.00000062 XCN

For the snapshot above, the network conversion rate represented 30,000 XCN as 14,310 cents, or:

$143.10 / 30,000 XCN = $0.00477 per XCN

USD figures are estimates for understanding the network's fee denomination. The transaction is charged in XCN, not USD, and a wallet or exchange may display a different market conversion.

Obtain the live values

Read the wallet-facing gas price from the public RPC:

bash

curl -sS https://rpc.onyx.org \
  -H 'content-type: application/json' \
  --data '{"jsonrpc":"2.0","method":"eth_gasPrice","params":[],"id":1}'

Read the current network conversion rate and raw EVM fee schedule:

bash

curl -sS https://api.onyx.org/api/v1/network/exchangerate
curl -sS https://api.onyx.org/api/v1/network/fees

Applications should use eth_estimateGas for gas units and eth_gasPrice for the wallet-facing price. Onyx does not currently use Ethereum's dynamic congestion base fee: baseFeePerGas is zero, while eth_maxPriorityFeePerGas returns the same current value as eth_gasPrice. Do not copy fee settings from another network.

Network fees versus application fees

Network gas is separate from fees charged by an application or protocol:

  • Bridge fees are quoted by the bridge and can vary by asset and direction.
  • Swap fees and price impact are determined by the selected liquidity pool and trade.
  • Staking protocol fees are governed by the staking contract's current parameters.

A transaction can include both a network fee and an application-level fee. Review both before confirming.