Important
Swapping on Fireblocks is not currently available in Germany.
Overview
Fireblocks allows you to swap tokens directly in the Fireblocks Console. Swapping involves trading one token for another on the same blockchain. For example, you can swap ETH for USDT but you can’t swap ETH for SOL. While you use the Fireblocks platform to initiate the transaction, swaps are performed by the Uniswap protocol.
Note
Testnet is supported via Ethereum's Sepolia.
Token swaps are routed through one of the following Uniswap methods. Routes are automatically chosen based on the best price, but you can manually select a different route.
- Uniswap Classic: A protocol that swaps tokens using liquidity pools and an automated market maker (AMM). Learn more.
- UniswapX: An auction-based protocol that aggregates prices across various liquidity sources. Learn more.
We have integrated Uniswap’s UniversalRouter and Permit2 contracts to process token swaps and Uniswap's API to enable UniswapX and pricing estimates.
Supported blockchains
- Arbitrum
- Avalanche
- Base
- Blast
- BNB Chain
- Celo
- Ethereum
- Ethereum (Sepolia)
- OP Mainnet (Optimism)
- Polygon
- World Chain
- ZKsync
The assets on these blockchains must be supported by Uniswap and Fireblocks, either globally or individually on your workspace.
Prerequisites
You must create Transaction Authorization Policy (TAP) rules for the following transaction types:
-
Approve
- You must define the Permit2 contract for the relevant blockchains as the destination. You can also select All Swap destinations instead of selecting individual contracts.
- Example
- Typed message
-
Contract call
- You must define the UniversalRouter contract for the relevant blockchains as the destination. You can also select All Swap destinations instead of selecting individual contracts.
- Example
To define the destination for Approve and Contract call rules in the TAP Editor, go to Destination > Groups and accounts and select the appropriate contracts from the list. This eliminates the need to whitelist the contract addresses in your workspace. For example, select ETH Permit2 to allow Approve transactions when swapping tokens on Ethereum.
Note
If you have previously used your Fireblocks workspace with Uniswap, it’s possible you already created TAP rules with Uniswap addresses as whitelisted destinations. If so, you may want to remove those rules and create new rules using the destinations from the predefined list in Groups and accounts.
Learn how these transaction types are used during swaps.
How to swap tokens
- In the Fireblocks Console, go to the Swap page.
- Select the vault account containing the token you want to swap from.
- Select the tokens you want to swap and the amount to swap. Learn what to do if you can't find the desired token.
- Select the Options and fees dropdown to view the routes and applicable fees.
- You can select a new route or change the slippage tolerance as necessary.
- While the default route contains the best price, changing routes can be helpful when prioritizing longer message deadlines to avoid the short expiration on certain routes.
- Select Swap (or Approve & swap if an Approve transaction is required).
Note that you don't have to preemptively select the blockchain on which you are swapping tokens. When choosing the token, you also determine the blockchain. For example, you can select MATIC (Ethereum) or MATIC (Polygon).
After initiating your swap the appropriate transactions are sent to your mobile device for approval and signing. The Uniswap route determines which transactions you must sign.
Uniswap Classic
- First, sign the Approve transaction (unless you've already signed an Approve transaction for the token you're swapping from).
- Then, sign the Permit message to allow Uniswap to create the swap transaction.
- Lastly, sign the Contract Call transaction to complete the swap.
UniswapX
- First, sign the Approve transaction (unless you've already signed an Approve transaction for the token you're swapping from).
- Then, sign the Permit message. For UniswapX swaps, the Permit message allows Uniswap to create and complete the swap on your behalf.
Types of transactions used during swaps
When swapping tokens within Fireblocks, one or more of the following transaction types may be used. Make sure you have created Transaction Authorization Policy (TAP) rules for each transaction type.
Each transaction used during the swap appears in the Fireblocks mobile app, Recent activity panel, and Transaction History.
Approve
Note
Approve transactions apply to both Uniswap Classic and UniswapX swaps.
Approve transactions call an approve function that allows another address to spend tokens on behalf of the signer. Before the tokens can be swapped, you must sign an Approve transaction that lets the smart contract move your funds.
When swapping tokens on Fireblocks, you only have to sign an Approve transaction per source token. For example, if you swap DAI for USDC and then DAI for USDT, you only have to sign an Approve transaction for the first swap.
Typed messages
Note
Typed message transactions apply to both Uniswap Classic and UniswapX swaps.
Typed messages are a type of off-chain message that can be used to interact with decentralized apps (dApps) or other platforms.
When swapping tokens on Fireblocks, typed message signing is used for signing Permit allowances that allow dApps and smart contracts to move your tokens. Permit allowances combine the token approval and the actual swap into one operation to help you save money on gas fees.
Contract calls
Note
Contract call transactions only apply to Uniswap Classic swaps.
Contract calls are simply methods for calling smart contract functions to execute an operation.
When swapping tokens on Fireblocks, contract call transactions are responsible for moving the tokens being swapped.
Recent swaps
You can use the Recent swaps tab on the right side of the Swap page to track your current and previous swaps. Tokens and amounts appear for each swap transaction. Select an in-progress swap to see the next step in the transaction. Select a completed or failed swap tab to see the transaction’s entire flow and status for each step.
Completed and failed swaps are removed from the Recent swaps tab after 48 hours of their final status.
Message deadlines
Swaps using Uniswap Classic must be signed within 30 minutes of initiating the transaction.
Swaps routed through UniswapX must be signed within 60 seconds or the quote will expire and the transaction will fail.
Fees
Gas fees apply to swaps much like other blockchain transactions.
In addition to the network gas fee, Uniswap Labs charges an additional fee for certain token pairs. Tokens are only subject to fees when swapped on mainnet and supported Layer 2 blockchains. The actual fee amount being charged appears when executing your swap.
Note
Tokens tied to the price of USD, ETH, EUR, and BTC are generally excluded from the Uniswap Labs fee if they are tied to the same underlying asset.
Examples:
- USDT<>USDC = No fee since both are tied to USD.
- wstETH<>rETH = No fee since both are tied to ETH.
- USDT<>wstETH = A fee applies since both are tied to a different asset.
Slippage tolerance
Slippage is the difference between the estimated amount you will receive and the actual amount you receive after the transaction is finalized. For example, a slippage of 5% when swapping tokens might result in you receiving 5% less tokens than what is estimated.
When swapping tokens on Fireblocks, you can define a slippage tolerance in the Options and fees section of your swap estimate. If you set your slippage too low, the swap transaction can fail.
The application of slippage tolerance can vary between the Uniswap Classic and UniswapX routes.
Price impact
It’s possible that your swap can impact the price of those tokens within the liquidity pool being used during the swap. This price impact can be high for illiquid token pairs or markets.
Swap statuses
On the Swap page, you can view the past and ongoing swaps you’ve initiated. Following are the possible statuses for your swaps.
- Creating: Fireblocks is creating the swap you initiated.
- Pending approval: The Approve transaction must be signed before the swap can proceed.
- Pending permit: The Permit allowance typed message must be signed before the swap can proceed.
- Pending contract call: The contract call transaction must be signed before the swap can proceed.
- Processing: The relevant transactions and messages have been signed, and the swap is in progress.
- Complete: The swap has been completed.
- Canceled: The swap was canceled.
-
Failed: The swap could not be completed. Following are some of the reasons a swap can fail:
- The swap quote expired.
- The slippage percentage exceeded your defined slippage tolerance.
- The transaction fee was insufficient.
- Fireblocks could not create the swap.