💲(Legacy) Get Fee Structure

Get Fee Structure

GET endpoint/xyBridgeConfigs

Query Parameters

{
    "isSuccess": true,
    "config": {
        "1": {
            "56": {
                "USDT": {
                    "feeDetails": {
                        "minimumFee": 0.5,
                        "maximumFee": 1000.0,
                        "feeRate": 0.00050
                    },
                    "minimumSwapAmount": 30.0
                },
                "USDC": {
                    "feeDetails": {
                        "minimumFee": 0.5,
                        "maximumFee": 1000.0,
                        "feeRate": 0.00050
                    },
                    "minimumSwapAmount": 30.0
                }
            }
        },
        "56": {
            "1": {
                "USDT": {
                    "feeDetails": {
                        "minimumFee": 30.0,
                        "maximumFee": 1000.0,
                        "feeRate": 0.00050
                    },
                    "minimumSwapAmount": 30.0
                },
                "USDC": {
                    "feeDetails": {
                        "minimumFee": 30.0,
                        "maximumFee": 1000.0,
                        "feeRate": 0.00050
                    },
                    "minimumSwapAmount": 30.0
                }
            }
        }
    }
}
{
    "isSuccess": true,
    "config": {
        "1": { // source chain
            "56": {  // destination chain
                "USDT": {  // bridge & bridge token
                    "feeDetails": {  
                        "minimumFee": 0.5, // in bridge token
                        "maximumFee": 1000.0, // in bridge token
                        "feeRate": 0.00050 
                    },
                    "minimumSwapAmount": 30.0 // in bridge token
                },
                "USDC": {  // bridge & bridge token
                    "feeDetails": {
                        "minimumFee": 0.5, // in bridge token
                        "maximumFee": 1000.0, // in bridge token
                        "feeRate": 0.00050
                    },
                    "minimumSwapAmount": 30.0 // in bridge token
                }
            },
            "10": { // destination chain
                ...,
            },
            "137": { // destination chain
                ...,
            },
        },
        "56": { // source chain
            ...,
        }
    }
}

Discover more about how XY Bridge fees are calculated at(Legacy) XY Bridge Fee Information

The "configs" object is organized in a hierarchical structure, where "1" represents the chain ID of the source chain. Underneath the source chain, there are multiple chain Id of destination chains, such as "10," "56," "137," and others. All fee-related configurations for each bridges are disclosed under each chain pair.

The bridge fee follows the equation below:

  • feeDetails: The fee is computed by multiplying the source bridge token amount by the feeRate. This fee serves a dual purpose: it covers the gas expenses incurred by our service on the destination chain and rewards both Y Pool liquidity providers and XY DAO.

    • minimumFee: Will be charged when the product is less than the specified minimum, minimumFee.

      • For example: minimumFee: 0.5U, amount: 10 USDC, feeRate 0.00050.

      • The fee amount in this case would be 0.5U, since 10*0.00050 = 0.005 is less than the minimumFee: 0.5U.

    • maximumFee: Will be charged when the product is more than the specified maximum, maximumFee.

      • For example: maximumFee: 1000U, amount: 2500000 USDC, feeRate 0.00050.

      • The fee amount in this case would be 1000U, since 2500000*0.00050 = 1250 is more than the maximumFee: 1000U.

    • feeRate: Represents the proportion of the amount that is charged as a fee.

  • minimumSwapAmount: Please ensure that your amount is greater than this amount; otherwise, the response may result in an error.

Last updated