Builder codes

Note: The term "builder" in the context of builder codes does not refer to block builders within consensus, but rather "defi builders" who build applications on the Hyperliquid L1.

Builder codes allow builders to receive a fee on fills that they send on behalf of a user. They are set per-order for maximal flexibility. The user must approve a maximum builder fee for each builder, and can revoke permissions at any time. Builder codes are processed entirely onchain as part of the L1 fee logic.

Builder codes currently only apply to perps. In order to use builder codes, the end user would first approve a max fee for the builder address via the ApproveBuilderFee action. This action must be signed by the user's main wallet, not an agent/API wallet. The builder must have at least 100 USDC in perps account value.

Once the authorization is complete, future order actions sent on behalf of the user may include an optional builder parameter: {"b": address, "f": number}. b is the address of the builder and f is the builder fee to charge in tenths of basis points. I.e. a value of 10 means 1 basis point.

Builders can claim fees from builder codes through the usual referral reward claim process.

For example code see the Python SDK https://github.com/hyperliquid-dex/hyperliquid-python-sdk/blob/master/examples/basic_builder_fee.py

Last updated