Skip to content

Handling Dynamic Number of Pools in Optimization Setup #13

@ruidazeng

Description

@ruidazeng

I’m using the code to set up an optimization problem with a bunch of liquidity pools, but the number of pools isn’t fixed—it can change and grow depending on the data. Right now, the setup requires manually defining each pool's variables and constraints, which is tough to manage with a large, variable number of pools.

Is there a way to make the code handle a dynamic number of pools, creating the needed variables and constraints on the fly based on each pool's type (e.g., Balancer, Uniswap, constant-sum)? Any tips on how to make this work smoothly?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions