Partner

The Partner system allows integrators to earn referral fees from swaps executed through their platforms. When users swap through a registered partner, a portion of the protocol fees is allocated to that partner.

1. How Partner Fee Collection Works

Fee Accumulation Mechanism

User Swap with Partner
        ↓
Protocol calculates referral_fee = protocol_fee Γ— ref_fee_rate / 10^9
        ↓
Referral fee is stored in Partner.balances (on-chain Bag)
        ↓
Fees accumulate across multiple swaps
        ↓
Partner must manually claim fees using PartnerCap

Important: Manual Claim Required, referral fees are NOT automatically transferred to the partner's wallet.

  • Fees accumulate in the Partner object's balances field (a Bag storing multiple coin types)

  • Partners must explicitly call claim_ref_fee to withdraw accumulated fees

  • Each coin type must be claimed separately

  • Only the holder of PartnerCap can claim the fees

2. Swap with Partner (Earn Referral Fees)

Integrators can earn referral fees by passing their partner_id when executing swaps.

Example

3. Claim Referral Fees (For Partners)

Example

Partners can claim accumulated fees using their PartnerCap.

Apply for Partner Swap

Interested in Partner Swap? Submit a request from here:https://4bx69zjogri.typeform.com/to/UUETIX2farrow-up-right

Last updated