Trading

Referrals

On-chain referrals: how a referrer is bound, what they earn, and how to check it.

Referrals on Pinarc are a contract, not a cookie. A referrer is bound to a wallet on-chain, once, permanently, and is paid in the same transaction as every fee that wallet pays afterwards.

How binding works

  1. A buyer's first referred trade on any v2 curve is sent as buyReferred(usdgIn, minTokensOut, to, referrer) instead of buy. The app does this for you when you open a launch through someone's referral link (from the Points page); integrators call it directly.
  2. The curve calls FeePolicy.bind(msg.sender, referrer). The binding is stored in referrerOf[trader] and emits ReferrerBound(trader, referrer).
  3. Rules, enforced in FeePolicy: only curves created by the bound factory may bind (the policy checks msg.sender.factory()); no self-referral; a wallet that already has a referrer keeps it — a later buyReferred with a different address is a normal buy.

What the referrer earns

20% of every fee the referred wallet pays on any v2 curve — buys and sells, on every token, forever — taken out of the protocol's 60% share (the creator's 40% is untouched). _payFees transfers it in USDG and emits ReferralPaid(referrer, trader, amount).

Fee paid by the refereeReferrer receives
1.00 USDG (no tier)0.20 USDG
0.75 USDG (500K $PINA)0.15 USDG
0.50 USDG (5M $PINA)0.10 USDG

The share is a FeePolicy parameter (referralShareBps, capped at 50% in the contract, 20% today). Batch commits pay no referral (their fee is settled with no trader).

Points on top

Referrers also earn 10% of the referee's base Pinarc Points for as long as Season 0 runs — see Points. Points are computed off the same indexed events; the USDG share above is paid by the contract.

Checking a referral

  • FeePolicy.referrerOf(wallet) on Blockscout returns the bound referrer (zero = none).
  • Every payout is a ReferralPaid log on the curve; the indexer stores them with the trade.

Notes for integrators

  • buyReferred has the same slippage and anti-sniper rules as buy; minTokensOut comes from a quote.
  • Only curves from factory v2 (0xA2f9…156d) have a policy; v1 curves accept only buy.
  • Wallet-scoped, not token-scoped: one binding covers every curve.