Getting Monetized on Swing
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 theFeeCollect
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
-
Set up your integration with the
ProjectId
to ensure the fees are collected to the correct account: -
If we didn't set up a Telegram group from your first with us, then you can reach out us via Discord to setup a Telegram Group and set up Partner fees for your project:
- First, create a ticket on our official Discord channel. You can do that right here!
- Next, in your ticket description, provide us with this these details:
Field | Description |
---|---|
ProjectId | Your project's projectId |
Partner fee percentage (0% - 10%) | Fee percentage you want on every transaction |
Chains | The chains you want monetization enabled on |
Wallet address(es) | The wallet address(s) that your collected fees will be withdrawn to |
We recommend registering and collecting fees with a multi-sig wallet or hardware wallet to improve the safety of your funds. Using a multi-sig wallet offers the same flexibility as using a regular EOA wallet but with greater security. Regardless of the wallet type you're using, Swing lets you:
- Update fee sharing percentages at any time.
- Set up different wallet addresses on different chains (multi-sig wallets now supported).
- Update fee collection wallet addresses at any time.
The wallet address(es) you submit to Swing for your fee collection will be set up inside our FeeCollector Contract
, which handles the collection of fees for all our partners.
It's important to note that if you decide to change or disable your current fee collection wallet address, the tokens collected by our
FeeCollector
Smart Contract for that wallet address will still be disbursed to that same address. So make sure that you always have access to your previous fee collection wallet address even after changing it.
Once the Contract is set up and your integration passes the ProjectId
, Swing will start collecting Partner Fee from your integration’s transaction volume.
Squid Router Monetization
Unlike other monetizatable bridges on Swing, the squid bridge is monetized using a different method laid out by the Squid team.
Example:
- Protocol X has set up fee collection for their project, charging users a 1% fee.
- For every transaction that goes through Squid, Squid collects a 1% fee.
- Fee Breakdown: Squid takes a 50% cut and the remaining 50% goes to the integrating Partner. In this case, Swing doesn't take any fees as the fee sharing setup is between Squid and the integrating Partner's wallet address.
- Fees are collected in the bridge token. Most of the time, this will be
axlUSDC
as this is the primary bridging token on Squid.
Check Fee Percentage
You can query Fee Configuration Contracts (see addresses below) to check the fee percentage setup for your provided wallet address.
- Go to the contract address
- Go to Contract > Read Contract
- In
getPartnerShare
, input your registered wallet address in thepartnerAddress
field - 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
):
Get Collected Fees Balance
Your project's fees are collected on every chain and for every token individually.
You can track your collected fees from the Fees
section of your Platform Dashboard
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:
- Select a contract you want to withdraw from (see a list of all FeeCollector contracts below)
- Go to Contract > Write Contract
- Connect with your registered wallet
- In
withdrawPartnerFees
, inputtokenAddresses
you want to withdraw along with the registered wallet address as a receiver address.
Note: withdrawal UI is coming to the Swing Platform soon.
Setting Up Custom Fees
By default, all transactions originating from Swing Partners are unmonetized until requested by the respective Swing Partner.
Swing gives Partners the ability to manually override the default Partner fee percentage share that was set up by Swing on the Partner's behalf. This means that you can manually set different transaction fees for every transaction originating from your dApp.
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.
How it works
If you have a fee-sharing setup with Swing, the allocated share of a user's transaction amount will be returned in the response of the /quote
endpoint or the result of the getQuote()
function in the SDK. Refer to Check partner fees in the quote response in our monetization guide.
Custom fees are applied by modifying the fee
parameter present in the /send
API endpoint and the transfer()
function in the SDK.
Swing Partner fees are calculated in Basis Points (BPS) units. Every BPS unit represents a fraction of a percent. Specifically, 1 BPS is equivalent to 1/100th of a percent (0.01%).
This means that setting a custom fee of 1 BPS will result in Swing collecting a Partner fee of 0.01% on the transaction amount entered by a user. Similarly, setting a custom fee of 1000 BPS will result in Swing taking maximum fee allowed by a Partner, which is 10% on the user's transaction amount.
Here's a breakdown of how a Partner's fee will be impacted with respect to BSP:
Transaction Amount ($) | BPS | Percentage | Partner Fee ($) |
---|---|---|---|
10,000 | 1 | 0.01% | $1.00 |
10,000 | 10 | 0.10% | $10.00 |
10,000 | 50 | 0.50% | $50.00 |
10,000 | 100 | 1.00% | $100.00 |
10,000 | 200 | 2.00% | $200.00 |
10,000 | 500 | 5.00% | $500.00 |
10,000 | 1000 | 10.00% | $1,000.00 |
The maximum allowed Basis Points (BPS) is 1000, which equates to a 10% Partner fee. Conversely, the minimum value is 1 BPS, corresponding to a 0.01% Partner's fee.
This feature is most suitable for teams running loyalty programs to create benefits for returning customers.
Modifying Transaction Fees
Modifying transaction fees is only available on our API and SDK integrations.
If you have fees collection set up with Swing, you can override the default fees setup by setting the fee
parameter to a BPS value in the /send endpoint on the API and the transfer()
function in the SDK respectively:
Here in our transferParams
object, we're setting the fee
property to a BPS value of 200. What this means is that if our transaction amount is $10,000, a BPS value of 200 would mean that we're instructing Swing to collect a Partner fee of $200 from the user.
Fee Collection Contract Addresses
Here's a list of fee collector smart contracts that are built by Swing.
Fee Collect Contract Addresses (v2)
Network | Address | Explorer Link |
---|---|---|
Ethereum | 0x28b9089b5f2724c1898e7dbb04a96c8c177fe46d | Etherscan |
Binance Smart Chain | 0xdB01e95b391D7491ecb9Fe9BaE13ade37e6C9C14 | BscScan |
Polygon | 0x1fbA0c2a76243dB5e39e766525bF1524A5D11A33 | PolygonScan |
Arbitrum | 0x329c8D34c09090B64deDC6aA348a1612378eEa82 | Arbiscan |
Avalanche | 0xBF5F0867fF2038D4cA15C0c72308e12D74e518AA | Avascan |
Optimism | 0x87A77781EE90fb5083481f1deB59B0d0E6b40AD0 | Optimistic Etherscan |
Fantom | 0xE37e0bc0c5d01d79eeABf1b386D7A431Ee6cbfcA | FTMScan |
Moonbeam | 0x5e8AC2DC9f31Bbab954877C771935eb88aa47A2B | Moonscan |
zkSync Era | 0xa08B0dABe98F8DC7529642d403FD99506e17fE7e | zkSync Explorer |
Linea | 0xAd2183C963AB7E5CA2771E0f9fB5faE0BCb68E87 | Lineascan |
Base | 0xF8622C14Fed88811900E226217ffB07C167cc799 | Basescan |
Goerli | 0xb40F607897d65AD1C4F443a8407D834fF1396Dbd | Goerli Etherscan |
Fee Configuration Contracts
Network | Address | Explorer Link |
---|---|---|
Ethereum | 0x90a021ae7C545F9CA4e83e7a6Dc51D460E40A995 | Etherscan |
Binance Smart Chain | 0xbea41d3dF7c5e6b3176AeB1b62cF55a4d591485d | BscScan |
Polygon | 0xdAf461DEd915785abb3FeB14aF4c798B24356222 | PolygonScan |
Arbitrum | 0x42df81c742CAe6F6D91E136b1AA5C7e14CB394FB | Arbiscan |
Avalanche | 0x88A541E94391704Cb24Bf4289189f64e09eB9736 | Avascan |
Optimism | 0x866E04F66eA5FeDB778ca4B108B729EBe00dc7B6 | Optimistic Etherscan |
Fantom | 0x34e3dA127fAfe020465E36Fd79BF8baF6E0ee05d | FTMScan |
Moonbeam | 0xD073b9740D17850A804341d08ad657749fb178e0 | Moonscan |
zkSync Era | 0xb40F607897d65AD1C4F443a8407D834fF1396Dbd | zkSync Explorer |
Linea | 0x76bBA71424aaDAA4137FBc6C514c650DB7EC8244 | Lineascan |
Base | 0xA39342ed140d01E06097f6d10d892C3AbF413D2f | Basescan |
Goerli | 0x459b4f536db312bea471625325b7b4b0a705b9e3 | Goerli Etherscan |
Fee Collect Contract Addresses (v1 - deprecated)
Network | Address | Explorer Link |
---|---|---|
Ethereum | 0x7ACe1D4BB90d19826A88875BA0F60bd783beF312 | Etherscan |
Binance Smart Chain | 0xC1f07654B7e1DED2AB92f9a47b95bcAFA8b06c40 | BscScan |
Polygon | 0x29836d3C83661f3D2fd35996d38ccA9A43DBf698 | PolygonScan |
Arbitrum | 0x5e8AC2DC9f31Bbab954877C771935eb88aa47A2B | Arbiscan |
Avalanche | 0xC2142383A16C9b78eeb66D051CB87CE389697E35 | Avascan |
Optimism | 0x90880881Bbce94503c0fC974c9B3E1D8E3692fb9 | Optimistic Etherscan |
Fantom | 0x68212DD62ca7E3949268834A956b0b9665F7F93A | FTMScan |
Squid Fee Collector Contract Address
Below are fee collector smart contracts built by Squid for Partner fee collection.
Contract Name | Address |
---|---|
SquidFeeCollectorProxy | 0x19cd4f3820e7bbed45762a30bfa37dfc6c9c145b |
You can learn more about monetization on the Squid bridge here.