Fees
There are two types of fees associated with using Swing API/SDK/Widget:
- Gas fees
- Bridge fees
- Partner fees
Gas fees
Gas refers to the fee required to execute a transaction on the source chain and is always paid in the source chain native token. Since each transaction requires computational resources to execute, each transaction requires a fee regardless of whether a transaction succeeds or fails. Even if it fails, validators must finalize and execute your transaction, which takes computational power.
Please note that the estimated gas fees are not included in the quoted transfer amount and are deducted from the user’s native token on the source chain.
Gas fees returned by the Swing quote API are estimated amounts and may be lower or higher than the actual gas fees paid at the time of transaction due to the nature of fluctuating gas prices.
When signing transactions in your wallet, estimated gas fees will differ from the maximum Gas Limit, which may appear much larger than the estimate. The maximum gas-limit refers to the maximum the transaction is allowed to spend, even though the actual gas fees paid are expected to be much closer to the estimated ones. A sending wallet will need to have sufficient funds in the native gas token to cover the maximum gas-limit. Experienced users can modify the maximum gas-limit in their wallet at the time of transaction signing but do so at their own risk because an insufficient max-value may cause the transaction to fail and revert.
We can query our /quote endpoint to get the estimated gas fees. The “routes.fees” property will return estimated gas fees details ("type": "gas):
Bridge Fees
Swing aggregates bridges and each bridge has its own fee structure set up.
There are two types of bridge fees:
- Bridge fee (source token)
- Bridge fee (source chain native token)
1. Bridge fee (source token)
This type of bridge fee is required from a bridge to perform a transaction and is deducted from the input source token and will be reflected in the output destination token. Depending on the bridge, this fee may include bridge protocol fees, liquidity provider fees and destination transaction fees. See the table below for bridge fee details for each aggregated bridge:
Bridge | Protocol Fee | Liquididty Partner Fee | Destination tx fee (in source token) |
---|---|---|---|
Celer | ✅ | ✅ | |
Stargate | ✅ | ✅ | |
deBridge | ✅ | ||
Hop | ✅ | ✅ | |
Multichain | ✅ | ||
Across | ✅ | ✅ | |
Hyphen | ✅ | ✅ | |
Synapse | ✅ | ✅ |
We can query Swing API /quote endpoint to get this bridge fee. The “routes.fees” property will return "type": "bridge” and "deductedFromSourceToken": "true".
For more information on the bridge-specific fees please refer to the official bridge documentation:
2. Bridge fee (source chain native token)
Some bridges like Stargate and deBridge, which support swaps on the destination chan, require native tokens to be provided to cover the destination-chain gas cost for sending the tokens to the user.
These fees are not deducted from the source token and are paid in the source chain's native token. For example, if the transfer is performed from the Ethereum chain, then the fixed ETH amount will be deducted from the user's wallet. The sending user’s wallet must have sufficient balance in the source chain’s native token to cover this type of bridge fee.
We can query Swing API /quote endpoint to get this bridge fee. The “routes.fees” property will return "type": "bridge” and "deductedFromSourceToken": "false".
Swing Partner Fees
Swing partners can monetize their Swing integrations by collecting partner fees from transaction volume (up to 10%).
If an integrator did not set up monetization for their project - the partner fee is not collected.
Learn how to set up your monetization for your project
We can query our /quote endpoint to get the deducted partner fees calculated based on the configured partner fees percentage. If the partner fees amount returns 0, this project doesn't have partner fees configured. The “routes.fees” property will return partner fees details ("type": "partner):