Monetization / Take Fees
As an integrator, you can monetize LI.FI and collect fees from our Widget/SDK/API integration.
Last updated
Was this helpful?
As an integrator, you can monetize LI.FI and collect fees from our Widget/SDK/API integration.
Last updated
Was this helpful?
Our Fee Collector contract has been and is deployed to all our supported 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.
When using LI.FI Widget or 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
After fees are deducted from the user's initial asseet it is 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.
Fees from every asset are sent directly to fee collector wallet specified during the setup.
To set up your account and to start collecting fees, please create an account on portal.li.fi and follow the setup instructions.
The fee
parameter is the percent of the integrator's fee, that is taken from every transaction. The parameter expects a float number e.g 0.02
refers to 2% of the transaction volume. The maximum fee amount should be less than 100%. Also, you should pass your custom integrator
string to ensure the fees are collected to the right account. LI.FI will receive a percentage share of the collected fees depending on the use case and volume.
See examples of how to set up fee collection for different environments:
Here you can find a link to the transaction where the integrator's fee was taken and the FeesCollected event was emitted.
When you successfully integrate our system and start collecting fees, you can withdraw the collected fees on EVM chains.
There are two ways to claim fees:
Via portal.li.fi
Manually claiming from feeCollector contract
More API examples can be found .
In the first step, it’s important to get the information about all collected fees with /v1/integrators/{integratorId}
, where in the {integratorId}
parameter you need to pass your integrator string. The response will contain fee balances for all supported chains and tokens.
To withdraw collected fees via /v1/integrators/{integratorId}/withdraw/{chainId}
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.