- When you make a transfer on Cobo Portal, you can see the estimated transaction fee on the UI.
- You can call the Estimate transaction fee API operation.
The estimated transaction fee reflects current network conditions and may change by the time the actual transaction is processed.
request_type: The type of transaction, which can be a transfer or a contract call.source: The transaction source.destination: The transaction destination.- (Only required for transfers)
token_id: The ID of the token being transferred. - (Only required for contract calls)
chain_id: The ID of the chain on which the smart contract is deployed.
Fee models
Each blockchain may employ multiple fee models to calculate transaction fees. For EVM chains, both the Legacy and EIP-1559 models are supported. Most transactions follow the blockchainโs native fee model. However, transactions from Custodial Wallets (Asset Wallets) and Exchange Wallets always use the fixed fee model. If you specify a different fee model when initiating a transaction from these wallets, the API request will return an error.EVM chains
EIP-1559 model
The following chains currently support EIP-1559:- Ethereum Mainnet
- Sepolia Testnet
- Scroll Mainnet
- Base
- BNB Smart Chain
- Polygon
- Sonic
- Berachain
For the Legacy and EIP-1559 fee models, an additional fee is charged for submitting transaction calldata to L1 (Layer 1). This fee is reflected in the API response under the
reserved_fee field.- Max fee per gas: The maximum fee per gas unit you are willing to pay.
- Max priority fee per gas: The maximum priority fee per gas unit you are willing to pay.
- Gas limit
Legacy model
All EVM chains support the Legacy model. In the Legacy model, the transaction fee is calculated as: gas price * gas limitFor the Legacy and EIP-1559 fee models, an additional fee is charged for submitting transaction calldata to L1 (Layer 1). This fee is reflected in the API response under the
reserved_fee field.- Gas price
- Gas limit
UTXO-based chains
Currently supported chains include:- Bitcoin
- Cardano
- Nervos CKB
- Handshake
You can customize the following values:
- Fee rate
- Max fee amount
Solana
On Solana, you can use either the native model or the Legacy model. In the native model, the transaction fee is calculated as: base fee + (CU price * CU limit)
You can customize the following values:
- CU price
- CU limit
Activating a Solana token sub-address (Associated Token Account) incurs a one-time rent paid by the source address, separate from the network transaction fee. For details, see Solana token account rent.
Solana and Filecoin both support two fee models: their native model and the Legacy model. When calling transaction API operations, you can choose which model to use. However, for Replace-By-Fee (RBF) transactions, you must use the same fee model as the original transaction.
Filecoin
On Filecoin, you can use either the native model or the Legacy model. In the native model, the transaction fee is calculated as: min(gas fee cap, base fee + gas premium) * gas limit
You can customize the following values:
- Gas fee cap
- Gas premium
- Gas limit
Solana and Filecoin both support two fee models: their native model and the Legacy model. When calling transaction API operations, you can choose which model to use. However, for Replace-By-Fee (RBF) transactions, you must use the same fee model as the original transaction.
Chains using the fixed model
The following chains use a fixed fee model:- TRON
- Algorand
- Polkadot
- Internet Computer and its ICRC assets (ckBTC, ckETH, ckUSDC, ckUSDT, DKP, GLDGOV, ICS, NICP, OC, OGY)
- Stellar
- Ripple
- Tezos
- Sui
- Near
Fee levels
Transaction fees are influenced by speed levels. Users can choose between slow, recommended, and fast transaction speeds, with faster speeds incurring higher fees. Cobo supports three fee levels for Legacy, EIP-1559, UTXO, Solana and Filecoin models:- Slow: Lower fee for slower processing.
- Recommended: Balanced fee and confirmation time.
- Fast: Higher fee for quicker processing.
Replace-By-Fee (RBF) transaction fee
Replace-By-Fee (RBF) is a feature that allows you to replace an unconfirmed transaction with a new version that typically pays a higher transaction fee. This functionality provides flexibility to modify transactions after they are broadcast but before they are confirmed by miners. For more details, refer to Replace-By-Fee (RBF) transactions. The logic for estimating RBF transaction fees is similar to that for normal transactions, with the addition of a fee increase for the RBF transaction. The key points to consider when estimating RBF transaction fees based on different fee models are as follows:- Legacy: Increase the gas price. The gas price for an RBF transaction must be higher than that of the transaction being replaced.
- EIP-1559: Increase both the max fee per gas and max priority fee per gas.
- UTXO: Increase the fee rate and ensure that the product of the fee rate and transaction size is greater than that of the original transaction. If not, the node might reject broadcasting the transaction.
- Fixed: Increase the fee amount.
- Filecoin: It is recommended to increase both gas premium and gas fee cap by 25%.
Fees on Layer 2 chains
On Layer 2 (L2) chains such as Arbitrum, network fees can change rapidly. If fees rise sharply after you submit a transaction, the transaction can remain in thePendingSignature or Broadcasting status longer than expected. How you unblock it depends on the status:
Broadcasting: The transaction is already broadcast. Use the Replace-By-Fee (RBF) speed-up operation to rebroadcast it with a higher fee. To raise the fee, use the Speed up transaction operation. For how RBF works end to end, see RBF (Replace-By-Fee) transaction lifecycle.PendingSignature: The transaction is not yet broadcast, so RBF does not apply. The transaction must be signed within a limited signing window; if signing does not complete in time, it fails with the sub-statusFailedSignerTimeout. In that case, submit a new transaction to try again. For details, see Transaction statuses and sub-statuses.
