balancer-v2-monorepo icon indicating copy to clipboard operation
balancer-v2-monorepo copied to clipboard

Unseeded LBP PoC

Open EndymionJkb opened this issue 2 years ago • 0 comments

PoC LiquidityBootstrappingPool that requires no capital. (I left the original LiquidityBootstrappingPool and factory in place, to not break the tests.) See: https://drive.google.com/file/d/17id3yZX3ji_R1qoHombiRSLTKdqRSxsM/view?usp=sharing

The underlying pool is limited to two tokens, and pays protocol fees in BPT (so far, we need this anyway). It also allows the reserve token to have an asset manager.

There is a pool controller (derived from BaseController, so the manager is transferrable, etc.), which doubles as the asset manager.

There are two factories: SeededLiquidityBootstrappingPoolFactory just deploys the new pool type - but hard-codes the asset manager to zero, and sets the owner to be the deployer: no controller, just a normal LBP, funded in the usual way that requires capital.

UnseededLiquidityBootstrappingPoolFactory creates an AssetManagedLiquidityBootstrappingPoolController, and wires it up to a new AssetManagedLiquidityBootstrappingPool, so that the controller is both the pool owner and reserve token asset manager. (The manager of the pool controller is passed in.)

The result will be an apparently fully funded LBP, but with zero cash balance, so that tokens cannot be "sold back" at first.

EndymionJkb avatar Mar 16 '22 03:03 EndymionJkb