About Subnets
Subnets are permissionless AI markets within Tensora. Each subnet focuses on a specific inference task type, creating competitive environments where miners provide models and validators score quality. This design enables decentralized AI services without relying on centralized API providers.
What Is a Subnet?
A subnet is an isolated smart contract that coordinates:
Miners running AI models and serving inference requests
Validators querying miners, scoring outputs, and participating in consensus
Coordinators managing epoch transitions and reward distribution
Emissions allocated based on subnet weight (set by governance)
Subnets operate independently. A bug or attack in one subnet does not affect others. Each subnet has custom hyperparameters like minimum bonds, task timeouts, and slashing rates.
Why Subnets?
Traditional AI APIs have centralization risks:
Single point of failure
Vendor lock-in
Opaque pricing
Censorship vulnerability
No quality guarantees
Tensora subnets solve these problems through:
Competition: Multiple miners per subnet drive quality up and costs down
Transparency: All scores and rewards on-chain
Incentive alignment: Validators stake capital; bad scoring loses rewards
Permissionless entry: Anyone can create a subnet or become a miner
Example Subnets
Linguista (NLP)
Purpose: Natural language processing tasks including translation, summarization, sentiment analysis, and text generation.
Models: GPT-2, BERT, T5, Llama-3-8B, Mistral
Task Examples:
Copy
{
"type": "translation",
"source_lang": "en",
"target_lang": "es",
"text": "Hello, how are you?"
}Scoring Criteria:
BLEU score for translation
ROUGE for summarization
Latency (lower is better)
Consistency across multiple queries
Typical Rewards: 300–500 TORA per epoch for top miners
Visiona (Computer Vision)
Purpose: Image generation, classification, object detection, and style transfer.
Models: Stable Diffusion, CLIP, YOLO, ResNet
Task Examples:
Copy
{
"type": "text_to_image",
"prompt": "A futuristic city at sunset, cyberpunk style",
"resolution": "512x512",
"steps": 50
}Scoring Criteria:
CLIP score (prompt adherence)
FID (Fréchet Inception Distance) for quality
Human validator ratings (random sampling)
Latency
Typical Rewards: 400–600 TORA per epoch
Predictia (Time-Series Forecasting)
Purpose: Price prediction, demand forecasting, anomaly detection for DeFi and real-world data.
Models: XGBoost, LSTM, Transformer forecasters
Task Examples:
Copy
{
"type": "price_prediction",
"asset": "BTC/USDT",
"horizon": "1h",
"features": ["open", "high", "low", "close", "volume"]
}Scoring Criteria:
RMSE (Root Mean Square Error)
MAE (Mean Absolute Error)
Backtested Sharpe ratio
Prediction confidence calibration
Typical Rewards: 250–400 TORA per epoch
Subnet Isolation and Security
Isolated State
Each subnet is a separate contract instance. State includes:
Registered miners and validators
Hyperparameters (bonds, timeouts, slashing)
Historical scores and trust metrics
Emission weight
No shared state between subnets except global emission limits.
Security Model
Copy
flowchart TB
subgraph Subnet A
MinersA[Miners A]
ValidatorsA[Validators A]
ScoresA[Scores A]
end
subgraph Subnet B
MinersB[Miners B]
ValidatorsB[Validators B]
ScoresB[Scores B]
end
subgraph Global
Emissions[Emission Manager]
Governance[Governance]
end
MinersA --> ScoresA
ValidatorsA --> ScoresA
MinersB --> ScoresB
ValidatorsB --> ScoresB
Emissions -->|Weight A| ScoresA
Emissions -->|Weight B| ScoresB
Governance -->|Set Weights| Emissions
ScoresA -.->|Trust score affects| ValidatorsB
ScoresB -.->|Trust score affects| ValidatorsACross-Subnet Effects:
Validator trust scores are global. Poor performance in Subnet A reduces weight in Subnet B.
Slashing in one subnet affects global reputation.
Otherwise, subnets are fully isolated.
Market Dynamics
Supply and Demand
Demand Side (dApps, users):
Query miners via HTTP APIs
Pay fees in TORA (optional, set by miners)
Choose miners by reputation or lowest latency
Supply Side (miners):
Compete on quality, latency, and price
Higher scores → more validator attention → more rewards
Poor performance → low scores → slashed bonds
Emission-Based vs. Fee-Based Revenue
Emission Rewards (primary):
Distributed every epoch based on scores
18% to miners, 41% to validators, 41% to delegators
Predictable income for miners
Direct Fees (secondary):
Miners can charge dApps per request
Negotiated off-chain or via smart contract
Not part of core protocol (permissionless)
Most miners rely on emissions. Direct fees are an emerging market.
Subnet Discovery
On-Chain Registry
Query SubnetRegistry to discover subnets:
Copy
uint256[] memory subnetIds = subnetRegistry.getActiveSubnets();
for (uint256 i = 0; i < subnetIds.length; i++) {
SubnetRegistry.Subnet memory subnet = subnetRegistry.subnets(subnetIds[i]);
console.log(subnet.name, subnet.inferenceType, subnet.emissionWeight);
}Off-Chain Indexer (Graph Protocol)
Tensora provides a subgraph for easier querying:
Copy
{
subnets(where: { active: true }, orderBy: emissionWeight, orderDirection: desc) {
id
name
inferenceType
emissionWeight
minerCount
validatorCount
createdAt
}
}Endpoint: https://graph.tensora.org/subgraphs/subnets
Subnet Explorer UI
Visit https://explorer.tensora.org/subnets to browse:
Active subnets with emission weights
Top miners by score
Validator APY estimates
Historical performance charts
Creating Your Own Subnet
Pay creation fee
Pay the creation fee (1000 TORA) to create a new subnet contract instance.
Set hyperparameters
Configure bonds, timeouts, slashing rates, and other subnet-specific hyperparameters.
Deploy coordinator
Deploy a coordinator service that manages epoch transitions and reward distribution for the subnet.
Propose emission weight
Submit a governance proposal to set the subnet's emission weight.
See Create a Subnet for step-by-step instructions.
Subnet Lifecycle Stages
Bootstrapping
Newly created subnets have zero emission weight. Creators must:
Recruit initial miners and validators
Demonstrate usage and quality
Build community support
Submit governance proposal for emissions
Timeline: 2–4 weeks typically
Active
Subnet receives emissions. Miners and validators compete. Coordinator manages epochs. dApps integrate the subnet.
Key metrics:
Daily request volume
Average miner scores
Validator participation rate
Emission ROI (rewards per TORA staked)
Growth
High-performing subnets receive increased emission weights through governance votes. More miners join. Validator APY attracts more stake.
Indicators:
1000 requests/day
10 active miners
5 validators with high trust scores
Positive community sentiment
Maturity
Established subnets with stable emissions. Focus shifts to quality, specialization, and direct fee markets.
Decline (Optional)
If usage drops, governance may reduce emission weight or deactivate the subnet. Miners and validators migrate to other subnets.
Triggers:
Low request volume (<100/day for 30 days)
Security incidents
Better alternatives emerge
Model obsolescence
Use Cases for Subnets
DeFi Integration
Smart contracts call Predictia subnet for price forecasts:
Copy
interface IPredictiaSubnet {
function requestForecast(string calldata asset, uint256 horizon) external returns (bytes32 requestId);
function getForecast(bytes32 requestId) external view returns (int256 prediction, uint256 confidence);
}
contract MyDeFiProtocol {
IPredictiaSubnet predictia = IPredictiaSubnet(0x...);
function shouldLiquidate(address user) public returns (bool) {
bytes32 reqId = predictia.requestForecast("ETH/USDT", 3600); // 1h forecast
(int256 prediction, uint256 confidence) = predictia.getForecast(reqId);
if (prediction < 0 && confidence > 80) {
// Price expected to drop with high confidence
return true;
}
return false;
}
}Content Moderation
Use Visiona subnet for image classification:
Copy
import axios from "axios";
async function moderateImage(imageUrl: string): Promise<boolean> {
const miners = await getTopMiners("Visiona");
for (const miner of miners) {
const response = await axios.post(miner.endpoint, {
task: "classify",
image_url: imageUrl,
categories: ["safe", "nsfw", "violent"]
});
if (response.data.category !== "safe") {
return false; // Reject
}
}
return true; // Approve
}Chatbot Backends
Integrate Linguista for conversational AI:
Copy
import requests
def chat_with_subnet(user_message: str, history: list) -> str:
miners = get_top_miners_by_latency("Linguista")
for miner in miners:
try:
response = requests.post(
miner["endpoint"],
json={
"task": "chat",
"message": user_message,
"history": history,
"max_tokens": 150
},
timeout=5
)
return response.json()["reply"]
except:
continue # Try next miner
return "Sorry, all miners unavailable."Risks and Limitations
Model Trust
Validators score outputs but cannot verify model weights. A miner could run a biased or backdoored model. Mitigation:
Reputation systems
Diverse validator set
User feedback loops
Centralization Risk
If one entity controls >51% of validators in a subnet, they can manipulate scores. Mitigation:
Stake distribution monitoring
Governance intervention (reduce emission weight)
Community alerts
Latency
Off-chain inference adds latency (seconds to minutes). Not suitable for real-time applications. Best for:
Batch processing
Async workflows
Non-critical paths
Data Privacy
Tasks sent to miners are not encrypted by default. Sensitive data requires additional privacy layers (e.g., ZKML, TEEs).
Last updated