Overview
The core functionality of StableSwap is to allow users to trade digital assets securely with low fees and minimal slippage on the Stable blockchain.
Slippage is the difference between the current market price and the price at which the trade is executed. This could result in getting fewer tokens (higher price paid) or more tokens (lower price paid) than expected.
Pool Types
To provide access to the best rates, StableSwap offers two pool types:
Stable Pools
For Correlated Assets - Assets with similar prices (e.g., stablecoins: USDC, USDT, etc.)
Stable pools use a specialized formula that allows for low slippage even on large traded volumes.
Formula: x³y + y³x ≥ k
This curve maintains low slippage for assets that should trade close to 1:1, making them perfect for stablecoin pairs.
Volatile Pools
For Uncorrelated Assets - Assets with different prices (e.g., STA and WgUSDT)
Volatile pools use a generic AMM formula for assets with high price volatility.
Formula: x × y ≥ k
This is the standard constant product formula used by AMMs like Uniswap, perfect for pairs with significant price differences.
Visual Comparison
The mathematical formulas keep the total pool liquidity constant at all times.
View interactive graph - Compare stable (red) vs volatile (green) AMM pricing equations
Where:
x is the amount of first asset in the pool
y is the amount of second asset in the pool
k is a fixed constant
Router Intelligence
The protocol router evaluates both pool types to determine the most efficient price quotation and trade execution route available.
TWAP Protection - Uses 30-minute TWAPs (time-weighted average prices) to protect against flashloan attacks
No Maintenance - The router doesn’t require external maintenance or upkeep
The deeper the liquidity of a pool (higher value locked), the smaller the slippage it will offer.
Trading Fees
On StableSwap, trading fees are kept in the originally traded tokens. If you trade USDC and STA, the fees will be kept in the same tokens.
Fee Structure
| Pool Type | Default Fee | Maximum Fee |
|---|
| Stable Pools | 0.02% | 0.3% |
| Volatile Pools | 0.2% | 0.3% |
The Volatile and Stable liquidity pools can be assigned different trading fees, with all fees adjustable up to 0.3%.
Fee Distribution
- Collected - Fees are collected from traders when they swap tokens
- Held - Fees are held in the pool in the original tokens traded
- Distributed - 100% of fees are distributed to veSTA voters who voted for that pool
Future Pool Types
More pool types coming soon. As we upgrade our protocol, we will introduce additional pool types such as:
Concentrated Liquidity - Capital-efficient pools where LPs can specify price ranges
Multi-Token Pools - Pools with more than two tokens for diversified exposure
Key Points
- Two pool types: Stable pools for correlated assets (low fees, tight spreads) and Volatile pools for uncorrelated assets (standard AMM)
- Smart router automatically finds the best execution path with flashloan protection
- Competitive fees: 0.02% for stable pools, 0.2% for volatile pools, all adjustable
- 100% fee distribution to veSTA voters, aligning incentives