bittensor-cli 9.8.0__tar.gz → 9.8.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. {bittensor_cli-9.8.0 → bittensor_cli-9.8.1}/PKG-INFO +1 -1
  2. {bittensor_cli-9.8.0 → bittensor_cli-9.8.1}/bittensor_cli/cli.py +1 -1
  3. {bittensor_cli-9.8.0 → bittensor_cli-9.8.1}/bittensor_cli/src/bittensor/subtensor_interface.py +78 -11
  4. {bittensor_cli-9.8.0 → bittensor_cli-9.8.1}/bittensor_cli/src/commands/stake/add.py +32 -20
  5. {bittensor_cli-9.8.0 → bittensor_cli-9.8.1}/bittensor_cli/src/commands/stake/list.py +35 -48
  6. {bittensor_cli-9.8.0 → bittensor_cli-9.8.1}/bittensor_cli/src/commands/stake/move.py +18 -44
  7. {bittensor_cli-9.8.0 → bittensor_cli-9.8.1}/bittensor_cli/src/commands/stake/remove.py +30 -92
  8. {bittensor_cli-9.8.0 → bittensor_cli-9.8.1}/bittensor_cli/src/commands/sudo.py +1 -1
  9. {bittensor_cli-9.8.0 → bittensor_cli-9.8.1}/bittensor_cli/src/commands/wallets.py +1 -25
  10. {bittensor_cli-9.8.0 → bittensor_cli-9.8.1}/bittensor_cli.egg-info/PKG-INFO +1 -1
  11. {bittensor_cli-9.8.0 → bittensor_cli-9.8.1}/pyproject.toml +1 -1
  12. {bittensor_cli-9.8.0 → bittensor_cli-9.8.1}/MANIFEST.in +0 -0
  13. {bittensor_cli-9.8.0 → bittensor_cli-9.8.1}/README.md +0 -0
  14. {bittensor_cli-9.8.0 → bittensor_cli-9.8.1}/bittensor_cli/__init__.py +0 -0
  15. {bittensor_cli-9.8.0 → bittensor_cli-9.8.1}/bittensor_cli/doc_generation_helper.py +0 -0
  16. {bittensor_cli-9.8.0 → bittensor_cli-9.8.1}/bittensor_cli/src/__init__.py +0 -0
  17. {bittensor_cli-9.8.0 → bittensor_cli-9.8.1}/bittensor_cli/src/bittensor/__init__.py +0 -0
  18. {bittensor_cli-9.8.0 → bittensor_cli-9.8.1}/bittensor_cli/src/bittensor/balances.py +0 -0
  19. {bittensor_cli-9.8.0 → bittensor_cli-9.8.1}/bittensor_cli/src/bittensor/chain_data.py +0 -0
  20. {bittensor_cli-9.8.0 → bittensor_cli-9.8.1}/bittensor_cli/src/bittensor/extrinsics/__init__.py +0 -0
  21. {bittensor_cli-9.8.0 → bittensor_cli-9.8.1}/bittensor_cli/src/bittensor/extrinsics/registration.py +0 -0
  22. {bittensor_cli-9.8.0 → bittensor_cli-9.8.1}/bittensor_cli/src/bittensor/extrinsics/root.py +0 -0
  23. {bittensor_cli-9.8.0 → bittensor_cli-9.8.1}/bittensor_cli/src/bittensor/extrinsics/transfer.py +0 -0
  24. {bittensor_cli-9.8.0 → bittensor_cli-9.8.1}/bittensor_cli/src/bittensor/minigraph.py +0 -0
  25. {bittensor_cli-9.8.0 → bittensor_cli-9.8.1}/bittensor_cli/src/bittensor/networking.py +0 -0
  26. {bittensor_cli-9.8.0 → bittensor_cli-9.8.1}/bittensor_cli/src/bittensor/templates/main-filters.j2 +0 -0
  27. {bittensor_cli-9.8.0 → bittensor_cli-9.8.1}/bittensor_cli/src/bittensor/templates/main-header.j2 +0 -0
  28. {bittensor_cli-9.8.0 → bittensor_cli-9.8.1}/bittensor_cli/src/bittensor/templates/neuron-details.j2 +0 -0
  29. {bittensor_cli-9.8.0 → bittensor_cli-9.8.1}/bittensor_cli/src/bittensor/templates/price-multi.j2 +0 -0
  30. {bittensor_cli-9.8.0 → bittensor_cli-9.8.1}/bittensor_cli/src/bittensor/templates/price-single.j2 +0 -0
  31. {bittensor_cli-9.8.0 → bittensor_cli-9.8.1}/bittensor_cli/src/bittensor/templates/subnet-details-header.j2 +0 -0
  32. {bittensor_cli-9.8.0 → bittensor_cli-9.8.1}/bittensor_cli/src/bittensor/templates/subnet-details.j2 +0 -0
  33. {bittensor_cli-9.8.0 → bittensor_cli-9.8.1}/bittensor_cli/src/bittensor/templates/subnet-metrics.j2 +0 -0
  34. {bittensor_cli-9.8.0 → bittensor_cli-9.8.1}/bittensor_cli/src/bittensor/templates/subnets-table.j2 +0 -0
  35. {bittensor_cli-9.8.0 → bittensor_cli-9.8.1}/bittensor_cli/src/bittensor/templates/table.j2 +0 -0
  36. {bittensor_cli-9.8.0 → bittensor_cli-9.8.1}/bittensor_cli/src/bittensor/templates/view.css +0 -0
  37. {bittensor_cli-9.8.0 → bittensor_cli-9.8.1}/bittensor_cli/src/bittensor/templates/view.j2 +0 -0
  38. {bittensor_cli-9.8.0 → bittensor_cli-9.8.1}/bittensor_cli/src/bittensor/templates/view.js +0 -0
  39. {bittensor_cli-9.8.0 → bittensor_cli-9.8.1}/bittensor_cli/src/bittensor/utils.py +0 -0
  40. {bittensor_cli-9.8.0 → bittensor_cli-9.8.1}/bittensor_cli/src/commands/__init__.py +0 -0
  41. {bittensor_cli-9.8.0 → bittensor_cli-9.8.1}/bittensor_cli/src/commands/liquidity/__init__.py +0 -0
  42. {bittensor_cli-9.8.0 → bittensor_cli-9.8.1}/bittensor_cli/src/commands/liquidity/liquidity.py +0 -0
  43. {bittensor_cli-9.8.0 → bittensor_cli-9.8.1}/bittensor_cli/src/commands/liquidity/utils.py +0 -0
  44. {bittensor_cli-9.8.0 → bittensor_cli-9.8.1}/bittensor_cli/src/commands/stake/__init__.py +0 -0
  45. {bittensor_cli-9.8.0 → bittensor_cli-9.8.1}/bittensor_cli/src/commands/stake/children_hotkeys.py +0 -0
  46. {bittensor_cli-9.8.0 → bittensor_cli-9.8.1}/bittensor_cli/src/commands/subnets/__init__.py +0 -0
  47. {bittensor_cli-9.8.0 → bittensor_cli-9.8.1}/bittensor_cli/src/commands/subnets/price.py +0 -0
  48. {bittensor_cli-9.8.0 → bittensor_cli-9.8.1}/bittensor_cli/src/commands/subnets/subnets.py +0 -0
  49. {bittensor_cli-9.8.0 → bittensor_cli-9.8.1}/bittensor_cli/src/commands/view.py +0 -0
  50. {bittensor_cli-9.8.0 → bittensor_cli-9.8.1}/bittensor_cli/src/commands/weights.py +0 -0
  51. {bittensor_cli-9.8.0 → bittensor_cli-9.8.1}/bittensor_cli/version.py +0 -0
  52. {bittensor_cli-9.8.0 → bittensor_cli-9.8.1}/bittensor_cli.egg-info/SOURCES.txt +0 -0
  53. {bittensor_cli-9.8.0 → bittensor_cli-9.8.1}/bittensor_cli.egg-info/dependency_links.txt +0 -0
  54. {bittensor_cli-9.8.0 → bittensor_cli-9.8.1}/bittensor_cli.egg-info/entry_points.txt +0 -0
  55. {bittensor_cli-9.8.0 → bittensor_cli-9.8.1}/bittensor_cli.egg-info/requires.txt +0 -0
  56. {bittensor_cli-9.8.0 → bittensor_cli-9.8.1}/bittensor_cli.egg-info/top_level.txt +0 -0
  57. {bittensor_cli-9.8.0 → bittensor_cli-9.8.1}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: bittensor-cli
3
- Version: 9.8.0
3
+ Version: 9.8.1
4
4
  Summary: Bittensor CLI
5
5
  Author: bittensor.com
6
6
  Project-URL: homepage, https://github.com/opentensor/btcli
@@ -3352,7 +3352,7 @@ class CLIManager:
3352
3352
  )
3353
3353
  else:
3354
3354
  netuid_ = get_optional_netuid(None, all_netuids)
3355
- netuids = [netuid_] if netuid_ else None
3355
+ netuids = [netuid_] if netuid_ is not None else None
3356
3356
  if netuids:
3357
3357
  for netuid_ in netuids:
3358
3358
  # ensure no negative netuids make it into our list
@@ -1423,23 +1423,40 @@ class SubtensorInterface:
1423
1423
  return stake_info_map if stake_info_map else None
1424
1424
 
1425
1425
  async def all_subnets(self, block_hash: Optional[str] = None) -> list[DynamicInfo]:
1426
- result = await self.query_runtime_api(
1427
- "SubnetInfoRuntimeApi",
1428
- "get_all_dynamic_info",
1429
- block_hash=block_hash,
1426
+ result, prices = await asyncio.gather(
1427
+ self.query_runtime_api(
1428
+ "SubnetInfoRuntimeApi",
1429
+ "get_all_dynamic_info",
1430
+ block_hash=block_hash,
1431
+ ),
1432
+ self.get_subnet_prices(block_hash=block_hash, page_size=129),
1430
1433
  )
1431
- return DynamicInfo.list_from_any(result)
1434
+ sns: list[DynamicInfo] = DynamicInfo.list_from_any(result)
1435
+ for sn in sns:
1436
+ if sn.netuid == 0:
1437
+ sn.price = Balance.from_tao(1.0)
1438
+ else:
1439
+ try:
1440
+ sn.price = prices[sn.netuid]
1441
+ except KeyError:
1442
+ sn.price = sn.tao_in / sn.alpha_in
1443
+ return sns
1432
1444
 
1433
1445
  async def subnet(
1434
1446
  self, netuid: int, block_hash: Optional[str] = None
1435
1447
  ) -> "DynamicInfo":
1436
- result = await self.query_runtime_api(
1437
- "SubnetInfoRuntimeApi",
1438
- "get_dynamic_info",
1439
- params=[netuid],
1440
- block_hash=block_hash,
1448
+ result, price = await asyncio.gather(
1449
+ self.query_runtime_api(
1450
+ "SubnetInfoRuntimeApi",
1451
+ "get_dynamic_info",
1452
+ params=[netuid],
1453
+ block_hash=block_hash,
1454
+ ),
1455
+ self.get_subnet_price(netuid=netuid, block_hash=block_hash),
1441
1456
  )
1442
- return DynamicInfo.from_any(result)
1457
+ subnet_ = DynamicInfo.from_any(result)
1458
+ subnet_.price = price
1459
+ return subnet_
1443
1460
 
1444
1461
  async def get_owned_hotkeys(
1445
1462
  self,
@@ -1581,3 +1598,53 @@ class SubtensorInterface:
1581
1598
  )
1582
1599
 
1583
1600
  return result
1601
+
1602
+ async def get_subnet_price(
1603
+ self,
1604
+ netuid: int = None,
1605
+ block_hash: Optional[str] = None,
1606
+ ) -> Balance:
1607
+ """
1608
+ Gets the current Alpha price in TAO for a specific subnet.
1609
+
1610
+ :param netuid: The unique identifier of the subnet.
1611
+ :param block_hash: The hash of the block to retrieve the price from.
1612
+
1613
+ :return: The current Alpha price in TAO units for the specified subnet.
1614
+ """
1615
+ current_sqrt_price = await self.query(
1616
+ module="Swap",
1617
+ storage_function="AlphaSqrtPrice",
1618
+ params=[netuid],
1619
+ block_hash=block_hash,
1620
+ )
1621
+
1622
+ current_sqrt_price = fixed_to_float(current_sqrt_price)
1623
+ current_price = current_sqrt_price * current_sqrt_price
1624
+ return Balance.from_rao(int(current_price * 1e9))
1625
+
1626
+ async def get_subnet_prices(
1627
+ self, block_hash: Optional[str] = None, page_size: int = 100
1628
+ ) -> dict[int, Balance]:
1629
+ """
1630
+ Gets the current Alpha prices in TAO for all subnets.
1631
+
1632
+ :param block_hash: The hash of the block to retrieve prices from.
1633
+ :param page_size: The page size for batch queries (default: 100).
1634
+
1635
+ :return: A dictionary mapping netuid to the current Alpha price in TAO units.
1636
+ """
1637
+ query = await self.substrate.query_map(
1638
+ module="Swap",
1639
+ storage_function="AlphaSqrtPrice",
1640
+ page_size=page_size,
1641
+ block_hash=block_hash,
1642
+ )
1643
+
1644
+ map_ = {}
1645
+ async for netuid_, current_sqrt_price in query:
1646
+ current_sqrt_price_ = fixed_to_float(current_sqrt_price.value)
1647
+ current_price = current_sqrt_price_**2
1648
+ map_[netuid_] = Balance.from_rao(int(current_price * 1e9))
1649
+
1650
+ return map_
@@ -245,12 +245,12 @@ async def stake_add(
245
245
  # Get subnet data and stake information for coldkey
246
246
  chain_head = await subtensor.substrate.get_chain_head()
247
247
  _all_subnets, _stake_info, current_wallet_balance = await asyncio.gather(
248
- subtensor.all_subnets(),
248
+ subtensor.all_subnets(block_hash=chain_head),
249
249
  subtensor.get_stake_for_coldkey(
250
250
  coldkey_ss58=wallet.coldkeypub.ss58_address,
251
251
  block_hash=chain_head,
252
252
  ),
253
- subtensor.get_balance(wallet.coldkeypub.ss58_address),
253
+ subtensor.get_balance(wallet.coldkeypub.ss58_address, block_hash=chain_head),
254
254
  )
255
255
  all_subnets = {di.netuid: di for di in _all_subnets}
256
256
 
@@ -307,6 +307,7 @@ async def stake_add(
307
307
  return False
308
308
  remaining_wallet_balance -= amount_to_stake
309
309
 
310
+ # TODO this should be asyncio gathered before the for loop
310
311
  stake_fee = await subtensor.get_stake_fee(
311
312
  origin_hotkey_ss58=None,
312
313
  origin_netuid=None,
@@ -318,14 +319,20 @@ async def stake_add(
318
319
  )
319
320
 
320
321
  # Calculate slippage
321
- try:
322
- received_amount, slippage_pct, slippage_pct_float, rate = (
323
- _calculate_slippage(subnet_info, amount_to_stake, stake_fee)
324
- )
325
- except ValueError:
326
- return False
327
-
328
- max_slippage = max(slippage_pct_float, max_slippage)
322
+ # TODO: Update for V3, slippage calculation is significantly different in v3
323
+ # try:
324
+ # received_amount, slippage_pct, slippage_pct_float, rate = (
325
+ # _calculate_slippage(subnet_info, amount_to_stake, stake_fee)
326
+ # )
327
+ # except ValueError:
328
+ # return False
329
+ #
330
+ # max_slippage = max(slippage_pct_float, max_slippage)
331
+
332
+ # Temporary workaround - calculations without slippage
333
+ current_price_float = float(subnet_info.price.tao)
334
+ rate = 1.0 / current_price_float
335
+ received_amount = rate * amount_to_stake
329
336
 
330
337
  # Add rows for the table
331
338
  base_row = [
@@ -336,19 +343,19 @@ async def stake_add(
336
343
  + f" {Balance.get_unit(netuid)}/{Balance.get_unit(0)} ", # rate
337
344
  str(received_amount.set_unit(netuid)), # received
338
345
  str(stake_fee), # fee
339
- str(slippage_pct), # slippage
346
+ # str(slippage_pct), # slippage
340
347
  ]
341
348
 
342
349
  # If we are staking safe, add price tolerance
343
350
  if safe_staking:
344
351
  if subnet_info.is_dynamic:
345
- rate = amount_to_stake.rao / received_amount.rao
346
- _rate_with_tolerance = rate * (
347
- 1 + rate_tolerance
352
+ price_with_tolerance = current_price_float * (1 + rate_tolerance)
353
+ _rate_with_tolerance = (
354
+ 1.0 / price_with_tolerance
348
355
  ) # Rate only for display
349
356
  rate_with_tolerance = f"{_rate_with_tolerance:.4f}"
350
357
  price_with_tolerance = Balance.from_tao(
351
- _rate_with_tolerance
358
+ price_with_tolerance
352
359
  ).rao # Actual price to pass to extrinsic
353
360
  else:
354
361
  rate_with_tolerance = "1"
@@ -581,9 +588,10 @@ def _define_stake_table(
581
588
  justify="center",
582
589
  style=COLOR_PALETTE["STAKE"]["STAKE_AMOUNT"],
583
590
  )
584
- table.add_column(
585
- "Slippage", justify="center", style=COLOR_PALETTE["STAKE"]["SLIPPAGE_PERCENT"]
586
- )
591
+ # TODO: Uncomment when slippage is reimplemented for v3
592
+ # table.add_column(
593
+ # "Slippage", justify="center", style=COLOR_PALETTE["STAKE"]["SLIPPAGE_PERCENT"]
594
+ # )
587
595
 
588
596
  if safe_staking:
589
597
  table.add_column(
@@ -628,8 +636,8 @@ The columns are as follows:
628
636
  - [bold white]Hotkey[/bold white]: The ss58 address of the hotkey you are staking to.
629
637
  - [bold white]Amount[/bold white]: The TAO you are staking into this subnet onto this hotkey.
630
638
  - [bold white]Rate[/bold white]: The rate of exchange between your TAO and the subnet's stake.
631
- - [bold white]Received[/bold white]: The amount of stake you will receive on this subnet after slippage.
632
- - [bold white]Slippage[/bold white]: The slippage percentage of the stake operation. (0% if the subnet is not dynamic i.e. root)."""
639
+ - [bold white]Received[/bold white]: The amount of stake you will receive on this subnet after slippage."""
640
+ # - [bold white]Slippage[/bold white]: The slippage percentage of the stake operation. (0% if the subnet is not dynamic i.e. root)."""
633
641
 
634
642
  safe_staking_description = """
635
643
  - [bold white]Rate Tolerance[/bold white]: Maximum acceptable alpha rate. If the rate exceeds this tolerance, the transaction will be limited or rejected.
@@ -654,6 +662,9 @@ def _calculate_slippage(
654
662
  - slippage_str: Formatted slippage percentage string
655
663
  - slippage_float: Raw slippage percentage value
656
664
  - rate: Exchange rate string
665
+
666
+ TODO: Update to v3. This method only works for protocol-liquidity-only
667
+ mode (user liquidity disabled)
657
668
  """
658
669
  amount_after_fee = amount - stake_fee
659
670
 
@@ -670,6 +681,7 @@ def _calculate_slippage(
670
681
  slippage_str = f"{slippage_pct_float:.4f} %"
671
682
  rate = f"{(1 / subnet_info.price.tao or 1):.4f}"
672
683
  else:
684
+ # TODO: Fix this. Slippage is always zero for static networks.
673
685
  slippage_pct_float = (
674
686
  100 * float(stake_fee.tao) / float(amount.tao) if amount.tao != 0 else 0
675
687
  )
@@ -111,15 +111,15 @@ async def stake_list(
111
111
  style=COLOR_PALETTE["POOLS"]["RATE"],
112
112
  justify="center",
113
113
  )
114
- defined_table.add_column(
115
- f"[white]Swap ({Balance.get_unit(1)} -> {Balance.unit})",
116
- footer_style="overline white",
117
- style=COLOR_PALETTE["STAKE"]["STAKE_SWAP"],
118
- justify="right",
119
- footer=f"τ {millify_tao(total_swapped_tao_value_.tao)}"
120
- if not verbose
121
- else f"{total_swapped_tao_value_}",
122
- )
114
+ # defined_table.add_column(
115
+ # f"[white]Swap ({Balance.get_unit(1)} -> {Balance.unit})",
116
+ # footer_style="overline white",
117
+ # style=COLOR_PALETTE["STAKE"]["STAKE_SWAP"],
118
+ # justify="right",
119
+ # footer=f"τ {millify_tao(total_swapped_tao_value_.tao)}"
120
+ # if not verbose
121
+ # else f"{total_swapped_tao_value_}",
122
+ # )
123
123
  defined_table.add_column(
124
124
  "[white]Registered",
125
125
  style=COLOR_PALETTE["STAKE"]["STAKE_ALPHA"],
@@ -168,25 +168,17 @@ async def stake_list(
168
168
  tao_value_ = pool.alpha_to_tao(alpha_value)
169
169
  total_tao_value_ += tao_value_
170
170
 
171
- # Swapped TAO value and slippage cell
172
- swapped_tao_value_, _, slippage_percentage_ = (
173
- pool.alpha_to_tao_with_slippage(substake_.stake)
174
- )
175
- total_swapped_tao_value_ += swapped_tao_value_
176
-
177
- # Slippage percentage cell
178
- if pool.is_dynamic:
179
- slippage_percentage = f"[{COLOR_PALETTE['STAKE']['SLIPPAGE_PERCENT']}]{slippage_percentage_:.3f}%[/{COLOR_PALETTE['STAKE']['SLIPPAGE_PERCENT']}]"
180
- else:
181
- slippage_percentage = f"[{COLOR_PALETTE['STAKE']['SLIPPAGE_PERCENT']}]0.000%[/{COLOR_PALETTE['STAKE']['SLIPPAGE_PERCENT']}]"
171
+ # TAO value cell
172
+ tao_value_ = pool.alpha_to_tao(substake_.stake)
173
+ total_swapped_tao_value_ += tao_value_
182
174
 
183
175
  if netuid == 0:
184
- swap_value = f"[{COLOR_PALETTE['STAKE']['NOT_REGISTERED']}]N/A[/{COLOR_PALETTE['STAKE']['NOT_REGISTERED']}] ({slippage_percentage})"
176
+ swap_value = f"[{COLOR_PALETTE['STAKE']['NOT_REGISTERED']}]N/A[/{COLOR_PALETTE['STAKE']['NOT_REGISTERED']}]"
185
177
  else:
186
178
  swap_value = (
187
- f"τ {millify_tao(swapped_tao_value_.tao)} ({slippage_percentage})"
179
+ f"τ {millify_tao(tao_value_.tao)}"
188
180
  if not verbose
189
- else f"{swapped_tao_value_} ({slippage_percentage})"
181
+ else f"{tao_value_}"
190
182
  )
191
183
 
192
184
  # Per block emission cell
@@ -214,7 +206,7 @@ async def stake_list(
214
206
  else f"{symbol} {stake_value}", # Stake (a)
215
207
  f"{pool.price.tao:.4f} τ/{symbol}", # Rate (t/a)
216
208
  # f"τ {millify_tao(tao_ownership.tao)}" if not verbose else f"{tao_ownership}", # TAO equiv
217
- swap_value, # Swap(α) -> τ
209
+ # swap_value, # Swap(α) -> τ
218
210
  "YES"
219
211
  if substake_.is_registered
220
212
  else f"[{COLOR_PALETTE['STAKE']['NOT_REGISTERED']}]NO", # Registered
@@ -232,7 +224,7 @@ async def stake_list(
232
224
  "value": tao_value_.tao,
233
225
  "stake_value": substake_.stake.tao,
234
226
  "rate": pool.price.tao,
235
- "swap_value": swap_value,
227
+ # "swap_value": swap_value,
236
228
  "registered": True if substake_.is_registered else False,
237
229
  "emission": {
238
230
  "alpha": per_block_emission,
@@ -317,9 +309,7 @@ async def stake_list(
317
309
  alpha_value = Balance.from_rao(int(substake_.stake.rao)).set_unit(netuid)
318
310
  tao_value_ = pool.alpha_to_tao(alpha_value)
319
311
  total_tao_value_ += tao_value_
320
- swapped_tao_value_, slippage, slippage_pct = (
321
- pool.alpha_to_tao_with_slippage(substake_.stake)
322
- )
312
+ swapped_tao_value_ = pool.alpha_to_tao(substake_.stake)
323
313
  total_swapped_tao_value_ += swapped_tao_value_
324
314
 
325
315
  # Store current values for future delta tracking
@@ -364,19 +354,16 @@ async def stake_list(
364
354
  )
365
355
 
366
356
  if netuid != 0:
367
- swap_cell = (
368
- format_cell(
369
- swapped_tao_value_.tao,
370
- prev.get("swapped_value"),
371
- unit="τ",
372
- unit_first_=True,
373
- precision=4,
374
- millify=True if not verbose else False,
375
- )
376
- + f" ({slippage_pct:.2f}%)"
357
+ swap_cell = format_cell(
358
+ swapped_tao_value_.tao,
359
+ prev.get("swapped_value"),
360
+ unit="τ",
361
+ unit_first_=True,
362
+ precision=4,
363
+ millify=True if not verbose else False,
377
364
  )
378
365
  else:
379
- swap_cell = f"[{COLOR_PALETTE['STAKE']['NOT_REGISTERED']}]N/A[/{COLOR_PALETTE['STAKE']['NOT_REGISTERED']}] ({slippage_pct}%)"
366
+ swap_cell = f"[{COLOR_PALETTE['STAKE']['NOT_REGISTERED']}]N/A[/{COLOR_PALETTE['STAKE']['NOT_REGISTERED']}]"
380
367
 
381
368
  emission_value = substake_.emission.tao / (pool.tempo or 1)
382
369
  emission_cell = format_cell(
@@ -408,7 +395,7 @@ async def stake_list(
408
395
  exchange_cell, # Exchange value
409
396
  stake_cell, # Stake amount
410
397
  rate_cell, # Rate
411
- swap_cell, # Swap value with slippage
398
+ # swap_cell, # Swap value
412
399
  "YES"
413
400
  if substake_.is_registered
414
401
  else f"[{COLOR_PALETTE['STAKE']['NOT_REGISTERED']}]NO", # Registration status
@@ -591,12 +578,12 @@ async def stake_list(
591
578
  f"Wallet:\n"
592
579
  f" Coldkey SS58: [{COLOR_PALETTE['GENERAL']['COLDKEY']}]{coldkey_address}[/{COLOR_PALETTE['GENERAL']['COLDKEY']}]\n"
593
580
  f" Free Balance: [{COLOR_PALETTE['GENERAL']['BALANCE']}]{balance}[/{COLOR_PALETTE['GENERAL']['BALANCE']}]\n"
594
- f" Total TAO Value ({Balance.unit}): [{COLOR_PALETTE['GENERAL']['BALANCE']}]{total_tao_value}[/{COLOR_PALETTE['GENERAL']['BALANCE']}]\n"
595
- f" Total TAO Swapped Value ({Balance.unit}): [{COLOR_PALETTE['GENERAL']['BALANCE']}]{total_swapped_tao_value}[/{COLOR_PALETTE['GENERAL']['BALANCE']}]"
581
+ f" Total TAO Value ({Balance.unit}): [{COLOR_PALETTE['GENERAL']['BALANCE']}]{total_tao_value}[/{COLOR_PALETTE['GENERAL']['BALANCE']}]"
582
+ # f"\n Total TAO Swapped Value ({Balance.unit}): [{COLOR_PALETTE['GENERAL']['BALANCE']}]{total_swapped_tao_value}[/{COLOR_PALETTE['GENERAL']['BALANCE']}]"
596
583
  )
597
584
  dict_output["free_balance"] = balance.tao
598
585
  dict_output["total_tao_value"] = all_hks_tao_value.tao
599
- dict_output["total_swapped_tao_value"] = all_hks_swapped_tao_value.tao
586
+ # dict_output["total_swapped_tao_value"] = all_hks_swapped_tao_value.tao
600
587
  if json_output:
601
588
  json_console.print(json.dumps(dict_output))
602
589
  if not sub_stakes:
@@ -658,12 +645,12 @@ async def stake_list(
658
645
  ),
659
646
  (
660
647
  "[bold tan]Exchange Value (α x τ/α)[/bold tan]",
661
- "This is the potential τ you will receive, without considering slippage, if you unstake from this hotkey now on this subnet. See Swap(α → τ) column description. Note: The TAO Equiv(τ_in x α/α_out) indicates validator stake weight while this Exchange Value shows τ you will receive if you unstake now. This can change every block. \nFor more, see [blue]https://docs.bittensor.com/dynamic-tao/dtao-guide#exchange-value-%CE%B1-x-%CF%84%CE%B1[/blue].",
662
- ),
663
- (
664
- "[bold tan]Swap (α → τ)[/bold tan]",
665
- "This is the actual τ you will receive, after factoring in the slippage charge, if you unstake from this hotkey now on this subnet. The slippage is calculated as 1 - (Swap(α → τ)/Exchange Value(α x τ/α)), and is displayed in brackets. This can change every block. \nFor more, see [blue]https://docs.bittensor.com/dynamic-tao/dtao-guide#swap-%CE%B1--%CF%84[/blue].",
648
+ "This is the potential τ you will receive if you unstake from this hotkey now on this subnet. Note: The TAO Equiv(τ_in x α/α_out) indicates validator stake weight while this Exchange Value shows τ you will receive if you unstake now. This can change every block. \nFor more, see [blue]https://docs.bittensor.com/dynamic-tao/dtao-guide#exchange-value-%CE%B1-x-%CF%84%CE%B1[/blue].",
666
649
  ),
650
+ # (
651
+ # "[bold tan]Swap (α → τ)[/bold tan]",
652
+ # "This is the τ you will receive if you unstake from this hotkey now on this subnet. This can change every block. \nFor more, see [blue]https://docs.bittensor.com/dynamic-tao/dtao-guide#swap-%CE%B1--%CF%84[/blue].",
653
+ # ),
667
654
  (
668
655
  "[bold tan]Registered[/bold tan]",
669
656
  "Indicates if the hotkey is registered in this subnet or not. \nFor more, see [blue]https://docs.bittensor.com/learn/anatomy-of-incentive-mechanism#tempo[/blue].",
@@ -33,8 +33,8 @@ async def display_stake_movement_cross_subnets(
33
33
  destination_hotkey: str,
34
34
  amount_to_move: Balance,
35
35
  stake_fee: Balance,
36
- ) -> tuple[Balance, float, str, str]:
37
- """Calculate and display slippage information"""
36
+ ) -> tuple[Balance, str]:
37
+ """Calculate and display stake movement information"""
38
38
 
39
39
  if origin_netuid == destination_netuid:
40
40
  subnet = await subtensor.subnet(origin_netuid)
@@ -46,45 +46,32 @@ async def display_stake_movement_cross_subnets(
46
46
  raise ValueError
47
47
 
48
48
  received_amount = subnet.tao_to_alpha(received_amount_tao)
49
- slippage_pct_float = (
50
- 100 * float(stake_fee) / float(stake_fee + received_amount_tao)
51
- if received_amount_tao != 0
52
- else 0
53
- )
54
- slippage_pct = f"{slippage_pct_float:.4f}%"
55
- price = Balance.from_tao(1).set_unit(origin_netuid)
49
+ price = subnet.price.tao
56
50
  price_str = (
57
- str(float(price.tao))
58
- + f"{Balance.get_unit(origin_netuid)}/{Balance.get_unit(origin_netuid)}"
51
+ str(float(price))
52
+ + f"({Balance.get_unit(0)}/{Balance.get_unit(origin_netuid)})"
59
53
  )
60
54
  else:
61
55
  dynamic_origin, dynamic_destination = await asyncio.gather(
62
56
  subtensor.subnet(origin_netuid),
63
57
  subtensor.subnet(destination_netuid),
64
58
  )
65
- price = (
66
- float(dynamic_origin.price) * 1 / (float(dynamic_destination.price) or 1)
67
- )
68
- received_amount_tao, _, _ = dynamic_origin.alpha_to_tao_with_slippage(
69
- amount_to_move
70
- )
59
+ price_origin = dynamic_origin.price.tao
60
+ price_destination = dynamic_destination.price.tao
61
+ rate = price_origin / (price_destination or 1)
62
+
63
+ received_amount_tao = dynamic_origin.alpha_to_tao(amount_to_move)
71
64
  received_amount_tao -= stake_fee
72
- received_amount, _, _ = dynamic_destination.tao_to_alpha_with_slippage(
73
- received_amount_tao
74
- )
65
+ received_amount = dynamic_destination.tao_to_alpha(received_amount_tao)
75
66
  received_amount.set_unit(destination_netuid)
76
67
 
77
68
  if received_amount < Balance.from_tao(0):
78
69
  print_error("Not enough Alpha to pay the transaction fee.")
79
70
  raise ValueError
80
71
 
81
- ideal_amount = amount_to_move * price
82
- total_slippage = ideal_amount - received_amount
83
- slippage_pct_float = 100 * (total_slippage.tao / ideal_amount.tao)
84
- slippage_pct = f"{slippage_pct_float:.4f} %"
85
72
  price_str = (
86
- f"{price:.5f}"
87
- + f"{Balance.get_unit(destination_netuid)}/{Balance.get_unit(origin_netuid)}"
73
+ f"{rate:.5f}"
74
+ + f"({Balance.get_unit(destination_netuid)}/{Balance.get_unit(origin_netuid)})"
88
75
  )
89
76
 
90
77
  # Create and display table
@@ -141,11 +128,6 @@ async def display_stake_movement_cross_subnets(
141
128
  justify="center",
142
129
  style=COLOR_PALETTE["STAKE"]["STAKE_AMOUNT"],
143
130
  )
144
- table.add_column(
145
- "slippage",
146
- justify="center",
147
- style=COLOR_PALETTE["STAKE"]["SLIPPAGE_PERCENT"],
148
- )
149
131
 
150
132
  table.add_row(
151
133
  f"{Balance.get_unit(origin_netuid)}({origin_netuid})",
@@ -156,19 +138,11 @@ async def display_stake_movement_cross_subnets(
156
138
  price_str,
157
139
  str(received_amount),
158
140
  str(stake_fee),
159
- str(slippage_pct),
160
141
  )
161
142
 
162
143
  console.print(table)
163
144
 
164
- # Display slippage warning if necessary
165
- if slippage_pct_float > 5:
166
- message = f"[{COLOR_PALETTE['STAKE']['SLIPPAGE_TEXT']}]-------------------------------------------------------------------------------------------------------------------\n"
167
- message += f"[bold]WARNING:\tSlippage is high: [{COLOR_PALETTE['STAKE']['SLIPPAGE_PERCENT']}]{slippage_pct}[/{COLOR_PALETTE['STAKE']['SLIPPAGE_PERCENT']}], this may result in a loss of funds.[/bold] \n"
168
- message += "-------------------------------------------------------------------------------------------------------------------\n"
169
- console.print(message)
170
-
171
- return received_amount, slippage_pct_float, slippage_pct, price_str
145
+ return received_amount, price_str
172
146
 
173
147
 
174
148
  def prompt_stake_amount(
@@ -414,7 +388,7 @@ async def stake_swap_selection(
414
388
  origin_stake = hotkey_stakes[origin_netuid]["stake"]
415
389
 
416
390
  # Ask for amount to swap
417
- amount, all_balance = prompt_stake_amount(origin_stake, origin_netuid, "swap")
391
+ amount, _ = prompt_stake_amount(origin_stake, origin_netuid, "swap")
418
392
 
419
393
  all_netuids = sorted(await subtensor.get_all_subnet_netuids())
420
394
  destination_choices = [
@@ -530,7 +504,7 @@ async def move_stake(
530
504
  amount=amount_to_move_as_balance.rao,
531
505
  )
532
506
 
533
- # Slippage warning
507
+ # Display stake movement details
534
508
  if prompt:
535
509
  try:
536
510
  await display_stake_movement_cross_subnets(
@@ -714,7 +688,7 @@ async def transfer_stake(
714
688
  amount=amount_to_transfer.rao,
715
689
  )
716
690
 
717
- # Slippage warning
691
+ # Display stake movement details
718
692
  if prompt:
719
693
  try:
720
694
  await display_stake_movement_cross_subnets(
@@ -883,7 +857,7 @@ async def swap_stake(
883
857
  amount=amount_to_swap.rao,
884
858
  )
885
859
 
886
- # Slippage warning
860
+ # Display stake movement details
887
861
  if prompt:
888
862
  try:
889
863
  await display_stake_movement_cross_subnets(
@@ -209,16 +209,12 @@ async def unstake(
209
209
  )
210
210
 
211
211
  try:
212
- received_amount, slippage_pct, slippage_pct_float = _calculate_slippage(
213
- subnet_info=subnet_info,
214
- amount=amount_to_unstake_as_balance,
215
- stake_fee=stake_fee,
216
- )
212
+ current_price = subnet_info.price.tao
213
+ rate = current_price
214
+ received_amount = amount_to_unstake_as_balance * rate
217
215
  except ValueError:
218
216
  continue
219
-
220
217
  total_received_amount += received_amount
221
- max_float_slippage = max(max_float_slippage, slippage_pct_float)
222
218
 
223
219
  base_unstake_op = {
224
220
  "netuid": netuid,
@@ -229,8 +225,6 @@ async def unstake(
229
225
  "amount_to_unstake": amount_to_unstake_as_balance,
230
226
  "current_stake_balance": current_stake_balance,
231
227
  "received_amount": received_amount,
232
- "slippage_pct": slippage_pct,
233
- "slippage_pct_float": slippage_pct_float,
234
228
  "dynamic_info": subnet_info,
235
229
  }
236
230
 
@@ -238,20 +232,18 @@ async def unstake(
238
232
  str(netuid), # Netuid
239
233
  staking_address_name, # Hotkey Name
240
234
  str(amount_to_unstake_as_balance), # Amount to Unstake
241
- str(subnet_info.price.tao)
235
+ f"{subnet_info.price.tao:.6f}"
242
236
  + f"({Balance.get_unit(0)}/{Balance.get_unit(netuid)})", # Rate
243
237
  str(stake_fee), # Fee
244
238
  str(received_amount), # Received Amount
245
- slippage_pct, # Slippage Percent
239
+ # slippage_pct, # Slippage Percent
246
240
  ]
247
241
 
248
242
  # Additional fields for safe unstaking
249
243
  if safe_staking:
250
244
  if subnet_info.is_dynamic:
251
- rate = received_amount.rao / amount_to_unstake_as_balance.rao
252
- rate_with_tolerance = rate * (
253
- 1 - rate_tolerance
254
- ) # Rate only for display
245
+ price_with_tolerance = current_price * (1 - rate_tolerance)
246
+ rate_with_tolerance = price_with_tolerance
255
247
  price_with_tolerance = Balance.from_tao(
256
248
  rate_with_tolerance
257
249
  ).rao # Actual price to pass to extrinsic
@@ -263,7 +255,7 @@ async def unstake(
263
255
  base_table_row.extend(
264
256
  [
265
257
  # Rate with tolerance
266
- f"{rate_with_tolerance:.4f} {Balance.get_unit(0)}/{Balance.get_unit(netuid)}",
258
+ f"{rate_with_tolerance:.6f} {Balance.get_unit(0)}/{Balance.get_unit(netuid)}",
267
259
  # Partial unstake
268
260
  f"[{'dark_sea_green3' if allow_partial_stake else 'red'}]"
269
261
  f"{allow_partial_stake}[/{'dark_sea_green3' if allow_partial_stake else 'red'}]",
@@ -448,14 +440,13 @@ async def unstake_all(
448
440
  justify="center",
449
441
  style=COLOR_PALETTE["POOLS"]["TAO_EQUIV"],
450
442
  )
451
- table.add_column(
452
- "Slippage",
453
- justify="center",
454
- style=COLOR_PALETTE["STAKE"]["SLIPPAGE_PERCENT"],
455
- )
443
+ # table.add_column(
444
+ # "Slippage",
445
+ # justify="center",
446
+ # style=COLOR_PALETTE["STAKE"]["SLIPPAGE_PERCENT"],
447
+ # )
456
448
 
457
- # Calculate slippage and total received
458
- max_slippage = 0.0
449
+ # Calculate total received
459
450
  total_received_value = Balance(0)
460
451
  for stake in stake_info:
461
452
  if stake.stake.rao == 0:
@@ -473,41 +464,33 @@ async def unstake_all(
473
464
  destination_coldkey_ss58=wallet.coldkeypub.ss58_address,
474
465
  amount=stake_amount.rao,
475
466
  )
467
+
476
468
  try:
477
- received_amount, slippage_pct, slippage_pct_float = _calculate_slippage(
478
- subnet_info=subnet_info, amount=stake_amount, stake_fee=stake_fee
479
- )
480
- except ValueError:
469
+ current_price = subnet_info.price.tao
470
+ rate = current_price
471
+ received_amount = stake_amount * rate - stake_fee
472
+
473
+ if received_amount < Balance.from_tao(0):
474
+ print_error("Not enough Alpha to pay the transaction fee.")
475
+ continue
476
+ except (AttributeError, ValueError):
481
477
  continue
482
478
 
483
- max_slippage = max(max_slippage, slippage_pct_float)
484
479
  total_received_value += received_amount
485
480
 
486
481
  table.add_row(
487
482
  str(stake.netuid),
488
483
  hotkey_display,
489
484
  str(stake_amount),
490
- str(float(subnet_info.price))
485
+ f"{float(subnet_info.price):.6f}"
491
486
  + f"({Balance.get_unit(0)}/{Balance.get_unit(stake.netuid)})",
492
487
  str(stake_fee),
493
488
  str(received_amount),
494
- slippage_pct,
495
489
  )
496
490
  console.print(table)
497
- if max_slippage > 5:
498
- message = (
499
- f"[{COLOR_PALETTE['STAKE']['SLIPPAGE_TEXT']}]--------------------------------------------------------------"
500
- f"-----------------------------------------------------\n"
501
- f"[bold]WARNING:[/bold] The slippage on one of your operations is high: "
502
- f"[{COLOR_PALETTE['STAKE']['SLIPPAGE_PERCENT']}]{max_slippage:.4f}%"
503
- f"[/{COLOR_PALETTE['STAKE']['SLIPPAGE_PERCENT']}], this may result in a loss of funds.\n"
504
- "----------------------------------------------------------------------------------------------------------"
505
- "---------\n"
506
- )
507
- console.print(message)
508
491
 
509
492
  console.print(
510
- f"Expected return after slippage: [{COLOR_PALETTE['STAKE']['STAKE_AMOUNT']}]{total_received_value}"
493
+ f"Total expected return: [{COLOR_PALETTE['STAKE']['STAKE_AMOUNT']}]{total_received_value}"
511
494
  )
512
495
 
513
496
  if prompt and not Confirm.ask(
@@ -848,51 +831,6 @@ async def _unstake_all_extrinsic(
848
831
 
849
832
 
850
833
  # Helpers
851
- def _calculate_slippage(
852
- subnet_info, amount: Balance, stake_fee: Balance
853
- ) -> tuple[Balance, str, float]:
854
- """Calculate slippage and received amount for unstaking operation.
855
-
856
- Args:
857
- subnet_info: Subnet information containing price data
858
- amount: Amount being unstaked
859
- stake_fee: Stake fee to include in slippage calculation
860
-
861
- Returns:
862
- tuple containing:
863
- - received_amount: Balance after slippage deduction
864
- - slippage_pct: Formatted string of slippage percentage
865
- - slippage_pct_float: Float value of slippage percentage
866
- """
867
- received_amount, _, _ = subnet_info.alpha_to_tao_with_slippage(amount)
868
- received_amount -= stake_fee
869
-
870
- if received_amount < Balance.from_tao(0):
871
- print_error("Not enough Alpha to pay the transaction fee.")
872
- raise ValueError
873
-
874
- if subnet_info.is_dynamic:
875
- # Ideal amount w/o slippage
876
- ideal_amount = subnet_info.alpha_to_tao(amount)
877
-
878
- # Total slippage including fees
879
- total_slippage = ideal_amount - received_amount
880
- slippage_pct_float = (
881
- 100 * (float(total_slippage.tao) / float(ideal_amount.tao))
882
- if ideal_amount.tao != 0
883
- else 0
884
- )
885
- slippage_pct = f"{slippage_pct_float:.4f} %"
886
- else:
887
- # Root will only have fee-based slippage
888
- slippage_pct_float = (
889
- 100 * float(stake_fee.tao) / float(amount.tao) if amount.tao != 0 else 0
890
- )
891
- slippage_pct = f"{slippage_pct_float:.4f} %"
892
-
893
- return received_amount, slippage_pct, slippage_pct_float
894
-
895
-
896
834
  async def _unstake_selection(
897
835
  dynamic_info,
898
836
  identities,
@@ -993,14 +931,14 @@ async def _unstake_selection(
993
931
  table.add_column("Symbol", style=COLOR_PALETTE["GENERAL"]["SYMBOL"])
994
932
  table.add_column("Stake Amount", style=COLOR_PALETTE["STAKE"]["STAKE_AMOUNT"])
995
933
  table.add_column(
996
- f"[bold white]RATE ({Balance.get_unit(0)}_in/{Balance.get_unit(1)}_in)",
934
+ f"[bold white]Rate ({Balance.get_unit(0)}/{Balance.get_unit(1)})",
997
935
  style=COLOR_PALETTE["POOLS"]["RATE"],
998
936
  justify="left",
999
937
  )
1000
938
 
1001
939
  for netuid_, stake_amount in netuid_stakes.items():
1002
940
  symbol = dynamic_info[netuid_].symbol
1003
- rate = f"{dynamic_info[netuid_].price.tao:.4f} τ/{symbol}"
941
+ rate = f"{dynamic_info[netuid_].price.tao:.6f} τ/{symbol}"
1004
942
  table.add_row(str(netuid_), symbol, str(stake_amount), rate)
1005
943
  console.print("\n", table, "\n")
1006
944
 
@@ -1261,9 +1199,9 @@ def _create_unstake_table(
1261
1199
  style=COLOR_PALETTE["POOLS"]["TAO_EQUIV"],
1262
1200
  footer=str(total_received_amount),
1263
1201
  )
1264
- table.add_column(
1265
- "Slippage", justify="center", style=COLOR_PALETTE["STAKE"]["SLIPPAGE_PERCENT"]
1266
- )
1202
+ # table.add_column(
1203
+ # "Slippage", justify="center", style=COLOR_PALETTE["STAKE"]["SLIPPAGE_PERCENT"]
1204
+ # )
1267
1205
  if safe_staking:
1268
1206
  table.add_column(
1269
1207
  f"Rate with tolerance: [blue]({rate_tolerance * 100}%)[/blue]",
@@ -79,7 +79,7 @@ def allowed_value(
79
79
  return True, value
80
80
 
81
81
 
82
- def string_to_bool(val) -> bool | type[ValueError]:
82
+ def string_to_bool(val) -> bool:
83
83
  try:
84
84
  return {"true": True, "1": True, "0": False, "false": False}[val.lower()]
85
85
  except KeyError:
@@ -542,14 +542,12 @@ async def wallet_balance(
542
542
 
543
543
  total_free_balance = sum(free_balances.values())
544
544
  total_staked_balance = sum(stake[0] for stake in staked_balances.values())
545
- total_staked_with_slippage = sum(stake[1] for stake in staked_balances.values())
546
545
 
547
546
  balances = {
548
547
  name: (
549
548
  coldkey,
550
549
  free_balances[coldkey],
551
550
  staked_balances[coldkey][0],
552
- staked_balances[coldkey][1],
553
551
  )
554
552
  for (name, coldkey) in zip(wallet_names, coldkeys)
555
553
  }
@@ -577,24 +575,12 @@ async def wallet_balance(
577
575
  style=COLOR_PALETTE["STAKE"]["STAKE_ALPHA"],
578
576
  no_wrap=True,
579
577
  ),
580
- Column(
581
- "[white]Staked (w/slippage)",
582
- justify="right",
583
- style=COLOR_PALETTE["STAKE"]["STAKE_SWAP"],
584
- no_wrap=True,
585
- ),
586
578
  Column(
587
579
  "[white]Total Balance",
588
580
  justify="right",
589
581
  style=COLOR_PALETTE["GENERAL"]["BALANCE"],
590
582
  no_wrap=True,
591
583
  ),
592
- Column(
593
- "[white]Total (w/slippage)",
594
- justify="right",
595
- style=COLOR_PALETTE["GENERAL"]["BALANCE"],
596
- no_wrap=True,
597
- ),
598
584
  title=f"\n[{COLOR_PALETTE['GENERAL']['HEADER']}]Wallet Coldkey Balance[/{COLOR_PALETTE['GENERAL']['HEADER']}]\n[{COLOR_PALETTE['GENERAL']['HEADER']}]Network: {subtensor.network}\n",
599
585
  show_footer=True,
600
586
  show_edge=False,
@@ -605,15 +591,13 @@ async def wallet_balance(
605
591
  leading=True,
606
592
  )
607
593
 
608
- for name, (coldkey, free, staked, staked_slippage) in balances.items():
594
+ for name, (coldkey, free, staked) in balances.items():
609
595
  table.add_row(
610
596
  name,
611
597
  coldkey,
612
598
  str(free),
613
599
  str(staked),
614
- str(staked_slippage),
615
600
  str(free + staked),
616
- str(free + staked_slippage),
617
601
  )
618
602
  table.add_row()
619
603
  table.add_row(
@@ -621,9 +605,7 @@ async def wallet_balance(
621
605
  "",
622
606
  str(total_free_balance),
623
607
  str(total_staked_balance),
624
- str(total_staked_with_slippage),
625
608
  str(total_free_balance + total_staked_balance),
626
- str(total_free_balance + total_staked_with_slippage),
627
609
  )
628
610
  console.print(Padding(table, (0, 0, 0, 4)))
629
611
  await subtensor.substrate.close()
@@ -633,9 +615,7 @@ async def wallet_balance(
633
615
  "coldkey": value[0],
634
616
  "free": value[1].tao,
635
617
  "staked": value[2].tao,
636
- "staked_with_slippage": value[3].tao,
637
618
  "total": (value[1] + value[2]).tao,
638
- "total_with_slippage": (value[1] + value[3]).tao,
639
619
  }
640
620
  for (key, value) in balances.items()
641
621
  }
@@ -644,11 +624,7 @@ async def wallet_balance(
644
624
  "totals": {
645
625
  "free": total_free_balance.tao,
646
626
  "staked": total_staked_balance.tao,
647
- "staked_with_slippage": total_staked_with_slippage.tao,
648
627
  "total": (total_free_balance + total_staked_balance).tao,
649
- "total_with_slippage": (
650
- total_free_balance + total_staked_with_slippage
651
- ).tao,
652
628
  },
653
629
  }
654
630
  json_console.print(json.dumps(output_dict))
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: bittensor-cli
3
- Version: 9.8.0
3
+ Version: 9.8.1
4
4
  Summary: Bittensor CLI
5
5
  Author: bittensor.com
6
6
  Project-URL: homepage, https://github.com/opentensor/btcli
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "bittensor-cli"
7
- version = "9.8.0"
7
+ version = "9.8.1"
8
8
  description = "Bittensor CLI"
9
9
  readme = "README.md"
10
10
  authors = [
File without changes
File without changes
File without changes