register_leased_network

Call v290 → current #110

Creates a new subnet under lease terms.

View calls on chain

Click items to navigate. Pan and zoom to explore.

Used by: subnet ownersdevelopers

The Big Picture

Not everyone wants to commit to a permanent subnet with locked capital. Leased networks offer time-limited subnet access - you pay a lease fee for a duration, and the subnet operates normally during that period. When the lease expires, the subnet may be dissolved or require renewal. Good for testing ideas or running temporary projects.

Why This Matters

The full lock cost for a subnet can be substantial. Leasing lets you try before you buy - run a subnet for a month or quarter, see if it gains traction, then decide whether to commit to permanent ownership or let it expire.

Example Scenario

You want to test a new validation mechanism for 3 months. Call register_leased_network(lease_duration=3 months, lease_fee=300 TAO). Your subnet operates normally for 3 months. If successful, you can renew or convert to permanent. If not, the lease expires and you haven't locked 1000+ TAO indefinitely.

Common Questions

What happens when the lease expires?
Depends on lease terms - typically the subnet is dissolved or enters a grace period for renewal. Miners are warned before expiration.
Can I extend a lease?
Usually yes - call terminate_lease and re-register, or there may be a renewal call. Check network documentation for renewal procedures.
Is leasing cheaper than owning?
Short-term: possibly yes, lower upfront cost. Long-term: ownership is cheaper since you get your lock back when dissolving. Leasing is for flexibility, not savings.

Use Cases

  • Create a temporary subnet for a specific project
  • Lower-commitment subnet experimentation
  • Time-limited events or competitions
  • Evaluation period before full subnet commitment

From Chain Metadata

Register a new leased network. The crowdloan's contributions are used to compute the share of the emissions that the contributors will receive as dividends. The leftover cap is refunded to the contributors and the beneficiary.

Input Parameters

#NameTypeDescription
0
emissions_share
Percent emissions_share (Percent)
1
end_block
Option end_block (Option)

Permissions

Origin
Signed
Required Role

Permission data inferred from metadata. May be incomplete.

Requirements

  • Lease terms agreed
  • Required payments made (lease fee)
  • Lease duration and terms valid

Effects

Postconditions

  • Subnet created with lease parameters
  • Lease info recorded on-chain
  • Lease timer started

Side Effects

  • Subnet operates under lease conditions
  • Lease expires automatically after duration

Possible Errors

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 });

// Build register_leased_network call
const emissions_share = 0 as any /* Percent */;
const end_block = 0 as any /* Option */;

const call = api.tx[stringCamelCase("SubtensorModule")][stringCamelCase("register_leased_network")](
  emissions_share,
  end_block
);

Runtime Info

View Source
Pallet Index
7
Call Index
110
First Version
v290
Current Version
v393