Closed steve0xp closed 4 months ago
Quick Research Notes on Factory creation:
IBasePoolFactory
, BasePoolFactory
, StablePoolFactory
, and create a CustomPoolFactoryTemplate
contract that outlines how one creates a CustomPoolFactory
.custom pool
, then create the associated customPoolFactory
, and finally the scaffoldBalancer tool would stitch into said factory contract
.factoryExample
. If we make it work with just one of the types, but also have both constant price
and constant product factory contracts
then that’s coolUpdates from last time:
CustomPoolFactoryExample.sol
referencing balancerV3-monorepoToday:
NOTES:
From Discussions w/ Matt: Recall: the full repo, off the shelf, will do the following: deploy a constant price custom pool factory, deploy a new pool from said factory, register and initialize the pool.
The factory and the new pool will be deployed, off the shelf, in the local mainnet fork. So the dev can interact with their new pool with the ScaffoldBalancer front end. They can also interact with it via scripts and other development tools including hardhat and foundry.
make createPool
or something with the appropriate params within a script. This is alternative to doing it within the debug tab in the localhost FE. The main reason to do it this way vs the FE was that it would be a better developer UX as it would be cumbersome to repeatedly type in the input params via the debug tab (especially if a machine crashed, etc.).
Next Steps:
createPool
script and check the new deployed pool in the FE.dev
branch. The dev
branch will then have a new PR on it to update the setup so it works with local mainnet forks by default as per PR #24 Questions for Balancer Labs Team Possibly (Draft)
1. Are pools registered if they come from a BalancerPoolFactory that abides by the Balancer architecture? I guess the better question is how do we know that a specific Balancer Pool Factory abides by the Balancer architecture / standards? 2. Does initialization happen before or after registration?
Beating me to the punch on even finalizing the questions! Haha, thanks @johngrantuk.
CreatePoolFromFactoryExample.s.sol
- THIS NEEDS TO BE FINALIZED BEFORE REVIEWING WITH BLABSBasePoolFactory
, are pools from said factory automatically registered? This message below is causing me to ask:$scBAL
& $scETH
where we assume 1 scBAL == 1 scETH. If these tokens are newly created (fresh ERC20s) on mainnet forks or testnets, do we need to add rate providers for them before creating pools that the Balancer vault
will register?The remaining test TODOs are being handled by PR #34 and are also documented in issue #28. Thus I am closing this issue.
Factory Smart Contracts
Custom Pool Examples