Permissionless deployment of Curve metapools.
The metapool factory has several core components:
Factory
is the main contract used to deploy new metapools. It also acts a registry for finding the deployed pools and querying information about them.- New pools are deployed via a proxy contract. The implementation contract targetted by the proxy is determined according to the base pool. This is the same technique used to create pools in Uniswap V1.
- Deposit contracts ("zaps") are used for wrapping and unwrapping underlying assets when depositing into or withdrawing from pools.
See the documentation for more detailed information.
- python3 version 3.6 or greater, python3-dev
- brownie - tested with version 1.15.0
- brownie-token-tester
- ganache-cli - tested with version 6.12.1
Testing is performed in a forked mainnet environment.
To run the unit tests:
brownie test
You can optionally include the following flags:
--decimals
: The number of decimal places for the token used to test the factory pool. Default is 18.--return_value
: The return value given by the token used to test the factory pool. Valid options areTrue
andNone
.
To deploy the contracts, first modify the deployment script
to unlock the account you wish to deploy from. Then:
brownie run deploy --network mainnet
(c) Curve.Fi, 2020 - All rights reserved.