💸Adding Affiliate Fees

SwapWidget automatically charges 0% fees. You have the option to charge up-to 200bps (2%). By default there is a 50%/50% fee-split with the Honeycomb router. Options are available to take a larger share of revenues; please dm (at)scruffychuck.

Process

After completing the intro and adding the HoneyComb repo to your development environment, there are four steps:

1. Activate Partner

This is the affiliate address that will get passed from your UI as an argument whenever a user submits a swap. Anyone, including yourself or Pangolin can instantiate their own address activatePartner(address) on the Honeycomb router.Navigate to the affiliate registry link below for the relevant explorers to to submit the activate transaction. Remember to do it once for each chain.Honeycomb affiliate registry is stored on chain here:

WIP: Notably, this must be done on each chain separately if you are on multiple chains. In the future this might be upgraded with some additional UI.

2. Change Incremental Fees (optional)

Now that you've set your address, you can call modifyTotalFee(address, feeCut) to change what incremental fee is assessed on the output of the swap. Updates are live immediately for all future swaps after the transaction is confirmed.As an example, you would call modifyTotalFee(0xExampleAddress, 50) to set a 50 bps (0.5%) incremental fee in this example.Incremental fees are divided up based on the permissioned feeCut method. By default all partners are enrolled in the "Freemium" plan with a 50/50 split. Contact the Pangolin Business Development team if you would like to consider upgrading to Honeycomb Premium.

3. Implement Swap Component

When you inject the swap widget into your dapp code it should look something like the following, specifically taking note of the "parternDaaS" argument being passed. This will<SwapWidget ... partnerDaaS={"0xExampleAddress"}/>

4. Change Theme

As with everything in HoneyComb, it is cross-chain by default, and 100% customizable with css styled divs.See more here for examples and continued documentation about custom theming.Advanced Settings:

  • modifyManagement(partner, manager, isAllowed) enables the Partner or the Pangolin multisig to add additional accounts with ability to modifyTotalFee on behalf of the partner address itself

  • WIP we will be adding advanced tracking opportunities for partners looking to better understand and segment their audiences

On-Chain Events:

Here is a list of events emitted by the Honeycomb router including account configuration and revenue streams!

  • event PartnerActivated(address indexed partner, uint24 feePartner, uint24 feeProtocol, uint24 feeTotal, uint24 feeCut);

  • event FeeChange(address indexed partner, uint24 feePartner, uint24 feeProtocol, uint24 feeTotal, uint24 feeCut);

  • event ProtocolFee(address indexed partner, address indexed token, uint256 amount);

  • event PartnerFee(address indexed partner, address indexed token, uint256 amount);

  • event FeeWithdrawn(address indexed token, uint256 amount, address to);

  • event FeeFloorChange(uint24 feeFloor);

  • event ManagerChange(address indexed partner, address manager, bool isAllowed);

Last updated