Swap
#28Token swap functionality
Part of Economy & Balances: TAO token management, transfers, and transaction fees
Adds liquidity to a subnet's pool within a specified price range.
Current sqrt price of Alpha per subnet.
Active liquidity at current price per subnet.
Current price tick per subnet.
Disables user liquidity in all subnets.
Whether user liquidity is enabled per subnet.
Accumulated Alpha fees for distribution per subnet.
Accumulated TAO fees for distribution per subnet.
Swap fee rate per subnet, normalized between 0 and u16::MAX.
Emitted when the swap fee rate is updated for a subnet's liquidity pool.
The specified fee rate exceeds the maximum allowed.
You don't have enough TAO or Alpha for this operation.
The provided amount is too small for the swap.
Not enough liquidity in the pool for this operation.
The liquidity value is invalid (likely too small).
The tick range is invalid for adding liquidity.
Counter for unique position IDs.
Emitted when a user adds liquidity to a subnet's pool.
Emitted when a user modifies an existing liquidity position.
The specified liquidity position doesn't exist.
Emitted when a user removes an entire liquidity position.
Maximum allowed fee rate for swaps.
Maximum positions per user.
You've reached the maximum number of positions allowed.
The specified subnet doesn't exist.
Minimum liquidity safe for rounding.
Minimum TAO/Alpha reserve required in pools.
Adds or removes liquidity from an existing position and claims fees.
User liquidity positions with tick ranges.
Your transaction was rejected because the current Alpha exchange rate is worse than the limit_price you specified. This is your slippage protection working as intended — the price moved against you between when you submitted and when the chain tried to execute.
PalletId used to derive the protocol account address.
Removes an entire liquidity position and claims accrued fees.
Pool reserves are too low for this operation.
Alpha reservoir for fee scraps per subnet.
TAO reservoir for fee scraps per subnet.
Sets the swap fee rate for a specific subnet's liquidity pool.
The subnet doesn't have subtoken (Alpha) enabled.
Whether V3 swap is initialized for a subnet.
Bitmap tracking initialized ticks.
Tick data for concentrated liquidity price points.
Enables or disables user liquidity operations for a subnet.
The swap requires too many tick crossings.
User liquidity operations are not enabled for this subnet.
Emitted when user liquidity is enabled or disabled for a subnet.