Cross-Chain Affiliate Fees
Affiliate fees can be specified by any integration using the DLN API or the deBridge Widget. The fees are free to be distributed to the designated beneficiary once liquidity is unlocked by a solver from a fulfilled order—typically within a few hours after the order execution.EVM chains
On EVM chains, affiliate fees are automatically transferred to the specified beneficiary address as part of the transaction in which the solver unlocks liquidity. No additional action is required. An additional consideration is that gas costs for affiliate fee transfers are capped at 2300 gas. If theaffiliateFeeRecipient
is a contract that
requires more gas to process the transfer, the affiliate fees will not be sent, but the order will still be processed normally. In those cases,
affiliate fees have to be claimed manually by calling DlnSource.withdrawUnclaimedAffiliateFees(...)
. The caller can be anyone, but the specified
beneficiary must be the affiliateFeeRecipient
set in the request.
Solana
On Solana, affiliate fees must be claimed manually by the beneficiary. This is done by invoking thewithdrawAffiliateFee
method of the DLN program. A
complete working example for claiming affiliate fees in bulk is available
here.
Simplified Example Snippet
Simplified Example Snippet
Same-Chain Affiliate Fees
Same-Chain Swaps also support affiliate fees using the sameaffiliateFeePercent
and affiliateFeeRecipient
parameters as cross-chain swaps.