1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
use ;
/// Builder information for Hyperliquid Builder Codes
///
/// Builder codes allow builders (DeFi application developers) to receive a fee on fills
/// that they send on behalf of a user. This enables developers to monetize their trading
/// applications, bots, and interfaces built on top of Hyperliquid.
///
/// # Integration Flow
/// 1. User must first approve a maximum builder fee for the builder address via `ApproveBuilderFee` action
/// 2. Orders can then include this `BuilderInfo` to charge the specified fee
/// 3. Builder fees are collected in USDC and can be claimed through the referral reward system
///
/// # Fee Limits
/// - Perpetuals: Maximum 0.1% (10 basis points)
/// - Spot: Maximum 1.0% (100 basis points)
///
/// # Example
/// ```rust
/// use hl_ranger::BuilderInfo;
///
/// // Builder charging 0.05% (5 basis points) fee
/// let builder_info = BuilderInfo {
/// builder: "0xF5Bc9107916B91A3Ea5966cd2e51655D21B7Eb02".to_string(),
/// fee: 5, // 5 tenths of basis points = 0.5 basis points = 0.05%
/// };
/// ```