This repository contains the Balancer Protocol V2 core smart contracts, including the Vault
and standard Pools, along with their tests, configuration, and deployment information.
For a high-level introduction to Balancer V2, see Introducing Balancer V2: Generalized AMMs.
This is a Yarn 2 monorepo, with the packages meant to be published in the pkg
directory. Newly developed packages may not be published yet.
Active development occurs in this repository, which means some contracts in it might not be production-ready. Proceed with caution.
v2-deployments
: addresses and ABIs of 7274 all Balancer V2 deployed contracts, for mainnet and various test networks.v2-vault
: theVault
contract and all core interfaces, includingIVault
and the Pool interfaces:IBasePool
,IGeneralPool
andIMinimalSwapInfoPool
.v2-pool-weighted
: theWeightedPool
andWeightedPool2Tokens
contracts, along with their associated factories.v2-pool-utils
: Solidity utilities used to develop Pool contracts.v2-solidity-utils
: miscellaneous Solidity helpers and utilities used in many different contracts.v2-standalone-utils
: miscellaneous standalone utility contracts.
Multiple independent reviews and audits were performed by Certora, OpenZeppelin and Trail of Bits. The latest reports from these engagements are located in the audits
directory.
Bug bounties apply to most of the smart contracts hosted in this repository: head to Balancer V2 Bug Bounties to learn more.
Most of the Solidity source code is licensed under the GNU General Public License Version 3 (GPL v3): see LICENSE
.
- All files in the
openzeppelin
directory of thev2-solidity-utils
package are based on the OpenZeppelin Contracts library, and as such are licensed under the MIT License: see LICENSE. - The
LogExpMath
contract from thev2-solidity-utils
package is licensed under the MIT License. - All other files, including tests and the
pvt
directory are unlicensed.