Skip to content

Conversation

@pxrl
Copy link
Collaborator

@pxrl pxrl commented Dec 18, 2025

The existing array-based config requires a lot of repetitive config for each chain. This scales poorly as additional chains and accounts are added.

The existing array-based config requires a lot of repetitive config for
each chain. This scales poorly as additional chains and accounts are
added.
@pxrl
Copy link
Collaborator Author

pxrl commented Dec 18, 2025

Example of the intended config:

{                                                                                                                                                                                                                                                              
  "0xc186fA914353c44b2E33eBE05f21846F1048bEda": {                                                                                                                                                                                                              
    "1": { "target": 10, "trigger": 2, "isHubPool": true },                                                                                                                                                                                                    
  },                                                                                                                                                                                                                                                           
  "0x07aE8551Be970cB1cCa11Dd7a11F47Ae82e70E67": {                                                                                                                                                                                                              
    "56": { "target": 0.5, "trigger": 0.2 },                                                                                                                                                                                                                   
    "137": { "target": 500, "trigger": 50 },                                                                                                                                                                                                                   
    "143": { "target": 200, "trigger": 100 },                                                                                                                                                                                                                  
    "999": { "target": 3, "trigger": 1 },                                                                                                                                                                                                                      
    "9745": { "target": 300, "trigger": 100 },                                                                                                                                                                                                                 
  },                                                                                                                                                                                                                                                           
  "0xf7bAc63fc7CEaCf0589F25454Ecf5C2ce904997c": {                                                                                                                                                                                                              
    "1": { "target": 20, "trigger": 6 },                                                                                                                                                                                                                       
    "10": { "target": 0.2, "trigger": 0.1 },                                                                                                                                                                                                                   
    "56": { "target": 0.2, "trigger": 0.1 },                                                                                                                                                                                                                   
    "130": { "target": 0.2, "trigger": 0.1 },                                                                                                                                                                                                                  
    "137": { "target": 0.2, "trigger": 0.1 },                                                                                                                                                                                                                  
    ...                                                                                                                                                                                                                                                        
  }                                                                                                                                                                                                                                                            
}

const { REFILL_BALANCES, NATIVE_MARKETS_API_KEY, NATIVE_MARKETS_API_BASE, MIN_USDH_REBALANCE_AMOUNT } = env;
const {
REFILL_BALANCES,
REFILL_BALANCES_2,
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nb. naming is temporary - if we migrate to this format I'd anticipate deprecating REFILL_BALANCES and stealing its name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants