Description

This proposal extends the Stable Swap Simulator project, developing a universal pool simulator application. This tool will enable visual comparisons of different pool types or parameters and provide insights into how parametrization affects pool behavior.

The goal is to boost knowledge about pool types among ballers and community members, helping maximize each pool's potential (price, volume, TVL), assisting Pool Creators in choosing suitable pool types and drawing more liquidity providers.

Our Pool Simulator seeks to educate pools creators and managers on various Balancer pool types, illuminating the impact of different pool parameters, and comparing pool types for similar use cases, highlighting each type's strengths and weaknesses, e.g.

Building on the Stable Swap Simulator, we'll integrate all developed components, packages, and visualizations with additional features per pool type. The tools will be integrated under our current https://tools.balancer.blue NextJS app (Github).

All tools are to be integrated under our current https://tools.balancer.blue NextJS app (Github).

Why Balancer?

bleu believes in Balancer's vision of being a flexible platform for others to build on. We think we can help grow the protocol by building tools that bridge the user experience gap that exists between protocol innovations and UX/UI tooling that users need to drive value out of them.

StableSwap Simulator and Internal Manager are recent examples of tools built by us that aimed to leverage unknown features of the Vault (Internal Balances) and help users understand the Stable math behind one of the most popular pool types.

Deliverables

Dashboard — expand the Stable Swap dashboard to include the Gyro, FX, and Weighted pools. For each pool type, the StableSwap visualizations will be adapted, and also new visualizations added. This new Pools Simulator is going to support analyses per AMM, to find the best set of parameters, and also cross-AMM, to choose the best pool type.

Milestones

  1. Cross-AMM analysis flow + planning (3 weeks)
    1. Description: Before implementing any new pool type, we will change the user flow in the application to support cross-AMM analysis. This milestone starts with a Figma design of user flow and ends with the front-end implementation. Even do we still have just one pool type at this point, this task will allow us to fully test each new pool type added to the dashboard.
    2. Deliverables:
      1. Figma design of new input pools flow and components (1 week)
      2. Implementation of the new flow on the application (2 weeks)
  2. Gyro Concentrated Liquidity implementation (4 weeks)
    1. Description: The three Gyro pool types (2CLP, 3CLP, and E-CLP) are a new trend in the Balancer ecosystem and that is why we choose them to add to our simulation. Those three pools have different math implementations that we need to add. The cross-AMM analysis with weighted (for 2CLP and 3CLP) and stable swap pools (for E-CLP) will help Pool Creators to understand for which cases the Gyro implementations are a better fit.
    2. Deliverables:
      1. Gyro pools implementation, allowing per and cross-AMM analysis (1.5 weeks)
      2. Implementation of price range limits into the depth cost visualization (1.5 weeks)
      3. Pool price range limits implemented on swap and price impact curve (0.5 weeks)
      4. Swap simulation liquidity leak warning if the swap would move the price out of the pool operation zone; implementation for StableSwap as well (0.5 weeks)
  3. Xave Finance implementation (2 weeks)
    1. Description: Xave Finance proposed a new system of rewards and fees to balance stable swaps. Since FX has a lot of mutable parameters (see Viability Analysis section), this dashboard can also help pool owners to optimize the pool on the fly.
    2. Deliverables:
      1. FX pools implemented into the platform and allowing both per-AMM and cross-AMM analyses (1 week)
      2. Add Beta region visualization into swap and price impact curve (0.5 weeks)
      3. Add depth cost price change reference changed to prices out of the Beta region (0.5 weeks)

Viability Analysis

As we did on the StableSwap project, we're going to use the Balancer SOR math implementation to develop the dashboard. We have added the pool parameters to the table below to help us to understand the dashboard requirements and use cases.

Gyro 2CLP Gyro 3CLP Gyro E-CLP Xave FX
Available on SOR Yes* Yes* Yes* Yes
Spot price implemented (before and after swap) on SOR Just after the swap. Need to test if null swap amount work, or write the before swap function Just after the swap. Need to test if null swap amount work, or write the before swap function Yes Yes
Spot price derivatives (after swap) on SOR Yes Yes Yes Yes
Total fee paid calculation on SOR Yes Yes Yes Yes, but the dynamic fee is not easily exported.
Pool immutable parameters Alpha, beta, and weights Alpha and weights Alpha, beta, lambda, c, s, and weights Weights
Pool mutable parameters Fee Fee Fee Alpha, Beta, Delta, Epsilon, and Lambda