Skip to content

Automatic Market Maker (AMM) for 2 or more pegged assets, written in Vyper.

License

Notifications You must be signed in to change notification settings

curvefi/stableswap-ng

Repository files navigation

Stableswap NG

Permissionless deployment of Curve Stableswap plain and metapools. Supports up to 8 coins for plain pools and 2 coins for metapools. Supports: rate-oraclised tokens (e.g. wstETH), ERC4626 (sDAI), rebasing (stETH), and plain (WETH:stETH) pools. Does not support native tokens.

For integrators: check exchange_received. That should improve your pathing significantly. Be aware that if a pool contains rebasing tokens, this method is intentionally disabled.

Deployments

For a full list of deployments, please check: The deployment script

Overview

The metapool factory has several core components:

  • Factory is the main contract used to deploy new metapools. It also acts a registry for finding the deployed pools and querying information about them.
  • New pools are deployed via blueprints. The implementation contract targeted by the proxy is determined according to the base pool.

See the documentation for more detailed information.

Testing

Installation

Install dependencies using poetry (python ^3.10.4)

pip install poetry==1.5.1
poetry install

Type of tests

Testing gauge

pytest tests/gauge/

Testing factory

pytest tests/factory/

Testing swap is ERC20

pytest tests/token/

Testing swaps

pytest tests/pools/