setReferrer payload - Referral Codes
Decode Hyperliquid `setReferrer` payloads for referral codes, returned through Dwellir's read-only L1 gRPC API.
Read-only action reference
Dwellir's Hyperliquid gRPC API returns this decoded action payload through
StreamBlocks and
GetBlock. It does not submit or execute this action.
Submit supported user write actions through Hyperliquid's native
POST /exchange
endpoint.
The decoded setReferrer payload records assignment of a referral code to a Hyperliquid account.
Sample Data
{
"signature": {
"r": "0xf1d1526d59598ab867931fa78f9eedf4a76bada17a90cb2a8b804222774019cb",
"s": "0x1eafd4a61d38331a80841682309b981f49e777094c2affe123f5cfd59293d047",
"v": 28
},
"action": {
"type": "setReferrer",
"code": "PLACEHOLDER"
},
"nonce": 1768146913883
}View this transaction on Hypurrscan
Field Reference
Action Fields
| Field | Type | Description |
|---|---|---|
type | string | Always "setReferrer" |
code | string | Referral code to associate with the account |
Referral Program
Hyperliquid's referral system allows:
- Referrers to earn a percentage of referred users' trading fees
- New users to potentially receive fee discounts
- Both parties to benefit from the relationship
Use Cases
Referral Analytics
Track referral code adoption and distribution:
referral_counts = {}
def process_setReferrer_action(action):
code = action.get('code')
referral_counts[code] = referral_counts.get(code, 0) + 1
print(f"Referral code used: {code} (total: {referral_counts[code]})")Influencer Tracking
Monitor which referral codes are most popular to identify influential promoters.
Onboarding Analysis
Track referral usage patterns to understand user acquisition channels.
Related Action Payloads
- registerReferrer - Referrer registration
- claimRewards - Referral reward claims