A 1:1 stablecoin swap contract with decimal normalization, fee collection, and role-based access control.
StableSwapper enables swapping between stablecoins at a 1:1 ratio, automatically handling decimal differences between tokens. It is designed for protocols that need to offer stablecoin liquidity with configurable fees, token allowlisting, and granular operational controls.
- 1:1 Stablecoin Swaps -- Swap between any listed stablecoins with automatic decimal normalization
- Fee Collection -- Configurable fee in basis points, charged on the input token
- Role-Based Access Control -- Distinct authorities with separated concerns
- Pause Controls -- Independent toggles for swap and liquidity operations
- Slippage Protection -- Users specify a minimum output amount per swap
| Chain | Directory | Details |
|---|---|---|
| EVM | evm/ |
Solidity, UUPS upgradeable proxy, OpenZeppelin |
| SVM | solana/ |
Rust / Anchor 0.31, single centralized liquidity pool |
See each implementation's README for chain-specific quickstart, build, test, and deployment instructions.
stable-swapper/
├── evm/ # EVM (Solidity) implementation
│ ├── src/ # Production contracts
│ ├── test/ # Unit and integration tests
│ └── README.md
├── solana/ # SVM (Rust / Anchor) implementation
│ ├── programs/ # On-chain Anchor program
│ ├── tests/ # Anchor / Mocha integration tests
│ └── README.md
├── LICENSE
├── SECURITY.md
├── CONTRIBUTING.md
└── .github/
├── workflows/ # CI workflows
└── PULL_REQUEST_TEMPLATE.md
See CONTRIBUTING.md for development setup, coding standards, and the pull request workflow.
See SECURITY.md for our security policy and how to report vulnerabilities.
This project is licensed under the Apache 2.0 License. See LICENSE for details.