Getting Fee Info
Understand how Skip Go handles user-facing fees
Background
This doc describes functionality in Skip Go for accessing standardized information about the various fees that a user can incur while swapping or transferring. Common fees include:
- Affiliate fees (e.g. fees you charge the user for swapping on your frontend)
- Bridge and relayer fees
- Smart Relayer fees
- Gas fees
Understanding incurred fees from all sources: estimated_fees
estimated_fees
in the response of /route
and /msgs_direct
provides a Fee
array where each entry gives information about a particular fee.
Each Fee
object in the array will have the following attributes:
fee_type
: Enum giving the kind of fee —SMART_RELAY
,SWAP
,BRIDGE
,RELAY
,GAS
bridge_id
: If the fee is a relayer fee (RELAY
) or a bridge fee (BRIDGE
), this gives the ID of the bridge charging the fee (or the bridge where the relayer is providing a service)amount
: The amount of the fee (expressed in the token the fee will be charged in)usd_amount
: Estimated USD value of the feeorigin_asset
: AnAsset
object containing useful metadata for displaying and identifying the token in which the fee is denominatedchain_id
: Chain ID where the fee will be collecteddenom
: Denom of the token in which the fee is denominatedtx_index
: The zero-indexed identifier of the transaction where the user will incur this fee (For multi-transaction routes, fees may be incurred after the first transaction)operation_index
: The zero-indexed entry in the operations array where the user will incur this fee
Included Fees & Current Limitations
The estimated_fees
array consolidates certain fees for easier display. Currently, it includes:
FeeType: SMART_RELAY
for CCTP bridge transfers.FeeType: BRIDGE
fees for the following specific bridges:AXELAR
,HYPERLANE
, andGO_FAST
.
Please note that fees for other bridges (IBC
, Stargate
, LayerZero
, etc.) and other fee types like Swap
or Gas
are not yet included here and the steps where these fees occur are detailed in the operations
array. We plan to expand the coverage of estimated_fees
in the future.
Have questions or feedback? Help us get better!
Join our Discord and select the “Skip Go Developer” role to share your questions and feedback.