PriceLimitExceeded
Error v290 → current 28.3Your 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.
Why This Error Exists
The limit_price parameter on staking calls (add_stake_limit, remove_stake_limit, swap_stake_limit, remove_stake_full_limit) is slippage protection. It sets the worst acceptable exchange rate in RAO per Alpha. For add_stake, price must be <= your limit (you refuse to overpay). For remove_stake, price must be >= your limit (you refuse to undersell). This mirrors how DEX slippage tolerance works. The check happens at execution time, not submission — so the price can change between when you sign and when the block runs.
Deep Dive
When you stake TAO, the chain converts TAO→Alpha via an AMM swap. The exchange rate depends on the subnet's liquidity pool. The limit_price (u64, in RAO per one Alpha) tells the chain: "reject this if the rate is worse than X." For add_stake_limit, "worse" means the Alpha costs more TAO than your limit. For remove_stake_limit, "worse" means you'd receive less TAO per Alpha than your limit. The actual price is derived from Swap.AlphaSqrtPrice — square it to get the price. If multiple large operations land in the same block, earlier ones shift the price for later ones.
Debugging Example
1. Query Swap.AlphaSqrtPrice(netuid) to get the sqrt price 2. Square it to get the current RAO-per-Alpha rate 3. Compare to the limit_price you submitted 4. If the current rate exceeds your limit, that's why it failed 5. Resubmit with a wider limit or wait for the price to return
Prevention Tips
- Always query AlphaSqrtPrice just before submitting and add a 1-3% buffer
- Use allow_partial=true for large stakes to get partial fills instead of total failure
- For time-sensitive operations, set a wider tolerance to account for block-to-block movement
From Chain Metadata
The operation would exceed the price limit.
What This Means
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.
Common Causes
- Alpha price moved between extrinsic submission and block inclusion
- limit_price set too tight (not enough buffer for normal price movement)
- Large swap relative to available liquidity caused price impact beyond your limit
- Multiple swaps in the same block moved the price before yours executed
How to Fix
- Query Swap.AlphaSqrtPrice for the subnet — square the value to get the current RAO-per-Alpha rate, then set your limit_price with a buffer above (for add_stake) or below (for remove_stake)
- Widen your limit_price to allow more slippage (e.g., current_price * 1.02 for 2% tolerance on add_stake)
- Split large operations into smaller swaps to reduce price impact
- Set limit_price=0 to disable the protection entirely (no slippage guard)
- Set allow_partial=true to accept a partial fill at the limit price instead of all-or-nothing failure
Storage to Check
Runtime Info
- Pallet Index
- 28
- Error Index
- 3
- Error Code
- 28.3
- Runtime Version
- v393