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
- A buyer's first referred trade on any v2 curve is sent as
buyReferred(usdgIn, minTokensOut, to, referrer)instead ofbuy. The app does this for you when you open a launch through someone's referral link (from the Points page); integrators call it directly. - The curve calls
FeePolicy.bind(msg.sender, referrer). The binding is stored inreferrerOf[trader]and emitsReferrerBound(trader, referrer). - Rules, enforced in
FeePolicy: only curves created by the bound factory may bind (the policy checksmsg.sender.factory()); no self-referral; a wallet that already has a referrer keeps it — a laterbuyReferredwith 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 referee | Referrer 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
ReferralPaidlog on the curve; the indexer stores them with the trade.
Notes for integrators
buyReferredhas the same slippage and anti-sniper rules asbuy;minTokensOutcomes from a quote.- Only curves from factory v2 (
0xA2f9…156d) have a policy; v1 curves accept onlybuy. - Wallet-scoped, not token-scoped: one binding covers every curve.