NotEnoughBalanceToPaySwapColdKey

Error Re-added v156 → v161, v162 → v202, v205 → v212, v216 → v216, v217 → v219, v233 → v315, v320 → v326, v334 → current 7.58

Insufficient balance to pay the coldkey swap fee.

Encountered by: walletsstakersdevelopers

Why This Error Exists

Coldkey swaps have a fee to discourage spam and cover the chain's computational cost. The fee is significant to prevent attackers from repeatedly scheduling swaps. It's burned or transferred to the treasury. Make sure your coldkey has enough free balance to cover this fee before scheduling a swap.

Deep Dive

KeySwapCost (or ColdkeySwapScheduleCost) is the fee in RAO. This is deducted from your free balance when you schedule the swap. If free_balance < fee, the transaction fails. Note this is separate from the standard transaction fee - you need enough for both the swap cost AND the tx fee.

Debugging Example

You call schedule_swap_coldkey(...). Error: NotEnoughBalanceToPaySwapColdKey. Query System.Account(your_coldkey).free - returns 5 TAO. Swap cost is 10 TAO. You need 10 TAO for the swap fee plus ~0.0001 TAO for tx fee. Solution: Transfer 5+ TAO to your coldkey first.

Prevention Tips

  • Query the swap cost constant before scheduling
  • Ensure free_balance > swap_cost + 0.1 TAO (buffer for tx fees)
  • Keep adequate TAO in your coldkey for administrative operations

From Chain Metadata

The coldkey balance is not enough to pay for the swap

What This Means

Insufficient balance to pay the coldkey swap fee.

Common Causes

  • Coldkey swap requires a fee payment
  • Balance too low after accounting for fee

How to Fix

  • Ensure sufficient free balance for the swap fee
  • Check KeySwapCost constant for the fee amount

Storage to Check

System.Account (removed)SubtensorModule.ColdkeySwapScheduleCost (removed)

Thrown By

Version History

v156 block 3,321,841 Added
v162 block 3,372,565 Re-added
v205 block 4,209,446 Re-added
v216 block 4,510,996 Re-added
v217 block 4,590,522 Re-added
v233 block 4,920,350 Re-added
v320 block 6,523,566 Re-added
v334 block 6,811,690 Re-added Current

Runtime Info

Pallet Index
7
Error Index
58
Error Code
7.58
Runtime Version
v393