🔁 Swap
Swap
The Swap function on AstroSwap allows users to exchange tokens directly on X Layer through an automated market maker (AMM). Unlike legacy constant-product models, AstroSwap leverages V3 concentrated liquidity pools to deliver improved price execution and reduced slippage.
Key Characteristics
Efficient Liquidity Usage
Liquidity is concentrated around active price ranges, so trades execute against deeper liquidity where it is most needed.
Reduced Slippage
Concentrated ranges lower the price impact of larger orders compared to traditional V2-style pools.
Multiple Fee Tiers
Each pair may support several fee tiers (e.g. 0.01%, 0.05%, 0.3%, 1%). The routing algorithm selects the path that maximizes output after fees.
Deterministic Settlement
All swaps are executed atomically on-chain. Orders either succeed in full or revert—there are no partial fills.
Price and Execution
Quotes: Before confirmation, users see an estimated output based on the latest pool state.
Guards: Transactions include parameters such as minimum received and deadline to protect against price movement and execution delays.
Routing: If no direct pool exists, swaps are routed through intermediate pairs to optimize execution.
Fees
Pool Fee: Paid to liquidity providers, rate depends on the fee tier used in the route.
Network Gas: Paid to X Layer validators for transaction execution.
There are no additional protocol charges beyond these fees.
Risk Considerations
Price Movement: Volatile markets may cause reverts if execution deviates from the quoted price.
Liquidity Depth: Large trades may experience higher price impact in pools with limited depth.
Token Standards: Non-standard tokens (e.g. fee-on-transfer) may not be supported.
AstroSwap’s Swap feature provides professional-grade token exchange on X Layer, combining lower slippage, efficient routing, and transparent fees with the security of fully on-chain settlement.
Last updated