Reference
This page provides reference materials and project information for the SN106 Bittensor subnet system. It includes project metadata, system constants, file organization, and links to detailed reference materials.
For specific licensing information, see License. For development environment setup information, see Development Setup.
Project Overview
Section titled “Project Overview”SN106 is a Bittensor subnet (NETUID=106) that incentivizes concentrated liquidity provision across multiple DeFi protocols. The system bridges Bittensor alpha tokens to external chains and rewards miners based on their liquidity position quality and market participation.
| Property | Value |
|---|---|
| Repository | https://github.com/v0idai/SN106 |
| License | MIT License |
| Primary Language | TypeScript |
| Target Networks | Solana (active), Ethereum (planned), Base (planned) |
| Validator Cycle | 20 minutes |
| Burn Rate | 95% to UID 0 |
System Constants and Identifiers
Section titled “System Constants and Identifiers”The following diagram maps key system identifiers used throughout the codebase:
graph TB
subgraph "Network_Identifiers"
NETUID["NETUID: 106"]
SOLANA_CHAIN["Chain: solana"]
ETH_CHAIN["Chain: ethereum"]
BASE_CHAIN["Chain: base"]
end
subgraph "Core_Functions"
SET_WEIGHTS["setWeightsOnSubtensor()"]
GET_CHAINS["getEnabledChains()"]
VALIDATE_ENV["validateEnvironment()"]
CALC_WEIGHTS["calculateWeights()"]
end
subgraph "Configuration_Keys"
BT_WEBSOCKET["BITTENSOR_WEBSOCKET_URL"]
SOL_RPC["SOLANA_RPC_URL"]
ETH_RPC["ETHEREUM_RPC_URL"]
BASE_RPC["BASE_RPC_URL"]
HOTKEY_PATH["HOTKEY_PATH"]
COLDKEY_PATH["COLDKEY_PATH"]
end
subgraph "Protocol_Constants"
CYCLE_TIME["VALIDATOR_CYCLE_MINUTES: 20"]
BURN_PERCENT["BURN_PERCENTAGE: 95"]
RESERVED_SHARE["SUBNET_RESERVED_SHARE: 25"]
BATCH_SIZE["BATCH_SIZE"]
end
subgraph "Contract_Addresses"
RAYDIUM_CLMM["Raydium CLMM Program"]
SN106_CONTRACT["SN106 Staking Contract"]
UNISWAP_V3["Uniswap V3 Factory"]
end
NETUID --> SET_WEIGHTS
GET_CHAINS --> SOLANA_CHAIN
GET_CHAINS --> ETH_CHAIN
GET_CHAINS --> BASE_CHAIN
VALIDATE_ENV --> BT_WEBSOCKET
VALIDATE_ENV --> SOL_RPC
VALIDATE_ENV --> ETH_RPC
VALIDATE_ENV --> BASE_RPC
CALC_WEIGHTS --> CYCLE_TIME
CALC_WEIGHTS --> BURN_PERCENT
CALC_WEIGHTS --> RESERVED_SHARE
Sources: Context diagrams, system architecture overview
File Structure Reference
Section titled “File Structure Reference”The codebase follows a modular architecture with clear separation of concerns:
graph TD
subgraph "Entry_Points"
VALIDATOR_INDEX["validator/index.ts"]
DOCKERFILE["Dockerfile"]
PACKAGE_JSON["package.json"]
end
subgraph "Configuration_Layer"
ENV_CONFIG["config/environment.ts"]
ENV_FILES[".env files"]
DOCKER_IGNORE[".dockerignore"]
end
subgraph "Core_Modules"
WEIGHT_CALC["src/weightCalculation.ts"]
CHAIN_MANAGER["src/chainManager.ts"]
DATA_FETCHER["src/dataFetcher.ts"]
EMISSIONS_CALC["src/emissionsCalculator.ts"]
end
subgraph "Chain_Specific"
SOLANA_MODULE["src/chains/solana/"]
ETHEREUM_MODULE["src/chains/ethereum/"]
BASE_MODULE["src/chains/base/"]
end
subgraph "Utilities"
BT_UTILS["src/utils/bittensor.ts"]
LOGGER["src/utils/logger.ts"]
RETRY_LOGIC["src/utils/retry.ts"]
end
subgraph "External_Resources"
LICENSE_FILE["LICENSE"]
README["README.md"]
GITIGNORE[".gitignore"]
end
VALIDATOR_INDEX --> ENV_CONFIG
VALIDATOR_INDEX --> WEIGHT_CALC
VALIDATOR_INDEX --> CHAIN_MANAGER
ENV_CONFIG --> ENV_FILES
CHAIN_MANAGER --> SOLANA_MODULE
CHAIN_MANAGER --> ETHEREUM_MODULE
CHAIN_MANAGER --> BASE_MODULE
WEIGHT_CALC --> EMISSIONS_CALC
WEIGHT_CALC --> BT_UTILS
DOCKERFILE --> DOCKER_IGNORE
DOCKERFILE --> PACKAGE_JSON
Sources: Project structure context, system architecture diagrams
External Dependencies and Integrations
Section titled “External Dependencies and Integrations”| Component | Purpose | Integration Point |
|---|---|---|
| Bittensor Network | Subnet hosting and weight submission | setWeightsOnSubtensor() |
| Subtensor Chain | Weight storage and consensus | WebSocket connection |
| Raydium CLMM | Solana concentrated liquidity | Program interaction |
| Uniswap V3 | Ethereum/Base liquidity pools | Contract calls |
| VoidAI Bridge | Token wrapping service | bridge.voidai.com |
Key Configuration Parameters
Section titled “Key Configuration Parameters”| Parameter | Description | Environment Variable |
|---|---|---|
| Validator Cycle | Execution frequency in minutes | VALIDATOR_CYCLE_MINUTES |
| Batch Size | Position processing batch size | BATCH_SIZE |
| RPC Endpoints | Blockchain connection URLs | {CHAIN}_RPC_URL |
| Bittensor Keys | Validator identity files | HOTKEY_PATH, COLDKEY_PATH |
| Network Selection | Enabled blockchain networks | ENABLED_CHAINS |
System Limits and Constraints
Section titled “System Limits and Constraints”| Limit | Value | Purpose |
|---|---|---|
| Maximum UIDs | 4096 | Bittensor subnet limit |
| Weight Precision | 16-bit | Subtensor requirement |
| Burn Percentage | 95% | Economic model constraint |
| Reserved Share | 25% | Subnet 0 pool allocation |
| Retry Attempts | 3 | RPC failure handling |
| Timeout Duration | 30 seconds | Connection limits |
Reference Links
Section titled “Reference Links”- License - MIT License terms and conditions
- Development Setup - Development environment configuration
Sources: LICENSE:1-21