Balancer
Balancer is a decentralized automated market maker (AMM) protocol built on Ethereum with a clear focus on fungible and yield-bearing liquidity.
Balancer's success is intrinsically linked to the success of protocols and products built on the platform. Balancer v3’s architecture focuses on simplicity, flexibility, and extensibility at its core. The v3 vault more formally defines the requirements of a custom pool, shifting core design patterns out of the pool and into the vault.

What is Balancer?
Balancer is a decentralized automated market maker (AMM) protocol built on Ethereum with a clear focus on fungible and yield-bearing liquidity. Balancer's success is intrinsically linked to the success of protocols and products built on the platform. Balancer v3’s architecture focuses on simplicity, flexibility, and extensibility at its core. The v3 vault more formally defines the requirements of a custom pool, shifting core design patterns out of the pool and into the vault.
How Does Balancer Work?
Balancer Pools are smart contracts that define how traders can swap between tokens on Balancer Protocol, and the architecture of Balancer Protocol empowers anyone to create custom pool types. What makes Balancer Pools unique from those of other protocols is their unparalleled flexibility. With the introduction of Hooks and Dynamic Swap Fees, the degree of customization is boundless.

Core Concept of Balancer
The Balancer protocol architecture comprises three primary components, each strategically designed to enhance flexibility and minimize the intricacies involved in constructing pools.
- Router: Balancer Serves as the user's gateway to the protocol, offering straightforward interfaces for executing operations. (This includes the basic Router, BatchRouter, BufferRouter, and CompositeLiquidityRouter.)
- Vault: Balancer Centralizes liquidity operations and manages accounting, streamlining the handling of token balances across multiple pools.
- Pool: Balancer Exposes precise pool mathematics through invariant calculations, enabling developers to harness powerful functionalities without delving into intricate details.
- Pool Creator Fee: Balancer Introducing the Pool Creator Fee—a groundbreaking feature within the Balancer Protocol that revolutionizes the way developers engage with liquidity pools. With this innovative concept, developers of specific pools have the opportunity to earn a share of the swap fee and yield fee as revenue, incentivizing the creation of successful and thriving pools. In the following section, we delve into the details of this exciting feature, exploring how it works and its implications for pool creators.
- Rate Providers: Balancer Rate Providers are contracts that provide an exchange rate between two assets. These exchange rates can come from any on-chain source, whether that may be an oracle, a ratio of queryable balances, or another calculation.
- Hooks: Balancer Hooks introduce a framework to extend existing pool types at various key points throughout the pool’s lifecycle. Hooks can execute actions during pool operation and also compute a dynamic swap fee. Potential applications for hooks include: LVR (Loss versus Rebalancing) reduction, Dynamic Fees, Automatic Gauge locking, Sell or Buy limits

Balancer's BPT Token
BPT Balancer Pool Tokens are tokens that represent ownership or shares in a Balancer pool.
- About Liquidity: When users add liquidity to a Balancer pool by depositing tokens, they receive corresponding Balancer Pool Tokens in return. These tokens represent their proportional share of the liquidity pool.
- Dynamic: Balancer Pool Tokens are dynamic in nature, meaning their value can fluctuate based on changes in the composition of the pool. They represent ownership of the assets within the pool and entitle holders to a portion of the trading fees generated by the pool, proportional to their share. Users can redeem their Balancer Pool Tokens to withdraw their share of the underlying assets from the pool.
- BalancerPoolToken Contract: The BalancerPoolToken contract adheres to the ERC20 token standard by incorporating the necessary methods and properties.
- Access to exclusive features: BPT holders may gain access to exclusive features and services in the future.

Balancer Pool Types
- Weighted Pools: Weighted Pools are highly versatile and configurable pools. They are ideal for general cases and enable users to build pools with different token counts and weightings.
- 80/20 Pool: An optimized version of the Weighted Pool with set weights of 80%/20%. The perfect fit for achieving liquidity of governance tokens.
- Stable Pools: Stable Pools are optimal for assets expected to consistently trade at near parity or with a known exchange rate.
- Boosted Pool: Boosted Pools are designed to allow for greater capital efficiency, deeper liquidity, and increased yield for Liquidity Providers.
- Liquidity Bootstrapping pools: Liquidity Bootstrapping Pools (LBPs) are pools that can dynamically change token weighting. LBPs create sell pressure and fair market advantages. Used very successfully for fair token launches.
Every pool type is associated with its own Factory contract, facilitating the creation of new pools. Experienced developers can find the factory deployment addresses through this resource. For further assistance, individuals are encouraged to contact our developers via Discord

Liquidity Bootstrapping Pools (LBPs)
Overview
Balancer's Liquidity Bootstrapping Pools (LBPs) are pools that can dynamically change token weighting (e.g 1/99 to 99/1 for TokenA/TokenB).
LBPs use Weighted Math with time-dependent weights. The starting and end weights and times are selected by the pool owner, who also has the power to pause swaps. The pool owner is the only address that can join the pool.

Balancer Mental Model
You can think of the starting price of your LBP as the ceiling you would want to set for the token sale. This may seem counterintuitive, but since LBPs work differently than other token sales, your starting price should be set much higher than what you believe is the fair price. This does not mean you are trying to sell the token above what it is worth. Setting a high starting price allows the changing pool weights of your LBP to make their full impact, lowering the price progressively until market equilibrium is reached. Unlike older token sale models, such as bonding curves, users are disincentivized to buy early and instead benefit from waiting for the price to decrease until it reaches a level they believe is fair.
Advantages
Sell Presure: During a weight shift, the token price of one token experiences sell pressure while the other experiences buy pressure. When this is mixed with modest swap volume, the price approaches the generally agreed-upon market price. Fair Market: LBPs often start with intentionally high prices. This strongly disincentivizes whales and bots from snatching up much of the pool liquidity at the get-go. When LBPs are used for early-stage tokens, this can help increase how widespread the token distribution is. Starting Capital Can Be Small: Teams who use LBPs to kickstart the liquidity of a token that has not been well distributed yet can do so with minimal starting capital. For a team running an LBP with their TOKEN and DAI, starting with 10% or 20% DAI, as opposed to 50% DAI ** like they might need on another platform, significantly reduces their starting capital requirements. Shifting from 80/20 TOKEN/DAI ** to 20/80
Balancer Routers
In the Balancer v3 architecture, Routers serve as the pivotal interface for users, facilitating efficient interaction with the underlying Vault primitives. Rather than directly engaging with the Vault, users are encouraged to use Routers as their primary entry point. This approach streamlines operations and enhances flexibility by abstracting multi-step operations into simple user-facing functions. Key Functions:
- Aggregation of Operations: Routers excel at consolidating complex user interactions into specific single-purpose function calls. This encapsulation provides users with a seamless and intuitive experience.
- External API Provision: Acting as the external interface, Routers furnish users with accessible endpoints to interact with the protocol. This abstraction shields users from the complexities of the underlying system, promoting ease of use.
- Integration with the Vault: Routers interface with the Vault, enabling seamless access to fundamental operations and liquidity management functionality.
- Custom Logic Implementation: Beyond facilitating basic operations, Routers implement custom logic tailored to specific user requirements. This flexibility allows for the seamless incorporation of bespoke functionality into the protocol ecosystem.
- Dynamic Update Capabilities: Unlike the Vault, Routers are stateless and do not retain liquidity. This inherent flexibility facilitates the deployment of new Router versions with patches and extended functionality, ensuring that users can always access the latest innovations.
In essence, Routers play a pivotal role in abstracting complexity, enhancing user accessibility, and fostering innovation. By serving as the conduit between users and the underlying Vault system, Routers enable seamless interactions and diverse use cases.
Balancer Routers
Balancer has developed, audited and deployed Router contracts with the goal of providing simplified, easy to use functions for common liquidity actions. These Routers also serve as a useful reference for other Router implementations.
Balancer: The Vault
The Vault is the core of the Balancer protocol; it is a smart contract that holds and manages all tokens in each Balancer pool. First introduced in Balancer v2, the vault architecture separates token accounting from pool logic, allowing for simplified pool contracts that focus on the implementation of their swap, add liquidity and remove liquidity logic.

The Vault
Using Vault is simple and straightforward:
- Transient accounting: Transient accounting shifts the validation of accurate token accounting to the start and conclusion of a Vault interaction. This is achieved by initiating a transient state that monitors the debt and credit created during vault interactions. This transient state guarantees the atomic execution of operations within it and confirms the proper settlement of all debt and credit at the end of the execution, prior to exiting the transient state.
- ERC20MultiToken: ERC20MultiToken was inspired by ERC1155, but customized for Balancer v3. At a high level, it allows the Balancer Vault full control over Balancer Pool Token (BPT) accounting, enabling it to both mint and burn BPT directly. By centralizing both token and BPT accounting in the vault, Balancer v3 ensures atomic updates to critical pool state. In contrast to ERC1155, ERC20MultiToken allows Balancer Pool Tokens to be fully ERC20-compliant, supporting composability.
- Token scaling: Working with fixed-point math in Solidity presents a unique set of challenges that developers must navigate to ensure accurate and secure smart contract functionality.
- Swap fee: A swap fee is charged for each swap, as well as on the non-proportional amounts in add/remove liquidity operations. When a pool is registered, the initial swap fee is passed as a parameter and stored as part of the pool's configuration. The swap fee is always charged on the amount in (i.e., on the given amount for EXACT_IN, and the calculated amount for EXACT_OUT).
Build on Balancer
AMMs built on the Balancer protocol benefit from the security of the Balancer vault. This enables developers to utilize the well-developed Balancer AMM ecosystem, while the vault's optimized architecture streamlines the development process and allows teams to concentrate on their product.
Developer Reference
For the most common use cases the APIs of interest will be the Router or the BatchRouter. We also provide a JS/TS SDK to assist with interacting with the Balancer Protocol. Checkout the Integrations Guides for Solidity and Javascript examples on common actions like adding/removing liquidity and making swaps. Individuals are encouraged to contact our developers via Discord to request further assistance.

Balancer Partner Onboarding
With a vastly simplified developer experience, 100% boosted pools, LST base pairings, and customizable pool hooks, Balancer v3 provides partners with a streamlined hub to optimize yield-bearing liquidity, build robust governance tokenomics, and streamline AMM innovation.
Data and Analytics overview
Balancer offers data about the protocol, accessible through various sources. This data is helpful for understanding the protocol's performance, usage, and trends. One of the primary sources of data is our API GraphQL endpoint. This endpoint provides real-time data, making it an excellent resource for those who need up-to-the-minute information about the protocol.
In addition to the API, we also provide a subgraph that indexes the Balancer protocol. This subgraph offers a comprehensive view of the protocol's data, making it easy to analyze and understand the protocol's behavior over time. Lastly, various Dune dashboards exist. These dashboards provide a visual representation of the protocol's data, making it easy to understand and interpret. They are a great resource visual data analysis.

Balancer V2
Onboarding to Balancer v2
Balancer v2 has been a core pillar of DeFi since 2021. By leveraging innovative pool types Balancer v2 has attracted liquidity in the liquid staking token (LST) and liquid restaking token (LRT) sector.Balancer Technology provides decentralised infrastructure for DAOs, which enables efficient scaling of Yield Bearing assets, creating advanced Governance positions, and developing customised pool types. In addition, the Balancer ecosystem facilitates the streamlined scaling of liquidity for DAOs through core pool incentive flywheels and its network of liquidity enhancing protocols.
Onboarding Steps: Onboarding to Balancer v2's tech stack involves various steps depending on the specific needs. In general the onboarding journey consists of following steps: Choosing and launching your pool. Providing initial liquidity. Onboard to Balancer's gauge system. Voting Incentive Markets.

Conclusion
Balancer is a powerful and versatile decentralized automated market maker (AMM) protocol built on Ethereum with a clear focus on fungible and yield-bearing liquidity. With the introduction of Hooks and Dynamic Swap Fees, the degree of customization is boundless. Several custom pools have already been developed by external protocols like Gyroscope and Xave. You can follow this guide to create your own custom pools.
Disclaimer: This article is for informational purposes only and does not constitute financial advice. Investing in cryptocurrencies carries 1 risks, and you should always do your own research and consult with a financial advisor before making any investment decisions.
Additional Resources:
- Balancer Website: Balancer
- Balancer Documentation: Balancer Docs
- Balancer Twitter: Balancer Twitter