If you use this feature, Arc keeps 10% of the custom fee you collect from your
end users.
Prerequisites
Before you begin, ensure that you’ve: These are required so any example below runs with a validkit and adapter.
Set your fee rate and recipient
Callkit.earn.setIntegratorConfig with your fee rate in basis points and the
address that receives the fee. (A basis point is 0.01%, so 1,000 basis points is
10%.) integratorFeeBps accepts values from 0 to 10000, and a non-zero rate
requires a recipient address.
TypeScript
- Call it from your server. It takes an API key from the
Circle Console on
config.apiKey, which must stay server-side, and produces no wallet signature. - Each call replaces your stored configuration.
- The SDK validates the rate and address before sending and throws an
INPUTerror if either is invalid. If the Earn service refuses them, the call throwsINVALID_INTEGRATOR_FEE. - Your Earn integrator fee is separate from your Borrow integrator fee.
Turn the fee off
Pass0 with a null address to turn off fee collection:
TypeScript
Read your current configuration
Callkit.earn.getIntegratorConfig to read the stored rate and recipient:
TypeScript
setIntegratorConfig call, getIntegratorConfig throws
CONFIG_NOT_FOUND.