
How Hyperliquid Builder Codes Turned Wallets Into Revenue Machines
By CMM Team - 08-Nov-2026
How Hyperliquid Builder Codes Turned Wallets Into Revenue Machines
Every order on Hyperliquid carries a hidden fee slot. If your app routes the trade, you fill that slot with your builder code and collect revenue on every single fill. The wallet earns. The trading terminal earns. The analytics dashboard earns. And Hyperliquid takes none of it.
That mechanism, builder codes, has created one of the most compelling revenue models in DeFi. As of July 2026, more than 1,411 registered builder codes had collectively generated over $90 million in fees. Figures as of July 2026, from HyperTracker's builder leaderboard. The top builder alone earned $23.6 million, while most codes in the long tail earned close to nothing. The difference? Understanding the mechanics and executing the integration correctly.
This guide covers everything a builder needs to know: how the fee logic works on-chain, how to register and configure a code, how the top earners structure their fee strategies, and how to monitor builder revenue programmatically through our API.
The Mechanics: How Builder Codes Actually Work
Builder codes are an on-chain fee attribution mechanism baked into Hyperliquid's matching engine. When a builder's application routes an order, it attaches two parameters: the builder's wallet address and a fee amount expressed in tenths of basis points. A value of 10 means 1 basis point, or 0.01%. The fee is processed entirely on-chain as part of the fill logic, so there's no off-chain settlement, no invoicing, and no trust required.
The caps are straightforward: builders can charge up to 0.1% on perpetual trades and up to 1% on spot trades. These sit on top of Hyperliquid's own base fees (0.045% taker, 0.015% maker for perps). The critical detail that sets this apart from most DeFi fee models: builders keep 100% of what they charge. Hyperliquid takes no cut of builder fees. The protocol benefits indirectly through the volume that builders bring, which generates base protocol fees.
Each user must explicitly approve a maximum fee for each builder via the ApproveBuilderFee action, signed by their main wallet. Users can revoke this approval at any time and can have a maximum of 10 active builder code authorizations simultaneously. This consent model means builders compete on product quality, because users can always switch to a lower-fee frontend or revoke access entirely.
Registration: Getting Your Builder Code Live
The barrier to entry is deliberately low. You need a Hyperliquid perpetuals account with at least 100 USDC in account value, and your account abstraction mode must be set to standard. No application form, no approval queue, no whitelist. The system is permissionless.
Here's what the registration process looks like in practice:
- Fund your builder wallet. Deposit at least 100 USDC into a Hyperliquid perps account. This wallet address becomes your builder identity and your fee collection address.
- Set up your application. Your app needs to submit orders through Hyperliquid's API. Whether that's a wallet, a trading terminal, a copy-trading bot, or a custom dashboard, the integration pattern is the same.
- Request user approval. Before earning fees, each user needs to sign an
ApproveBuilderFeeaction from their main wallet. In Python, that looks like:exchange.approve_builder_fee(builder_address, "0.05%") - Attach your code to orders. Every order your app sends includes a builder parameter:
{"b": "0xYourAddress", "f": 50}wherefis your fee in tenths of basis points (50 = 5 bps = 0.05%).
The fee parameter is per-order. This means your app can charge different rates on different trade types, different assets, or different user tiers. Some builders charge higher fees on spot trades where the cap is larger, and lower fees on perps where competition is fierce.
Builder Codes vs. Referral Codes
One of the most common mistakes new builders make is confusing builder codes with Hyperliquid's referral system. They serve different purposes and work differently at every level.
Referral codes are user-to-user. You share a link, someone signs up, and you earn a percentage of the protocol's trading fees from that user's activity. The user gets a fee discount, the referrer gets a rebate. It's a standard affiliate model.
Builder codes are app-to-protocol. Your application routes orders and earns an additional fee on every fill it processes. The fee is additive (on top of base protocol fees), requires explicit user consent via a signed approval, and only applies when the user trades through your specific frontend. If the user opens Hyperliquid's native app and places a trade directly, your builder code earns nothing on that order.
The practical implication: referral codes reward distribution (bringing users to the platform), while builder codes reward product quality (keeping users trading through your interface). The strongest builders do both, capturing a referral relationship and earning builder fees on every trade.
What the Top Builders Actually Earn
The builder code leaderboard on Hyperliquid follows a steep power law. A handful of builders dominate the revenue table, and the gap between the top and the long tail is massive.
| Rank | Builder | Revenue | Users | Volume Routed | |------|---------|---------|-------|---------------| | 1 | Phantom | $23.6M | 153,128 | $44.8B | | 2 | Based | $15.2M | 42,967 | $44.9B | | 3 | MetaMask | $8.1M | 52,534 | $9.0B | | 4 | PVP | $8.0M | 28,223 | $17.1B | | 5 | Insilico | $3.7M | 3,339 | $36.3B |
The numbers reveal three distinct strategies. Phantom wins on distribution: 153,128 users, the largest user base of any builder, because every Phantom wallet user who trades on Hyperliquid routes through its builder code. Based wins on volume efficiency: it routed more total volume than Phantom ($44.9B versus $44.8B) but with fewer than a third of the users, meaning its average trader is significantly more active. Insilico wins on volume concentration: 3,339 users generated $36.3B in volume, pointing to a small group of heavy algorithmic traders.
The revenue gap between these strategies comes down to fee pricing. Phantom charges a higher effective rate (roughly 5 bps based on the revenue-to-volume ratio), while Based charges a lower rate (roughly 3.4 bps) to attract volume-sensitive traders. Insilico charges the lowest effective rate (roughly 1 bp) because its users are sophisticated enough to negotiate or self-select on fee sensitivity.
The Integration Playbook: Code and Architecture
The technical integration is straightforward once you understand the order flow. Your application submits orders through Hyperliquid's API using either the Python SDK, the TypeScript SDK, or direct REST/WebSocket calls. Every order includes the optional builder parameter.
Here's a minimal Python example using the official SDK:
from hyperliquid.exchange import Exchange
from hyperliquid.utils import constants
# Initialize with your agent wallet
exchange = Exchange(agent_wallet, constants.MAINNET_API_URL)
# User must approve your builder fee first
# (This is a one-time action per user, signed by their main wallet)
# exchange.approve_builder_fee("0xYourBuilderAddress", "0.05%")
# Place an order with your builder code attached
order_result = exchange.order(
"BTC", # asset
True, # is_buy
100.0, # size
50000.0, # price
{"limit": {"tif": "Gtc"}},
builder={"b": "0xYourBuilderAddress", "f": 50} # 50 = 5 bps
)
The f value is in tenths of basis points. So f: 10 means 1 basis point (0.01%), f: 50 means 5 basis points (0.05%), and f: 100 means the maximum 10 basis points (0.1%) for perps.
Wallet signature gotcha. The trickiest part of integration is getting wallet signatures to work. When your app asks MetaMask or WalletConnect to sign with chainId 1337 (Hyperliquid L1), the wallet rejects it because the domain chain ID doesn't match the connected network. The solution is agent wallet sessions: sign an
approveAgenttransaction using chainId 42161 (Arbitrum), then let the agent wallet handle L1 actions in memory without touching the user's wallet again.
Tracking Builder Revenue With Our API
Monitoring builder code performance requires reliable data, and this is where most public tools fall short. Hyperliquid exposes raw builder fill data via CSV exports at stats-data.hyperliquid.xyz, but parsing compressed CSV files daily isn't practical for real-time monitoring.
Our HyperTracker API provides pre-computed builder analytics through a dedicated endpoint. The /builders/list endpoint returns every registered builder code with revenue, volume, user count, and join date. You can filter by timeframe (all-time, monthly, weekly, daily) to track trends without building your own aggregation pipeline.
For builders who want to understand how their user base behaves at a deeper level, our cohort analytics classify every wallet into one of 16 behavioral segments by trading size and all-time PnL. Combining builder code data with cohort data lets you answer questions like: what percentage of my builder code users are in the Money Printer cohort (wallets with over $1M in all-time profits)? Are my highest-volume users also my most profitable, or am I attracting Exit Liquidity (wallets that consistently lose)?
Common Mistakes and How to Avoid Them
Setting fees too high on day one
New builders often set their fee to the maximum (0.1% on perps) hoping to maximize revenue per trade. In practice, sophisticated traders compare builder fees across frontends, and a 10 bps surcharge on top of Hyperliquid's base fees makes your app noticeably more expensive. The top builders on the leaderboard charge between 1 and 5 bps, competing on product quality to attract and retain volume.
Forgetting that approval is per-wallet
Each user must sign an ApproveBuilderFee action from their main wallet before your builder code can earn on their trades. If your onboarding flow doesn't prompt this step clearly, you'll route trades but earn nothing. Some builders handle this by surfacing the approval as part of the first-trade flow, so the user signs once and never thinks about it again.
Confusing builder codes with referral codes in analytics
Builder code revenue appears in your builder wallet's fee claims, while referral rewards come through a separate mechanism. If you're tracking both, separate them in your analytics. A wallet can be both a referrer and a builder, but the income streams are distinct and should be measured independently.
Ignoring case sensitivity in API calls
Hyperliquid's builder fill data URLs are case-sensitive and require lowercase addresses. If your builder address contains uppercase hex characters and you query the CSV endpoint with mixed case, you'll get empty results. Always lowercase your addresses before making API calls.
Where Builder Codes Go From Here
The builder code model has proven something that most DeFi protocols still haven't figured out: you can grow volume by paying the people who bring it, without giving up protocol revenue. Hyperliquid's base fees remain untouched. Builders earn on top. The alignment is clean.
As of November 2026, the ecosystem is evolving in a few directions. Hyperliquid Strategies, the Nasdaq-listed HYPE treasury company, filed an application with the CFTC to become a registered futures commission merchant (FCM). If approved, this would create a regulated pathway for U.S. clients to access HIP-3 markets through Hyperliquid's infrastructure. For builders, FCM status means a new category of users, institutional and U.S.-based, could start flowing through builder code-enabled frontends under a compliant framework.
Meanwhile, HIP-3 markets continue to expand what builders can offer. Any frontend with a builder code has immediate access to the full HIP-3 marketplace, including pre-IPO perps, prediction markets, and real-world asset contracts. The builder code isn't just a monetization tool for crypto trading anymore. It's a revenue layer for any market Hyperliquid deploys.
The playbook is simple: build a frontend people want to trade through, attach your code, and let the volume compound. With 1,411 codes registered and the top five capturing the majority of revenue, the leaderboard has room. But only for builders who ship product worth switching to.