Subnet
TensorUSD Subnet Architecture (SN113)
Introduction
TensorUSD (SN113) is a reserve-backed stablecoin subsystem within the Bittensor ecosystem designed to maintain 1:1 redeemability with the US Dollar. The subnet operates through a dual-mechanism incentive model that coordinates decentralized liquidation execution and price oracle maintenance.
The subnet implements two parallel incentive mechanisms:
Mechanism 0: Liquidation Auction Participation (99% of total miner rewards)
Mechanism 1: Price Oracle Contributions (1% of total miner rewards)
Both mechanisms run independently with separate reward systems, allowing miners to specialize or participate in both for maximum earnings.
Dual-Mechanism Architecture
Mechanism 0: Liquidation Auctions
When collateral backing a vault becomes insufficient (collateral ratio drops below threshold), the system liquidates collateral via an auction process. Miners compete to acquire collateral at profitable prices while covering vault debt.
Key Activities:
Monitor liquidation auctions in real-time
Evaluate profitability using live collateral prices
Submit competitive bids on-chain
Execute winning bids to acquire collateral
Reward Model:
Base reward: 1.0 for paying exactly the debt amount
Bonus scaling: Up to 1.2x for overbidding 20%+ above debt
Multiple auction wins accumulate rewards
Rewards distributed via
mechid=0weights
Mechanism 1: Price Oracle
Maintains accurate TAO/USD pricing by aggregating price submissions from multiple miners. The oracle uses a median-based consensus mechanism to ensure price reliability for the vault system.
Key Activities:
Fetch TAO/USD price from CoinMarketCap API ( Room for improvement for miners)
Submit price data to oracle contract periodically (every 5 minutes)
Participate in multi-reporter consensus rounds
Maintain price accuracy for collateral valuation
Reward Model:
Rewards based on price submission accuracy and timeliness
Consensus participation (submitting prices close to median)
Consistent oracle uptime and reliability
Rewards distributed via
mechid=1weights
System Components
A) Miners
Miners participate in one or both mechanisms to earn TAO emissions.
Mechanism 0 Miner (Liquidation)
Core Responsibilities:
Monitor Auctions: Listen to auction contract events for new liquidations and outbid events
Evaluate Profitability: Calculate expected profit using live collateral price from oracle
Bidding Strategy:
Initial bid: debt × (1 + initial_percentage)
Increment when outbid: current_bid × (1 + increment_rate)
Respect max bid limits and minimum profit margins
Submit Bids: Execute on-chain transactions with hotkey metadata
Token Management: Approve TUSDT spending for auction contract
Configuration Options:
Mechanism 1 Miner (Price Oracle)
Core Responsibilities:
Fetch Market Price: Query CoinMarketCap API for TAO/USD spot price
Format Price: Convert to u128 ratio format (price × 10^18)
Submit to Oracle: Submit price on oracle contract with hotkey metadata
Maintain Uptime: Submit prices at regular intervals (default: 300 seconds)
Monitor Rounds: Track current round ID and submission status
Configuration Options:
B) Validators
Validators ensure correctness and fairness by tracking on-chain activity and distributing rewards appropriately. Each mechanism has its own independent validation and reward calculation logic.
Dual-Mechanism Validation Architecture
Validators run two independent forward passes that sync separately:
Key Features:
Both mechanisms run in parallel
Each mechanism syncs independently when its forward completes
Faster mechanism doesn't wait for slower one
Separate scores for each mechanisms
Mechanism 0 Validator (Liquidation)
Core Responsibilities:
Event Listening: Background thread monitors auction contract events
AuctionCreated: New liquidation auctionsBidPlaced: Miner bids submittedAuctionFinalized: Auction winners determined
Database Persistence: Store auction outcomes in SQLite
Table:
auction_winsSchema: auction_id, vault_id, vault_owner, bidder, hotkey, amount, tempo_block
Reward Calculation (every ~180 blocks):
Query unprocessed wins within tempo window
Calculate per-miner rewards:
Aggregate rewards by hotkey UID
Mark processed wins with current
tempo_block
Weight Setting: set weights with
mechid=0
Mechanism 1 Validator (Price Oracle)
Core Responsibilities:
Round Monitoring: Track oracle contract rounds
Get current round ID via
current_round_id()Monitor round progression and finalization
Submission Tracking: Query price submissions per round
Call
get_round_submissions(round_id)Extract miner hotkeys from submission metadata
Verify submission timeliness and accuracy
Reward Calculation:
Fetch median price for completed rounds via
get_round_price(round_id)Calculate accuracy scores (submissions close to oracle price)
Reward consistent participants
Weight Setting: set weights with
mechid=1
Last updated