Skip to content

curvefi/curve-factory

Folders and files

NameName
Last commit message
Last commit date

Latest commit

5272fd2 · Oct 4, 2023
Sep 19, 2021
Oct 4, 2023
Feb 12, 2022
Sep 24, 2022
Jan 10, 2021
Oct 2, 2023
Jul 12, 2021
Jan 17, 2021
Jul 22, 2021
Jan 17, 2022
Sep 12, 2021
Jan 13, 2021
Jul 12, 2021
Jul 24, 2021
Jul 12, 2021

Repository files navigation

curve-factory

Permissionless deployment of Curve metapools.

Overview

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.

Dependencies

Testing

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 are True and None.

Deployment

To deploy the contracts, first modify the deployment script to unlock the account you wish to deploy from. Then:

brownie run deploy --network mainnet

License

(c) Curve.Fi, 2020 - All rights reserved.