Links
💲

Monetizability / Take Fees

As an integrator, you can monetize LI.FI and collect fees from our Widget/SDK/API integration.
This is a beta feature! The user submits transactions to our already audited contract on the source chain. The contract which stores the collected fees is currently under audit. To be able to test the new features, we deployed the contract already to all chains.
Any dApp that integrates LI.FI's Widget, SDK, or our API can now take fees from the volume they put through LI.FI.

Here's how it works

When calling our SDK/API to request quotes for a transaction, you can pass a fee parameter specifying the percentage fee you'd be taking from the requested transaction. This percentage fee will be deducted from the user's initial asset and collected in a FeeCollection sub-contract inside LI.FI Contracts. You can then withdraw the funds from the wallet specified by you during our integration.
Note: You can configure different wallets for different chains.

What you need to do

The fee parameter can be passed in both the /v1/quote endpoint and the getRoutes function on the SDK. The parameter expects a float between 0.0 and 0.1, 0.1 refers to 10% of the transaction volume. You should also pass your custom integrator string to ensure the fees are collected to the right account. LI.FI will be taking a percentage cut in the collected fees, which is 15% of the collected fees.
Please reach out to the team on discord to set up your account and start collecting fees. We only need your custom integrator string and the wallet address for withdrawals.
The fees are collected on every chain and for every token individually. We will provide tools to get an easy overview of the collected fees and prepare contract calls for you to withdraw them. Of course, our tools can also be used to swap and bridge the collected fees to another chain.

Withdraw Fees

When you successfully integrate our system and start collecting fees, you can withdraw the collected fees.
In the first step, it’s important to get the information about all collected fees with /v1/integrators/{integratorId} endpoint, where in the {integratorId} parameter you can pass either wallet address or your custom integrator string. The response will contain fee balances for all supported chains and tokens.
To withdraw collected fees via /v1/integrators/{integratorId}/withdraw/{chainId} endpoint you need to pass your wallet address or your custom integrator string and the id of the chain from which the token’s fees should be withdrawn. As an optional parameter, an array of the token’s addresses might be provided to include in the generated transaction only the specified funds.

The Call Flow