Skip to content

Creating a Stableswap-NG pool

The Stableswap pool creation is appropriate for assets expected to hold a price peg very close to each other, like a pair of dollarcoins. The creation wizard will guide you through the process of creating a pool, but if you have questions throughout you are encouraged to speak with a member of the Curve team in the Telegram or Discord.

Stableswap pools are liquidity pools containing up to eight tokens using the StableSwap algorithm (Curve V1). For a better understanding of Curve V1, please see here: Understanding Curve V1.

Stableswap-NG

StableSwap-NG is an improved and refined version of the first StableSwap implementation. For a better understanding of what Stableswap-NG is and how it differs from regular Stableswap pools, check this.


Tokens in Pool

The token selection tab can be used to select between two and eight tokens. A token can be selected by searching for the symbol of any token that is already being used on Curve, or by pasting the pool's address. Additional tokens can be added through the blue Add token button.

When creating a metapool, only two tokens can be selected. One is the LP token, and the other is the token to pair against it.

Warning

  • ERC20: Users are advised to do careful due diligence on ERC20 tokens that they interact with, as this contract cannot differentiate between harmless and malicious ERC20 tokens.
  • Oracle: When using tokens with oracles, it is important to know that they may be controlled externally by an EOA.
  • Rebasing: Users and integrators are advised to understand how the AMM contract works with rebasing balances.
  • ERC4626: Some ERC4626 implementations may be susceptible to Donation/Inflation attacks. Users are advised to proceed with caution.

For the AMM to function correctly, the appropriate asset type needs to be chosen when selecting the assets. The following asset types are supported:

Standard ERC-20

Standard ERC-20 tokens do not need any additional configuration.

Tokens with Oracles

Some tokens might require an external rate oracle. In this case, when selecting a token that has an oracle, the corresponding box needs to be ticked, and an extra section for the contract address and oracle price method appears. Some tokens might retain their price oracle form a contract other than the token contract.

Rebasing Tokens

Rebasing tokens in crypto are cryptocurrencies that automatically adjust their supply periodically based on a predetermined algorithm, typically to maintain a stable value or peg to another asset.

ERC-4626

ERC-4626 is a standard to optimize and unify the technical parameters of yield-bearing vaults. It provides a standard API for tokenized yield-bearing vaults that represent shares of a single underlying ERC-20 token. ERC-4626 also outlines an optional extension for tokenized vaults utilizing ERC-20, offering basic functionality for depositing, withdrawing tokens and reading balances.


Parameters

Stableswap-NG offers two different default Pool Parameter Presets:


  • Swap Fee ranging from 0% to 1%: The swap fee charged during transactions.
  • A ranging from 1 to 5,000: The amplification coefficient, which defines the pool's density.
  • Offpeg Fee Multiplier from 0 to 12.5: A multiplier that adjusts the Swap Fee based on the pool's state.
  • Moving Average Time ranging from 60 to 3600 seconds: The moving average time window for the built-in oracle.

Offpeg Fee Multiplier

Stableswap-NG introduces a dynamic fee. The use of the Offpeg Fee Multiplier allows the system to dynamically adjust the fee based on the pool's state.

A tool to play around with the dynamic fee: https://www.desmos.com/calculator/zhrwbvcipo?


Pool Info

Finally, after setting all the parameters, a Pool Name and Pool Symbol can be chosen:


Deploying the Pool

On the right-hand side, there is a tab that summarizes all the tokens, parameters, and information. The pool can finally be deployed by pressing the blue Create Pool button at the bottom.

After deployment, make sure to seed initial liquidity and create a gauge.