Monetization Guide

Monetize your Swing integration and collect fees from your transaction volume.

Our Fee Collector contract was audited on 31 May 2023, by Peckshield Audit. view audit report

How it works

All Swing partners can set up monetization to collect fees up to 10% of the transaction volume. Swing will take 15% of those collected fees towards Swing treasury as a revenue-shared model. If the integrator does not charge any fees, Swing doesn't collect any additional fees (bridge and gas fees still apply).

Partner Fees percentage will be deducted from the user's initial asset and collected in the FeeCollect sub-contract on the source chain inside Swing Contracts. You can then withdraw the funds from the wallet specified by you during our integration.

For example:

Protocol X has set up fee collection for their project, charging users a 1% fee. A user sends 100 USDC from Ethereum to Arbitrum

  • partner fee of 1 USDC is deducted from the sending token amount and collected in the FeeCollect contract on Ethereum.
  • 0.85 USDC is allocated to Protocol X's registered wallet
  • 0.15 USDC is allocation to Swing's wallet

See a list of monetization-supported bridges and liquididty providers

How to set up Partner Fees

  1. Become a Partner - reach out to us to discuss your needs - Partnership

  2. Set up your integration with the ProjectId to ensure the fees are collected to the correct account:

  1. Contact Swing team to set up Partner Fees. Provide the following information:
  • ProjectId
  • Partner fee percentage (0% - 10%)
  • Wallet address

Note: Once registered, you cannot change your wallet address. We recommend registering and collecting fees with a multi-sig wallet or hardware wallet to improve the safety of your funds.

Once the Contract is set up and your integration passes the ProjectId, Swing will start collecting Partner Fee from your integration’s transaction volume.

Check Fee Percentage

You can query Fee Configuration Contracts (see addresses below) to check the fee percentage setup for your provided wallet address.

  1. Go to the contract address
  2. Go to Contract > Read Contract
  3. In getPartnerShare, input your registered wallet address in the partnerAddress field
  4. The returned number is in bps. Value / 10000. For example 150 = 1.5%

Check partner fees in the quote response

You can query our /quote endpoint to get the calculated partner fees based on the configured percentage. The routes.fees property will return partner fees details ("type": "partner):

{
  "fees": [
    {
      "type": "partner",
      "amount": "2500000000000000",
      "amountUSD": "0.585",
      "chainSlug": "bsc",
      "tokenSymbol": "BNB",
      "tokenAddress": "0x0000000000000000000000000000000000000000",
      "decimals": 18,
      "deductedFromSourceToken": true
    }
  ]
}

Get Collected Fees Balance

The fees are collected on every chain and for every token individually. You can query our Fee Collect contracts to get collected token balances for your registered wallet address:

  1. Select a contract you want to query (see a list of all FeeCollector contracts below)
  2. Go to Contract > Read Contract
  3. In getTokenBalance, input your registered wallet address and the token addresses you want to get balances for.

Note: collected fees balance UI is coming to the Swing Platform soon.

Withdraw Fees

You can withdraw all tokens from a chain or a specific token from a chain. Currently, withdrawal needs to be executed on-chain manually:

  1. Select a contract you want to withdraw from (see a list of all FeeCollector contracts below)
  2. Go to Contract > Write Contract
  3. Connect with your registered wallet
  4. In withdrawPartnerFees, input tokenAddresses you want to withdraw along with the registered wallet address as a receiver address.

Note: withdrawal UI is coming to the Swing Platform soon.

Fee Collect Contract Addresses (v2)

Fee Configuration Contracts

Fee Collect Contract Addresses (v1 - deprecated)