How drift-labs/keepyrs works
Main Components Identification
The system should be represented with these primary components:
• JIT Maker Service
• Perp Filler Service
• Drift Protocol v2 Interface
• Wallet/Authentication Layer
• Configuration Management
Component Details
JIT Maker Service:
• JIT Maker Core (jit_maker.py)
• Utils (utils.py)
• Leverage management system
• Single market constraint
Perp Filler Service:
• Perp Filler Core (perp_filler.py)
• Fill Utils (fill_utils.py)
• Maker Utils (maker_utils.py)
• Node Utils (node_utils.py)
Connections and Data Flow
• Bidirectional communication between services and Drift Protocol
• Configuration flow from .env to services
• Wallet authentication flow
• Market data flow
• Order execution paths
Technical Details
Annotations for:
• Poetry dependency management
• Environment configuration requirements
• Target leverage constraints
• Market isolation requirements
Specific Implementation Notes
Callouts for:
• TARGET_LEVERAGE_PER_ACCOUNT configuration
• Sub-account market limitations
• RPC connection details
• Private key management