SubnetLeaseTerminated

Event Re-added v290 → v315, v320 → v326, v334 → v367, v372 → v377, v385 → current #102

Emitted when a subnet lease is terminated.

View events on chain
Useful for: subnet ownersvalidatorsminersstakersanalytics

The Big Picture

Leases end - either naturally at expiration or early due to breach/agreement. When a lease terminates, operational control returns to the subnet owner. Deposits are settled based on termination conditions. This marks the end of a lease relationship and potentially a change in how the subnet is managed.

Why This Matters

Lease termination means operational control changes hands. If you're on a leased subnet, the management is about to change (back to owner or to a new lessee). Be prepared for potential policy and parameter changes.

Example Scenario

A 1-year subnet lease expires. SubnetLeaseTerminated fires with netuid 15 and reason 'expiry'. The lessee's operational control ends. The owner resumes direct management of subnet 15. Participants should watch for any management style changes.

Common Questions

What happens to the lessee's deposit?
Depends on termination conditions. Normal expiry usually returns deposits. Early termination for breach may forfeit deposits. Check the lease terms.
Does termination affect participants?
The subnet continues operating, but management changes. Watch for hyperparameter changes, policy shifts, etc. as the new/returned management takes over.
Can the same lessee get a new lease?
Yes, if the owner agrees. Old lease ends, new lease begins - two separate agreements. Or the owner might choose a different lessee or operate directly.

Use Cases

  • Track when lease arrangements end
  • Monitor subnet control transitions
  • Detect early terminations or disputes
  • Build subnet governance tracking tools

How to Use This Event

  • Monitor for lease terminations on subnets you're active on
  • Track lease lifecycle completions
  • Build alerts for control transitions

From Chain Metadata

A subnet lease has been terminated.

Triggers

Emitted by

Preconditions

  • Active lease exists
  • Termination conditions met (expiry or early termination)

Effects

Postconditions

  • Lease marked inactive
  • Subnet control returns to owner

Side Effects

  • Deposits may be returned or forfeited

Event Data

#NameTypeDescription
0
beneficiary
AccountId beneficiary (AccountId) (hex -> SS58)
1
netuid
u16 Subnet/network identifier (0-65535)

Code Examples

import { ApiPromise, WsProvider } from "@polkadot/api";
import { stringCamelCase } from "@polkadot/util";

const provider = new WsProvider("wss://entrypoint-finney.opentensor.ai:443");
const api = await ApiPromise.create({ provider });

// Subscribe to SubnetLeaseTerminated events
api.query.system.events((events) => {
  events
    .filter(({ event }) =>
      event.section === stringCamelCase("SubtensorModule") &&
      event.method === "SubnetLeaseTerminated"
    )
    .forEach(({ event }) => {
      console.log("SubnetLeaseTerminated:", event.data.toHuman());
    });
});

Version History

v290 block 5,947,548 2 args
v320 block 6,523,566 2 args
v334 block 6,811,690 2 args
v372 block 7,430,358 2 args
v385 block 7,782,670 2 args Current

Runtime Info

View Source
Pallet Index
7
Event Index
102
First Version
v290
Current Version
v393