Skip to main content

Overview

Hotstuff Builder Program Builder codes, also referred to as ‘broker codes’ in the Hotstuff API, enable builders to receive a portion of the trading fees on fills for orders they submit on behalf of users. Builder codes are designated per order, allowing for maximum flexibility. Before a builder can collect any fees, each user must explicitly approve a maximum builder (broker) fee for that builder address; this approval can be revoked at any time. Importantly, all builder code logic is handled directly on-chain as part of the fee mechanism. To use builder (broker) codes, the user must first approve a maximum fee for the builder’s address by executing the approveBrokerFee action. This approval step must be signed by the user’s main wallet (not an agent or API wallet). Additionally, the builder must maintain a minimum of 100 USDC in their perps account value to remain eligible. The builder fee may be set to a maximum of 1% on perps. After authorization, future order actions can include an optional brokerConfig parameter: {"broker": string, "fee": number}. Here, broker is the builder’s (broker’s) address and fee is the builder fee to charge, specified in bps ( for example, set ‘0.0005’ to set broker fee as 0.05% i.e 5bps) Builders can claim their accumulated fees from builder (broker) codes through the standard referral reward claiming process.