·Transfa Team

How Do Transaction Fees Work on Tempo?

Tempo has no native gas token. Transaction fees are denominated in USD and paid in any TIP-20 stablecoin with Fee AMM liquidity.

tempofeesgasstablecoins

Tempo has no native gas token. Transaction fees are denominated in USD and paid directly in TIP-20 stablecoins like USDC, USDT, or any USD-denominated TIP-20 token with liquidity on the Fee AMM. A standard TIP-20 transfer costs approximately 0.1 cent at base fee.

Fee calculation

Fees are specified in units of USD per 10^18 gas. Since TIP-20 tokens use 6 decimals, the formula is:

fee = ceil(base_fee * gas_used / 10^12)

The base fee on Tempo is 20 gwei. The scaling factor (10^12) exists because TIP-20 tokens have 6 decimal places instead of ETH's 18, so the protocol needs more precision in the gas price to represent small fee amounts accurately.

How the fee token is selected

When you send a transaction, the protocol determines which stablecoin to charge using a cascading preference system:

  1. Transaction-level: set explicitly in the fee_token field of a Tempo Transaction (type 0x76)
  2. Account-level: set via setUserToken() on the Fee Manager precompile (0xfeec000000000000000000000000000000000000)
  3. Contract-level: if you're calling transfer() or transferWithMemo() on a TIP-20 token, that token is used for fees automatically
  4. Fallback: pathUSD

The protocol stops at the first level where a preference exists and checks three things: the token is a USD-denominated TIP-20, the payer has sufficient balance, and the Fee AMM has liquidity. If any check fails, the transaction is invalid.

What about eth_getBalance?

Since there's no native token, eth_getBalance returns a meaningless large number (~4.2e+75). The BALANCE and SELFBALANCE opcodes always return 0. Use balanceOf() on TIP-20 token contracts to check actual stablecoin balances.

Fee sponsorship

A third party can pay fees on behalf of a user through co-signatures. The sender signs with domain prefix 0x76, the fee payer signs with 0x78, and the protocol validates both. No Paymaster contracts or bundler infrastructure required.

Related content