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.
For a full list of deployments, please check: The deployment script
The metapool factory has several core components:
Factoryis 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.
- There is extra StableSwap implementation with admin functionality on
admin-implementationbranch initially used by crosscurve on Sonic.
See the documentation for more detailed information.
Install the repository as a Python package, then import the LP oracle from Vyper:
from stableswap_ng import LPOracleInstall dependencies using uv (python >=3.10)
uv sync --group devThe contracts in this repository use Vyper 0.3.10, while the packaged LP oracle uses Vyper 0.4.3. Run the legacy contract tests in their locked environment:
uv run --python 3.10 --no-project --with-requirements requirements-tests.txt pytest tests/Testing gauge
pytest tests/gauge/Testing factory
pytest tests/factory/Testing swap is ERC20
pytest tests/token/Testing swaps
pytest tests/pools/