Prerequisites
Before starting, make sure you have:- Completed the Environment Setup.
- Read the Overview for the fee model and lifecycle.
1. How Partner Economics Work
Every trade pays a flat 2% fee on the ETH/WETH leg, split into two halves. The partner is paid from the protocol half — the creator half always goes 100% to the token’s fee claimers:partnerFeeBpsis a factory global (factory.partnerFeeBps(), default2500= 25% of the protocol half = 0.25% of trade volume).- It is snapshotted at launch: each token keeps the value that was set when it was created, readable per token via
curve.partnerFeeBps(). Later factory changes only affect future launches. - Partner earnings accrue in both phases — bonding-curve trades and post-graduation Uniswap v4 swaps alike.
A launch has at most one partner, set once at
create time and immutable afterwards. The partner address must not also appear in the launch’s claimers array.2. Launch With Your Partner Address
Pass your address as thepartner argument to create / createAndBuy — that’s the entire integration on the launch side:
launchToken script. Use a dedicated, secured wallet for the partner address — it cannot be changed after launch.
3. Track the Tokens You Partner On
TheTokenCreated event carries the partner field, so index your launches from factory logs and filter on it (partner is not an indexed topic, so filter client-side):
partner-tokens.ts
curve.partner() and curve.partnerFeeBps() from its bonding curve.
4. Read Partner Earnings
Partner earnings accrue in each token’sBagsFeeShare and are read exactly like claimer balances:
partner-earnings.ts
- Pre-graduation, each curve trade emits
FeesSplit(payer, vault, feeShare, vaultFeeQuote, creatorFeeWETH, partnerFeeWETH)— your cut ispartnerFeeWETH. - The fee-share emits
PartnerFeeNotified(amount)whenever your cut is delivered.
5. Claim Partner Fees
Claiming is identical to claimer flow — callclaim(unwrap) on each token’s BagsFeeShare from the partner wallet (see Claim Creator Fees for the full script):
claimableOf is zero — claiming with nothing to claim reverts with BagsFeeShare_NothingToClaim.
Troubleshooting
BagsFeeShare_NothingToClaim— no partner fees accrued yet on this token, or you already claimed. CheckclaimableOf(token, partner)first.- Your address earns nothing on a token — confirm you were actually set as the partner at launch:
curve.partner()must return your address. The partner cannot be added retroactively. - Launch reverts with
BagsFactory_InvalidClaimers— the partner address also appears inclaimers. Remove it; the partner is paid from the protocol half, not the claimer split. - Earnings look ~0.25% of volume, not 1% — that’s correct: the default
partnerFeeBpsof2500pays 25% of the 1% protocol half. The creator half is never shared with partners.
