This page is about fees on swaps. If you want to earn a share of staking yield by bringing stakers to Powfi, see Referral staking & partner commission. The two mechanisms are separate.
feeRecipient inside the same transaction, and is charged on top of the swap input.
Usage
amountIn + fee (exact-in) or maximalTokenInAmount + fee (exact-out on CPMM). The SDK uses the SwapMinOutWithFee / SwapMaxInWithFee (CPMM) or SwapWithoutAccountWithFee (CLMM) scripts when a fee is set.
Validation rules
validateIntegratorFee runs before signing and throws a plain Error if:
When the input is a non-ALPH token, the SDK attaches one extra
DUST_AMOUNT of ALPH for the fee output. The user pays this dust (0.001 ALPH) on top of amountIn + fee and gas, and it ends up at feeRecipient together with the fee. Include it when you show the user their total cost.
Groupless feeRecipient addresses are normalized to the protocol group automatically.