This page walks you, the affiliate, through what actually happens on-chain between the moment a trader uses your referral code and the moment USDC lands in your token account. If you are looking for the operator-side intro to the referrals program, start at the existing Referrals page.Documentation Index
Fetch the complete documentation index at: https://docs.parquet.exchange/llms.txt
Use this file to discover all available pages before exploring further.
Where attribution lives
Perp-engine owns three PDAs that together form the referral system:| PDA | Owner | Purpose |
|---|---|---|
ReferralCode | perp-engine | Your claimable code as an affiliate. |
TraderReferral | perp-engine | Links one trader to one affiliate. Created on the trader’s first open if they supplied a referral code. |
ReferralConfig | perp-engine | Holds the tier table (up to four tiers) and the per-affiliate tier assignment. Admin-managed. |
TraderReferral PDA is initialized, the attribution is
permanent for that trader. There is no expiry, no rotation, no clawback once a
disbursement settles.
Tier system, not a flat rate
Parquet does not pay a single flat percentage to every affiliate. The protocol supports up to four tiers, configured by the admin instructionconfigure_referral_tiers([ReferralTier; 4]), and each affiliate is placed
into a tier with set_referral_tier(tier: u8). Your tier determines what
fraction of the trader’s fee flow accrues to you.
At the program-wide level, the current protocol parameters route
0.2% of total fee volume into the referral reserve. How that pool is then
distributed across the four tiers is set at deploy time and can change. We
intentionally do not publish a per-tier percentage on this page — talk to the
operator about which tier you are in and what its share currently looks like.
The number that matters to you is your tier’s share of the referral reserve,
not the 0.2% aggregate. The 0.2% is the size of the pie; your tier decides
your slice.
Disbursement is pull, per market
You receive USDC by callingclaim_affiliate_reward on perp-engine. The
flow has two pieces:
- Accrual (automatic). As traders attributed to you pay fees, perp-engine
credits your per-market
AffiliateRewardPDA’saccrued_usdcfield.AffiliateRewardis seeded[b"affiliate_reward", affiliate, market_id], so accruals are tracked per market. - Claim (you do this). You sign
claim_affiliate_rewardfor a specific market. The handler zeroesaccrued_usdcon thatAffiliateRewardand CPIsdisburse_referralon fee-distributor, with perp-engine’sengine_authPDA signing the CPI. USDC moves from the fee-distributor’sreferral_reserveinto youraffiliate_usdctoken account.
claim_referral_fees handler — that name does not
exist. The pulling handler is claim_affiliate_reward, and there is one
AffiliateReward PDA per (affiliate, market) pair, so you may need to claim
across several markets to drain your accrued balance.
Becoming an affiliate
The current onboarding flow is operator-driven. To become an affiliate you need someone with admin authority to:- Configure your
ReferralCodePDA on perp-engine (this binds the code to your wallet and your USDC destination). - Assign you a tier via
set_referral_tier.
ReferralConfig tier means no accrual.
Reach out via the operator workflow described on the
Referrals page to start that process. The
glossary entry for referrer covers the
on-chain terminology if you want a quick orientation before you talk to the
operator.