# stable-swap
[](https://github.com/saber-hq/stable-swap/blob/master/LICENSE)
[](https://github.com/saber-hq/stable-swap/actions/workflows/program.yml?query=branch%3Amaster)
[](https://github.com/saber-hq/stable-swap/graphs/contributors)
An automated market maker for mean-reverting trading pairs.
## Documentation
Detailed information on how to build on Saber can be found on the [Saber developer documentation website](https://docs.saber.so/docs/developing/overview).
Automatically generated documentation for Rust Crates is available below.
## Rust Crates
| Package | Description | Version | Docs |
| :------------------- | :----------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------- |
| `stable-swap` | Saber StableSwap program. | [](https://crates.io/crates/stable-swap) | [](https://docs.rs/stable-swap) |
| `stable-swap-anchor` | Anchor bindings for the StableSwap Rust client. | [](https://crates.io/crates/stable-swap-anchor) | [](https://docs.rs/stable-swap-anchor) |
| `stable-swap-client` | StableSwap Rust client. | [](https://crates.io/crates/stable-swap-client) | [](https://docs.rs/stable-swap-client) |
| `stable-swap-fuzz` | Fuzz tests for the Saber StableSwap program. | [](https://crates.io/crates/stable-swap-fuzz) | [](https://docs.rs/stable-swap-fuzz) |
| `stable-swap-math` | Calculations for the StableSwap invariant | [](https://crates.io/crates/stable-swap-math) | [](https://docs.rs/stable-swap-math) |
| `stable-swap-sim` | Simulations of the StableSwap invariant compared to Curve's reference implementation | [](https://crates.io/crates/stable-swap-sim) | [](https://docs.rs/stable-swap-sim) |
## JavaScript/Web3.js
To use StableSwap with your frontend or Node.js project, use [the JavaScript SDK.](https://github.com/saber-hq/saber-common/tree/master/packages/stableswap-sdk)
## Audit
Saber's [stable-swap-program](https://github.com/saber-hq/stable-swap/tree/master/stable-swap-program) has been audited by [Bramah Systems](https://www.bramah.systems/). View the audit report [here](https://github.com/saber-hq/stable-swap/blob/master/audit/bramah-systems.pdf).
## Developing
### Tests
To run the tests, run:
```
./stable-swap-program/do.sh e2e-test
```
## Archive
The original Saber StableSwap program can be found on the [archive branch](https://github.com/saber-hq/stable-swap/tree/archive).
## License
Saber StableSwap is licensed under the Apache License, Version 2.0.