Balancer
Balancer V1
Balancer V1
  • Home
  • Getting Started
    • Use Cases
    • FAQ
  • Core Concepts
    • Protocol
      • Background
      • Glossary
      • Pool Lifecycle
      • Limitations
      • Math
        • Exponentiation
    • BAL Governance Token
      • BAL for Gas
    • Liquidity Mining
      • Exchange Listing
      • Liquidity Mining Estimates API
    • Security
      • Audits
      • Bug Bounty
  • Smart Contracts
    • Exchange Proxy
    • Smart Order Router
      • Development & Examples
    • Smart Pools
      • Overview
      • Configurable Rights Pool
      • Component Libraries
        • Rights Manager
      • Smart Pool Templates
      • Liquidity Bootstrapping FAQ
    • On Chain Registry
    • Interfaces
    • Addresses
  • API
    • Migration to Version 1.0
    • Events
    • API Index
    • UML Docs
  • Guides
    • Interact via Etherscan
    • Using the SOR
    • Creating a Shared Pool
    • Creating a Smart Pool
    • CRP Tutorial
      • Liquidity Bootstrapping Example
    • Smart Pool Use Cases
      • Liquidity Bootstrapping Pool
      • Swing Trading Pool
      • Smart Treasury
      • Perpetual Synthetic Pool
      • Investors' Club
      • Experimental
    • Testing on Kovan
    • Hackathons
      • Hacking & Testing
      • Judging
      • Ideas
Powered by GitBook
On this page

Was this helpful?

  1. Smart Contracts
  2. Smart Pools

Component Libraries

The Configurable Rights Pool uses several externally linked libraries to implement all its functionality, detailed below.

  • BalancerConstants - constant state variables used throughout

  • BalancerSafeMath - similar to Open Zeppelin SafeMath, but normalized so that "1" = 10^18, to allow fractional arithmetic (e.g., on weights)

  • RightsManager - defines a struct of boolean values, corresponding to each right; the Configurable Rights Pool stores this struct in storage.

  • SmartPoolManager - factors out computationally intensive functions, mainly to reduce the bytecode size of the Configurable Rights Pool, to keep it deployable

  • SafeApprove - an internal library (adapted from PieDAO) to enable pools to contain ERC20 tokens that require approve calls to be made from a base of 0 (e.g., KNC)

The Configurable Rights Pool contains getter functions that return the addresses of these libraries; a bit of future-proofing, so that clients can implement versioning.

PreviousConfigurable Rights PoolNextRights Manager

Last updated 4 years ago

Was this helpful?