SubnetLeaseCreated

Event v290 → v315, v320 → v326, v334 → v367, v372 → v377, v385 → v402, v411 → current Changed in v411 #102

Emitted when a new subnet lease is created.

View events on chain
Useful for: subnet ownersvalidatorsminersstakersanalytics

The Big Picture

Subnet leasing separates ownership from operation. The owner keeps the subnet asset, but a lessee runs the day-to-day operations (setting parameters, managing validators, etc.). Leases have terms, payments, and durations. This event signals a new lease arrangement - someone new is running the subnet without owning it.

Why This Matters

If the subnet you're on gets leased to someone new, the operational approach might change. New hyperparameters, new priorities, new management style. This event tells you ownership and operation just became separate - pay attention to who's running things now.

Example Scenario

Subnet 15's original owner wants passive income instead of active management. They lease the subnet to a professional operator for 1 year. SubnetLeaseCreated fires with lease terms. The owner still owns the subnet (and receives owner cut), but the lessee now controls operations.

Common Questions

Does the original owner lose control completely?
During the lease, the lessee has operational control. The owner retains ownership and receives their cut. Details depend on lease terms.
How are lessees chosen?
It's an agreement between owner and lessee, facilitated on-chain. Owners can choose who to lease to based on their criteria.
What happens when the lease ends?
Control returns to the owner unless renewed. See SubnetLeaseTerminated for lease endings.

Use Cases

  • Track when subnets are leased to operators
  • Monitor subnet ownership/operation changes
  • Understand subnet governance transitions
  • Build subnet lease tracking dashboards

How to Use This Event

  • Monitor subnets you participate in for operator changes
  • Track lease activity across the network
  • Build subnet governance monitoring tools

From Chain Metadata

A subnet lease has been created.

Triggers

Preconditions

  • Subnet exists
  • Lease terms agreed upon
  • Required deposits/payments made

Effects

Postconditions

  • SubnetLeaseInfo populated
  • Lease period begins

Side Effects

  • Lessee gains subnet operation rights

Event Data

#NameTypeDescription
0
beneficiary
AccountId beneficiary: Account address (32 bytes, SS58-encoded) (hex -> SS58)
1
lease_id
u32 LeaseIdlease_id: Lease identifier
2
netuid
u16 NetUidnetuid: Subnet ID (u16, 0-65535)
3
end_block
Option Option<BlockNumberFor<T>>end_block: optional Block number

Code Examples

import { createClient, Binary } from "polkadot-api";
import { getWsProvider } from "polkadot-api/ws";
import { sub } from "@polkadot-api/descriptors"; // generated by: npx papi add sub -w wss://entrypoint-finney.opentensor.ai:443

const client = createClient(getWsProvider("wss://entrypoint-finney.opentensor.ai:443"));
const api = client.getTypedApi(sub);

// Subscribe to SubnetLeaseCreated events
client.finalizedBlock$.subscribe(async (block) => {
  const events = await api.event.SubtensorModule.SubnetLeaseCreated.get(block.hash);
  for (const evt of events) {
    console.log("SubnetLeaseCreated:", evt.payload);
  }
});

Version History

v290 block 5,947,548 4 args
v320 block 6,523,566 4 args
v334 block 6,811,690 4 args
v372 block 7,430,358 4 args
v385 block 7,782,670 4 args
v411 block 8,283,784 4 args Current

Runtime Info

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