Swap Partner

The Swap 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 earn referral fees by passing partner_id when executing swaps.

For complete swap documentation including Move contract code, see Swap Guidearrow-up-right.

3. Claim Referral Fees (For Partners)

Partners can claim accumulated fees using their PartnerCap.

Move Contract

Location: cetus_dlmm::partner module

Parameter
Type
Description

partner

&mut Partner

Partner object (shared, mutable)

partner_cap

&PartnerCap

PartnerCap object (proves ownership)

versioned

&Versioned

Versioned object for version checking

T

Type Parameter

The coin type to claim

Returns: Coin<T> - The claimed fee coins

Note: The SDK automatically handles multiple coin types in a single transaction and can auto-fetch partner_cap_id if not provided.

Apply for Partner Swap

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

Last updated