Capital-Efficient AMMs With Dynamically Adjusted Weights In Balancer V2

PowerPool
Balancer Protocol
Published in
5 min readMay 18, 2021

PowerPool shares a dynamic weights AMM concept and its implementation on top of Balancer V2.

PowerPool is excited to be a launch partner of Balancer V2 in building structured investment products and ETFs on top of Balancer Protocol. Balancer V2 architecture allows our team to build a gas-efficient and elegant implementation which will allow all participants of the Balancer ecosystem to use new strategies for pool operation and asset management.

In late 2020, we developed Smart ETF pools on top of Balancer V1. Our goal was to develop an efficient tech solution for structured investment products and ETFs operating on top of Balancer AMM. Having researched several different options, we decided to launch it on top of Balancer V1 with the following modifications:

(1) A custom weights changing algorithm to allow community or automatic strategies to efficiently manage the pool weights.

(2) An option of using assets from the AMM outside the pool to generate additional yield for LPs through staking to improve capital efficiency.

(3) Meta-governance function for using assets from the pool for voting in governance of their native DeFi protocols.

Balancer V1 didn’t support the addition of custom logic for weights changing, nor the usage of pool assets outside the pool. Possibilities for meta-governance implementations were also limited to assets that don’t require transfer to another contract for voting. Taking into account all the above, we forked Balancer V1 and built an AMM with algorithmically adjusted weights and a possibility to use assets in external protocols.

The development of Balancer V2 opened up a whole new world of opportunities to develop AMM pools with custom strategies for weights changing and asset management. Also, it is exciting that our code for V1 is mainly compatible with V2, so we can easily re-use contracts of weights changing and asset management strategies for V2-based pools.

Capital-Efficient Dynamic AMM: How it works

Dynamic AMM is an AMM that automatically adjusts parameters according to a certain strategy. In the case of PowerPool, AMM updates the weights of assets. However, it won’t be possible without a special agent that is making transactions and contract calls for calculating new weights based on on-chain data and updating them via Controller contract.

Accordingly, for Dynamic AMM implementation, we developed a special PowerOracle system for automatic system maintenance. The core element of this system is Power Agent — an agent, executing all on-chain smart-contract calls, necessary for the operation of PowerPool. This agent is selected based on staking and therefore has skin in the game. Contract calls include updating TWAP (Uniswap, Sushiswap) oracle price feeds. Execution strategies of dynamic weights changing in AMM pools by calling controlling contracts, strategy contracts, and pool contracts.

To let assets pooled in the Dynamic AMM pool be used in external protocols, we have developed Wrapper and Router systems. Tokens that are used in external protocols are stored on the Wrapper contract, while the original pool composition is presented by ppTokens (wrapped tokens). The router contract can seamlessly change asset management strategies without affecting the main pool since the logic for fund management and AMM pool are abstracted from one another. This approach was quite complex in V1, but in Balancer V2, with the native abstraction of custody (Vault), AMM logic, and asset managers it will be implemented in a much easier and elegant way. Additionally, an approach to charge LPs entry/exit fees is native for PowerPool protocol transactional model, i.e. users paying fees for entering/exiting products.

All these developments and implemented code will be seamlessly merged to Balancer V2. We plan to:

(1) Launch our new AMM-based products (including complex structured investment products) on Balancer V2 and migrate existing ones from V1.

(2) Act as an asset manager on Balancer V2, offering our strategies for yield generation for certain DeFi tokens to all V2 pools; for this purpose, we plan to approach the BAL community to start the whitelisting process.

(3) Become a Dynamic AMM provider on Balancer V2 offering an easy launch of Dynamic AMM pools to all interested stakeholders with various strategies.

Why we used Balancer V2

We decided to use Balancer V2 as the main protocol for building PowerPool products due to:

(1) Its technical architecture offers an incredible level of flexibility for building complex AMM products. We can build complex pools much easier than on top of V1, or any other AMM solution.

(2) Integration and Network effects. PowerPool products built on Balancer V2 will be natively integrated into the Balancer ecosystem, including smart routing and gas-efficient cross-trading. Additionally, PowerPool asset management strategies will be able to receive funds not only from PowerPool native pools but from any pool launched on top of V2.

(3) Collaboration with the ecosystem participants & potential of developing brand new products with a custom AMM logic. Now PowerPool uses the generalized constant product invariant, but for some products, it can be more efficient to use custom AMM logic, for example collaborating with other protocols building on top of Balancer V2.

(4) Security. We are happy to build on top of protocols audited by top-notch firms, and audit only a limited amount of new code (for example, Dynamic AMM or asset management strategies).

PowerPool Protocol

PowerPool protocol brings to the market decentralized and community-owned structured investment products and ETFs built on top of AMM. Users can use these investment vehicles as automatic portfolio strategies with yield generation and rebalancing.

The PowerPool team and community see big promise in AMM-based financial products. This is why we are proud that the PowerPool community decided to co-fund a research grant for building the Balancer V1 Python cadCAD model together with Balancer Labs. Now we are building simulation models for Dynamic AMMs and arbitrage agents on top of the Balancer V1 cadCAD model and participating in Balancer Simulations research group as a partner, providing bounties and research tasks for V2-based pools.

Follow Balancer

Twitter | Discord | Website | Dashboard

Learn more about Balancer V2:

--

--

PowerPool
Balancer Protocol

DePIN layer powering AI Agents and DeFi automation in multichain universe.