curvefi / stableswap-ng

Automatic Market Maker (AMM) for 2 or more pegged assets, written in Vyper.
MIT License
31 stars 15 forks source link

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:

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/