SlippageTooHigh
Error Re-added v233 → v315, v320 → v326, v334 → v377, v385 → current 7.83The price impact of your trade exceeds the allowed slippage.
Why This Error Exists
Dynamic TAO uses automated market makers (AMMs) for alpha/TAO conversion. Large trades relative to pool size cause price slippage - you get fewer tokens than expected. The slippage check protects you from unexpectedly bad execution prices due to low liquidity or front-running.
Deep Dive
Slippage is the difference between expected and actual execution price. It's calculated from the AMM formula based on SubnetAlphaIn, SubnetTAO, and trade size. Your limit_price parameter sets maximum acceptable price. If the execution price would exceed limit_price, this error fires. SubnetMovingPrice shows the current weighted average price for reference.
Debugging Example
You call swap_tao_for_alpha(netuid=5, tao_amount=1000, limit_price=0.5). Error: SlippageTooHigh. Query SubnetMovingPrice(5) - returns 0.45. Query SubnetAlphaIn(5) and SubnetTAO(5) to check pool depth. Your 1000 TAO trade would push the price above 0.5. Solutions: 1) Increase limit_price to 0.55, 2) Reduce trade to 500 TAO, 3) Set allow_partial=true to get partial fill at limit price.
Prevention Tips
- Query pool state before large trades to estimate slippage
- Use limit_price slightly above market for protection, not exact match
- Split large trades across multiple transactions for better execution
From Chain Metadata
Slippage is too high for the transaction.
What This Means
The price impact of your trade exceeds the allowed slippage.
Common Causes
- Trade is too large for current liquidity
- Price moved since you calculated
How to Fix
- Use a higher limit_price if using limit orders
- Reduce trade size to lower slippage
- Set allow_partial=true for partial fills
Storage to Check
Thrown By
Version History
Runtime Info
- Pallet Index
- 7
- Error Index
- 83
- Error Code
- 7.83
- Runtime Version
- v393