SubnetLeaseCreated

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

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 (AccountId) (hex -> SS58)
1
lease_id
u32 lease_id (u32)
2
netuid
u16 Subnet/network identifier (0-65535)
3
end_block
Option end_block (Option)

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 SubnetLeaseCreated events
api.query.system.events((events) => {
  events
    .filter(({ event }) =>
      event.section === stringCamelCase("SubtensorModule") &&
      event.method === "SubnetLeaseCreated"
    )
    .forEach(({ event }) => {
      console.log("SubnetLeaseCreated:", event.data.toHuman());
    });
});

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 Current

Runtime Info

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