├── .envrc ├── .github ├── dependabot.yml └── workflows │ ├── fuzzing.yml │ ├── libraries.yml │ ├── prebuild.yml │ ├── program.yml │ └── release.yml ├── .gitignore ├── Anchor.toml ├── Cargo.lock ├── Cargo.toml ├── LICENSE ├── README.md ├── assets └── banner.png ├── audit └── bramah-systems.pdf ├── flake.lock ├── flake.nix ├── fuzz ├── .gitignore ├── Cargo.toml ├── README.md ├── src │ ├── lib.rs │ ├── native_account_data.rs │ ├── native_processor.rs │ ├── native_stable_swap.rs │ └── native_token.rs └── targets │ ├── full.rs │ └── swaps_only.rs ├── stable-swap-anchor ├── Cargo.toml ├── README.md └── src │ ├── accounts.rs │ ├── instructions.rs │ ├── lib.rs │ └── state.rs ├── stable-swap-client ├── Cargo.toml ├── README.md └── src │ ├── error.rs │ ├── fees.rs │ ├── instruction.rs │ ├── lib.rs │ └── state.rs ├── stable-swap-math ├── Cargo.toml ├── README.md ├── proptest-regressions │ └── curve.txt ├── sim │ ├── Cargo.toml │ ├── README.md │ ├── simulation.py │ └── src │ │ └── lib.rs └── src │ ├── bn.rs │ ├── curve.rs │ ├── lib.rs │ ├── math.rs │ ├── pool_converter.rs │ └── price.rs └── stable-swap-program ├── README.md ├── do.sh ├── program ├── Cargo.toml ├── README.md ├── proptest-regressions │ └── curve.txt └── src │ ├── entrypoint.rs │ ├── lib.rs │ └── processor │ ├── admin.rs │ ├── checks.rs │ ├── logging.rs │ ├── macros.rs │ ├── mod.rs │ ├── swap.rs │ ├── test_utils.rs │ ├── token.rs │ └── utils.rs ├── scripts ├── _common.sh ├── deploy-mainnet-pools.sh ├── deploy-program.sh ├── deploy-test-pools.sh ├── deployment_config.json └── stableswap └── sdk ├── .eslintignore ├── .eslintrc.js ├── .gitignore ├── .prettierrc ├── README.md ├── babel.config.js ├── jest.config.ts ├── package.json ├── src └── cli │ └── index.ts ├── test ├── admin.int.test.ts ├── deployTestTokens.ts ├── e2e.int.test.ts └── helpers.ts ├── tsconfig.json └── yarn.lock /.envrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saber-hq/stable-swap/HEAD/.envrc -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saber-hq/stable-swap/HEAD/.github/dependabot.yml -------------------------------------------------------------------------------- /.github/workflows/fuzzing.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saber-hq/stable-swap/HEAD/.github/workflows/fuzzing.yml -------------------------------------------------------------------------------- /.github/workflows/libraries.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saber-hq/stable-swap/HEAD/.github/workflows/libraries.yml -------------------------------------------------------------------------------- /.github/workflows/prebuild.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saber-hq/stable-swap/HEAD/.github/workflows/prebuild.yml -------------------------------------------------------------------------------- /.github/workflows/program.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saber-hq/stable-swap/HEAD/.github/workflows/program.yml -------------------------------------------------------------------------------- /.github/workflows/release.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saber-hq/stable-swap/HEAD/.github/workflows/release.yml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saber-hq/stable-swap/HEAD/.gitignore -------------------------------------------------------------------------------- /Anchor.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saber-hq/stable-swap/HEAD/Anchor.toml -------------------------------------------------------------------------------- /Cargo.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saber-hq/stable-swap/HEAD/Cargo.lock -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saber-hq/stable-swap/HEAD/Cargo.toml -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saber-hq/stable-swap/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saber-hq/stable-swap/HEAD/README.md -------------------------------------------------------------------------------- /assets/banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saber-hq/stable-swap/HEAD/assets/banner.png -------------------------------------------------------------------------------- /audit/bramah-systems.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saber-hq/stable-swap/HEAD/audit/bramah-systems.pdf -------------------------------------------------------------------------------- /flake.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saber-hq/stable-swap/HEAD/flake.lock -------------------------------------------------------------------------------- /flake.nix: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saber-hq/stable-swap/HEAD/flake.nix -------------------------------------------------------------------------------- /fuzz/.gitignore: -------------------------------------------------------------------------------- 1 | artifacts/ 2 | corpus/ 3 | -------------------------------------------------------------------------------- /fuzz/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saber-hq/stable-swap/HEAD/fuzz/Cargo.toml -------------------------------------------------------------------------------- /fuzz/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saber-hq/stable-swap/HEAD/fuzz/README.md -------------------------------------------------------------------------------- /fuzz/src/lib.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saber-hq/stable-swap/HEAD/fuzz/src/lib.rs -------------------------------------------------------------------------------- /fuzz/src/native_account_data.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saber-hq/stable-swap/HEAD/fuzz/src/native_account_data.rs -------------------------------------------------------------------------------- /fuzz/src/native_processor.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saber-hq/stable-swap/HEAD/fuzz/src/native_processor.rs -------------------------------------------------------------------------------- /fuzz/src/native_stable_swap.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saber-hq/stable-swap/HEAD/fuzz/src/native_stable_swap.rs -------------------------------------------------------------------------------- /fuzz/src/native_token.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saber-hq/stable-swap/HEAD/fuzz/src/native_token.rs -------------------------------------------------------------------------------- /fuzz/targets/full.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saber-hq/stable-swap/HEAD/fuzz/targets/full.rs -------------------------------------------------------------------------------- /fuzz/targets/swaps_only.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saber-hq/stable-swap/HEAD/fuzz/targets/swaps_only.rs -------------------------------------------------------------------------------- /stable-swap-anchor/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saber-hq/stable-swap/HEAD/stable-swap-anchor/Cargo.toml -------------------------------------------------------------------------------- /stable-swap-anchor/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saber-hq/stable-swap/HEAD/stable-swap-anchor/README.md -------------------------------------------------------------------------------- /stable-swap-anchor/src/accounts.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saber-hq/stable-swap/HEAD/stable-swap-anchor/src/accounts.rs -------------------------------------------------------------------------------- /stable-swap-anchor/src/instructions.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saber-hq/stable-swap/HEAD/stable-swap-anchor/src/instructions.rs -------------------------------------------------------------------------------- /stable-swap-anchor/src/lib.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saber-hq/stable-swap/HEAD/stable-swap-anchor/src/lib.rs -------------------------------------------------------------------------------- /stable-swap-anchor/src/state.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saber-hq/stable-swap/HEAD/stable-swap-anchor/src/state.rs -------------------------------------------------------------------------------- /stable-swap-client/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saber-hq/stable-swap/HEAD/stable-swap-client/Cargo.toml -------------------------------------------------------------------------------- /stable-swap-client/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saber-hq/stable-swap/HEAD/stable-swap-client/README.md -------------------------------------------------------------------------------- /stable-swap-client/src/error.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saber-hq/stable-swap/HEAD/stable-swap-client/src/error.rs -------------------------------------------------------------------------------- /stable-swap-client/src/fees.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saber-hq/stable-swap/HEAD/stable-swap-client/src/fees.rs -------------------------------------------------------------------------------- /stable-swap-client/src/instruction.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saber-hq/stable-swap/HEAD/stable-swap-client/src/instruction.rs -------------------------------------------------------------------------------- /stable-swap-client/src/lib.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saber-hq/stable-swap/HEAD/stable-swap-client/src/lib.rs -------------------------------------------------------------------------------- /stable-swap-client/src/state.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saber-hq/stable-swap/HEAD/stable-swap-client/src/state.rs -------------------------------------------------------------------------------- /stable-swap-math/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saber-hq/stable-swap/HEAD/stable-swap-math/Cargo.toml -------------------------------------------------------------------------------- /stable-swap-math/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saber-hq/stable-swap/HEAD/stable-swap-math/README.md -------------------------------------------------------------------------------- /stable-swap-math/proptest-regressions/curve.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saber-hq/stable-swap/HEAD/stable-swap-math/proptest-regressions/curve.txt -------------------------------------------------------------------------------- /stable-swap-math/sim/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saber-hq/stable-swap/HEAD/stable-swap-math/sim/Cargo.toml -------------------------------------------------------------------------------- /stable-swap-math/sim/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saber-hq/stable-swap/HEAD/stable-swap-math/sim/README.md -------------------------------------------------------------------------------- /stable-swap-math/sim/simulation.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saber-hq/stable-swap/HEAD/stable-swap-math/sim/simulation.py -------------------------------------------------------------------------------- /stable-swap-math/sim/src/lib.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saber-hq/stable-swap/HEAD/stable-swap-math/sim/src/lib.rs -------------------------------------------------------------------------------- /stable-swap-math/src/bn.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saber-hq/stable-swap/HEAD/stable-swap-math/src/bn.rs -------------------------------------------------------------------------------- /stable-swap-math/src/curve.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saber-hq/stable-swap/HEAD/stable-swap-math/src/curve.rs -------------------------------------------------------------------------------- /stable-swap-math/src/lib.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saber-hq/stable-swap/HEAD/stable-swap-math/src/lib.rs -------------------------------------------------------------------------------- /stable-swap-math/src/math.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saber-hq/stable-swap/HEAD/stable-swap-math/src/math.rs -------------------------------------------------------------------------------- /stable-swap-math/src/pool_converter.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saber-hq/stable-swap/HEAD/stable-swap-math/src/pool_converter.rs -------------------------------------------------------------------------------- /stable-swap-math/src/price.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saber-hq/stable-swap/HEAD/stable-swap-math/src/price.rs -------------------------------------------------------------------------------- /stable-swap-program/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saber-hq/stable-swap/HEAD/stable-swap-program/README.md -------------------------------------------------------------------------------- /stable-swap-program/do.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saber-hq/stable-swap/HEAD/stable-swap-program/do.sh -------------------------------------------------------------------------------- /stable-swap-program/program/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saber-hq/stable-swap/HEAD/stable-swap-program/program/Cargo.toml -------------------------------------------------------------------------------- /stable-swap-program/program/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saber-hq/stable-swap/HEAD/stable-swap-program/program/README.md -------------------------------------------------------------------------------- /stable-swap-program/program/proptest-regressions/curve.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saber-hq/stable-swap/HEAD/stable-swap-program/program/proptest-regressions/curve.txt -------------------------------------------------------------------------------- /stable-swap-program/program/src/entrypoint.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saber-hq/stable-swap/HEAD/stable-swap-program/program/src/entrypoint.rs -------------------------------------------------------------------------------- /stable-swap-program/program/src/lib.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saber-hq/stable-swap/HEAD/stable-swap-program/program/src/lib.rs -------------------------------------------------------------------------------- /stable-swap-program/program/src/processor/admin.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saber-hq/stable-swap/HEAD/stable-swap-program/program/src/processor/admin.rs -------------------------------------------------------------------------------- /stable-swap-program/program/src/processor/checks.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saber-hq/stable-swap/HEAD/stable-swap-program/program/src/processor/checks.rs -------------------------------------------------------------------------------- /stable-swap-program/program/src/processor/logging.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saber-hq/stable-swap/HEAD/stable-swap-program/program/src/processor/logging.rs -------------------------------------------------------------------------------- /stable-swap-program/program/src/processor/macros.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saber-hq/stable-swap/HEAD/stable-swap-program/program/src/processor/macros.rs -------------------------------------------------------------------------------- /stable-swap-program/program/src/processor/mod.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saber-hq/stable-swap/HEAD/stable-swap-program/program/src/processor/mod.rs -------------------------------------------------------------------------------- /stable-swap-program/program/src/processor/swap.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saber-hq/stable-swap/HEAD/stable-swap-program/program/src/processor/swap.rs -------------------------------------------------------------------------------- /stable-swap-program/program/src/processor/test_utils.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saber-hq/stable-swap/HEAD/stable-swap-program/program/src/processor/test_utils.rs -------------------------------------------------------------------------------- /stable-swap-program/program/src/processor/token.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saber-hq/stable-swap/HEAD/stable-swap-program/program/src/processor/token.rs -------------------------------------------------------------------------------- /stable-swap-program/program/src/processor/utils.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saber-hq/stable-swap/HEAD/stable-swap-program/program/src/processor/utils.rs -------------------------------------------------------------------------------- /stable-swap-program/scripts/_common.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saber-hq/stable-swap/HEAD/stable-swap-program/scripts/_common.sh -------------------------------------------------------------------------------- /stable-swap-program/scripts/deploy-mainnet-pools.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saber-hq/stable-swap/HEAD/stable-swap-program/scripts/deploy-mainnet-pools.sh -------------------------------------------------------------------------------- /stable-swap-program/scripts/deploy-program.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saber-hq/stable-swap/HEAD/stable-swap-program/scripts/deploy-program.sh -------------------------------------------------------------------------------- /stable-swap-program/scripts/deploy-test-pools.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saber-hq/stable-swap/HEAD/stable-swap-program/scripts/deploy-test-pools.sh -------------------------------------------------------------------------------- /stable-swap-program/scripts/deployment_config.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saber-hq/stable-swap/HEAD/stable-swap-program/scripts/deployment_config.json -------------------------------------------------------------------------------- /stable-swap-program/scripts/stableswap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saber-hq/stable-swap/HEAD/stable-swap-program/scripts/stableswap -------------------------------------------------------------------------------- /stable-swap-program/sdk/.eslintignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saber-hq/stable-swap/HEAD/stable-swap-program/sdk/.eslintignore -------------------------------------------------------------------------------- /stable-swap-program/sdk/.eslintrc.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saber-hq/stable-swap/HEAD/stable-swap-program/sdk/.eslintrc.js -------------------------------------------------------------------------------- /stable-swap-program/sdk/.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saber-hq/stable-swap/HEAD/stable-swap-program/sdk/.gitignore -------------------------------------------------------------------------------- /stable-swap-program/sdk/.prettierrc: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /stable-swap-program/sdk/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saber-hq/stable-swap/HEAD/stable-swap-program/sdk/README.md -------------------------------------------------------------------------------- /stable-swap-program/sdk/babel.config.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saber-hq/stable-swap/HEAD/stable-swap-program/sdk/babel.config.js -------------------------------------------------------------------------------- /stable-swap-program/sdk/jest.config.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saber-hq/stable-swap/HEAD/stable-swap-program/sdk/jest.config.ts -------------------------------------------------------------------------------- /stable-swap-program/sdk/package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saber-hq/stable-swap/HEAD/stable-swap-program/sdk/package.json -------------------------------------------------------------------------------- /stable-swap-program/sdk/src/cli/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saber-hq/stable-swap/HEAD/stable-swap-program/sdk/src/cli/index.ts -------------------------------------------------------------------------------- /stable-swap-program/sdk/test/admin.int.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saber-hq/stable-swap/HEAD/stable-swap-program/sdk/test/admin.int.test.ts -------------------------------------------------------------------------------- /stable-swap-program/sdk/test/deployTestTokens.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saber-hq/stable-swap/HEAD/stable-swap-program/sdk/test/deployTestTokens.ts -------------------------------------------------------------------------------- /stable-swap-program/sdk/test/e2e.int.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saber-hq/stable-swap/HEAD/stable-swap-program/sdk/test/e2e.int.test.ts -------------------------------------------------------------------------------- /stable-swap-program/sdk/test/helpers.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saber-hq/stable-swap/HEAD/stable-swap-program/sdk/test/helpers.ts -------------------------------------------------------------------------------- /stable-swap-program/sdk/tsconfig.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saber-hq/stable-swap/HEAD/stable-swap-program/sdk/tsconfig.json -------------------------------------------------------------------------------- /stable-swap-program/sdk/yarn.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saber-hq/stable-swap/HEAD/stable-swap-program/sdk/yarn.lock --------------------------------------------------------------------------------