# dispute-coldkey-swap (/docs/tx/dispute-coldkey-swap)

The recovery path for a compromised coldkey: if a swap was announced on
your coldkey that you did not initiate, disputing freezes the account
entirely — the chain rejects ALL signed extrinsics from it, including
executing the swap, clearing the announcement, or disputing again — until
root clears the state via `reset_coldkey_swap`. Sign it from the
affected coldkey itself. It does not cancel the announcement or move
anything — it locks the situation so an attacker cannot complete the
takeover while governance investigates; only root can unfreeze. Use
`clear_coldkey_swap_announcement` instead to withdraw an announcement
you made yourself.

| Signer    | Pallet          | Wraps                                  |
| --------- | --------------- | -------------------------------------- |
| `coldkey` | SubtensorModule | `SubtensorModule.dispute_coldkey_swap` |

## Parameters [#parameters]

This operation takes no parameters.

Address parameters (`--hotkey`, `--coldkey`, `--dest`, ...) accept a raw ss58
address, an address-book or proxy-book name, or a local wallet/hotkey name.

## CLI [#cli]

Preview with `--dry-run` (shows fee, effects, and policy result without
submitting), then submit:

```bash
btcli tx dispute-coldkey-swap --dry-run
btcli tx dispute-coldkey-swap -w my_coldkey
```

## Python [#python]

```python
import bittensor as sub
from bittensor.wallet import Wallet

wallet = Wallet(name="my_coldkey", hotkey="my_hotkey")
intent = sub.DisputeColdkeySwap()

async with sub.Client("finney") as client:
    plan = await client.plan(intent, wallet)   # fee, effects, policy — no submission
    result = await client.execute(intent, wallet)
    if not result.success:
        print(result.error.code, result.error.remediation)
```

Or build it by op name, as an agent would:

```python
await client.execute_tool("dispute_coldkey_swap", {...}, wallet)
```
