Builder codes
A builder code lets an app add its own fee to the orders it routes, up to a ceiling the user signed for, capped by the protocol at 0.1% on perps and 1% on spot.
A builder code is how an app gets paid for the orders it sends. The exchange fee pays the app nothing: it goes to HLP, the assistance fund and market deployers. “Builder” here means an application developer, not a block builder.
Say you approve an app for up to 0.1%, and it sends a $10,000 perp buy for you with f = 50:
f = 50is 5 basis points → the builder earns $5, on top of the exchange fee.- Your approval caps
fat 100 → the app could have charged up to $10.
From approval to payout
Section titled “From approval to payout”- The builder qualifies on perps account value and account mode (limits below).
- The user approves a maximum rate for the builder address with
ApproveBuilderFee, signed by the main wallet, not an API wallet, and revocable at any time. - The app routes orders carrying
builder: {"b": address, "f": number}, which an API wallet can sign. - The protocol charges the builder fee on each fill, on top of the exchange fee.
- The builder claims accrued fees through the referral rewards claim.
Which fills carry a builder fee
Section titled “Which fills carry a builder fee”Only fees collected in the quote or collateral asset carry a builder fee:
| Market | Builder fee on | Why |
|---|---|---|
| Perps | buys and sells | fees are paid in collateral |
| Spot | sells only | a spot buy pays its fee in the asset bought |
| Outcome markets | sells only, as spot | builders earn on sells carrying their code |
f is in tenths of a basis point
Section titled “f is in tenths of a basis point”f = 10 is 1 basis point (0.01 per cent); a percentage is f / 1000.
f |
Basis points | Per cent | Allowed on |
|---|---|---|---|
| 1 | 0.1 | 0.001% | perps and spot |
| 10 | 1 | 0.01% | perps and spot |
| 100 | 10 | 0.1% | perps and spot (perp maximum) |
| 1000 | 100 | 1% | spot only (spot maximum) |
The numbers
Section titled “The numbers”| Parameter | Value |
|---|---|
Unit of f |
tenths of a basis point |
Maximum f, perps |
100 (0.1%) |
Maximum f, spot |
1000 (1%) |
| Active approvals per user | at most 10 |
| Builder’s minimum perps account value | 100 USDC |
| Builder’s account mode | standard |
f above the approval |
whole order rejected |
What an app charges you
Section titled “What an app charges you”- Each fill’s
feealready includes the builder fee;builderFeeshows the builder’s part. - Your approval is a ceiling: the app picks
fper order, up to it and the protocol cap. approvedBuilderslists whom you approved;maxBuilderFeegives the ceiling for one builder.- The docs’ staking referral proposal page states that a builder code overrides a referral code for that order (referrals).
Approving and tagging orders
Section titled “Approving and tagging orders”The approval is user-signed (EIP-712 primary type HyperliquidTransaction:ApproveBuilderFee) from the master key. maxFeeRate is a percent string: "0.1%" approves up to f = 100.
{ "type": "approveBuilderFee", "hyperliquidChain": "Mainnet", "signatureChainId": "0xa4b1", "maxFeeRate": "0.1%", "builder": "0x...", "nonce": 1700000000000}Orders carry builder after grouping (orders). Key order (type, orders, grouping, builder) is part of the signed hash (signing), and the builder address must be lowercase: a checksummed one recovers the wrong signer.
{ "type": "order", "orders": [{ "a": 0, "b": true, "p": "100000", "s": "0.01", "r": false, "t": { "limit": { "tif": "Gtc" } } }], "grouping": "na", "builder": { "b": "0x...", "f": 50 }}{"type": "maxBuilderFee", "user", "builder"}returns the ceiling in tenths of a basis point, 0 if never approved; check it before sending.- From a contract, CoreWriter action 12 approves a builder with
maxFeeRateas auint64in tenths of a basis point.
Observing builder revenue
Section titled “Observing builder revenue”| Source | What it gives |
|---|---|
builderFee on each fill (userFills, WebSocket fills) |
the builder’s part of that fill’s fee; absent when 0 |
referral info request, builderRewards |
the builder’s accumulated fees |
| Daily builder fill files | every fill carrying the code, as LZ4-compressed CSV at builder_fills/{builder_address}/{YYYYMMDD}.csv.lz4 on Hyperliquid’s stats data host; the address must be lowercase |
Builder volume depends on the lens. A code can sit on a match’s taker row or maker row, so count every row carrying it or only taker rows, and say which (measuring Hyperliquid); settlement fills never carry one.
Unit and approval pitfalls
Section titled “Unit and approval pitfalls”- One SDK limits a user to 3 approved builders; the docs allow 10.
- A builder address that leaves standard mode stops accruing builder fees.
- Approvals are per network: a testnet approval does not exist on mainnet.
For the exchange fee underneath, see Fees, tiers and rebates; for fee sharing tied to users, Referrals.