Documentation Index
Fetch the complete documentation index at: https://docs.inkyswap.com/llms.txt
Use this file to discover all available pages before exploring further.
This page covers referrals from a token creator’s perspective. For how to share your own referral link and earn from it, see Rewards & Referrals.
What gets recorded on chain
When a buyer or seller passes a referral code with their trade, the V2 hook emits a separateReferral event:
createLaunchWithReferral(referral code recorded at launch creation)buyWithReferral(referral code recorded on a buy)sellWithReferral(referral code recorded on a sell)
createLaunch, buy, and sell functions do not emit Referral. The UI calls the *WithReferral variant only when a referral code is present in the user’s browser.
What does not happen on chain
- No fee discount. The 2 percent fee is the same with or without a referral code
- No on chain rewards. The contract only records the code in the event log
- No validation of the code. The contract accepts any string as the referral code
Referral events.
What this means for your token
If you launch a token on V2, trades against your token can carry referral codes. Those codes show up in the indexer alongside the trade. You do not have to do anything to enable this. It is on by default for every V2 launch. If you want to track which referrers bring volume to your token, the InkyPump indexer captures referral attribution per trade and exposes it through the InkyPump API. See Referral API for the available endpoints.How users get a referral code attached
When a user opens any inkypump.com URL with?ref=<code> or visits /join/<code>, the site stores the code in browser local storage. From that point on, every trade and every launch by that user uses the *WithReferral variant of the contract call and emits the Referral event.
The user does not see any difference in the UI. Referrals are invisible to the trader.
Reading referral events directly
If you index the chain yourself, the topic hash for theReferral event is:
0x4cC8F6d5B7cE150CCC0A9B7664532B1283b96AC4. Join it to the Trade event by (launchId, trader) and the block number to attribute the trade.