Technical Overview
The bi-directional bridge between Bittensor and Solana is designed to enable seamless transfer of assets and interoperability between the two blockchain ecosystems. It provides users with the ability to transfer TAO tokens from Bittensor to Solana and convert them into wrapped TAO (wTAO) for use in Solana’s ecosystem and vice versa. This highly technical system incorporates secure bridging protocols, robust backend logic, and comprehensive token management.
Bridge Architecture
1. Core Components
Lock-and-Mint Mechanism:
TAO tokens are locked in a Bittensor wallet, triggering the minting of an equivalent amount of wTAO on Solana.
wTAO tokens are burned on Solana when transferring back to Bittensor, unlocking the equivalent amount of TAO.
Proxy Wallet System:
A proxy wallet is created on Bittensor for each Solana user during their first connection. This proxy wallet manages the locked TAO tokens for bridging operations.
Centralized Bridge Administration (v1):
The bridge is initially centralized, with admins manually approving transactions to ensure operational reliability and flexibility in the early stages.
2. Smart Contract Design
Bittensor Smart Contract:
Implements lock functionality for incoming TAO tokens.
Emits events to notify the backend when tokens are locked for bridging.
Solana Smart Contract:
Handles the minting and burning of wTAO tokens.
Maintains mapping of Solana and proxy Bittensor wallet addresses for user association.
3. Backend Infrastructure
Transaction Monitoring:
Monitors incoming TAO transfers to proxy wallets and wTAO transfers to the Solana smart contract.
Tracks transaction status (Pending, Successful, Failed/Canceled).
Approval and Execution:
Admin dashboard allows for manual approval or cancellation of bridge transactions.
Executes token transfers, minting, or burning based on admin actions.
Fee Calculation:
Dynamically calculates fees for gas and platform services, ensuring users are charged fairly.
Supports indirect fee payment through locked or burned tokens.
Workflow
Bittensor to Solana
TAO Lock:
User sends TAO tokens to their proxy wallet address on Bittensor.
Proxy wallet locks the tokens and emits an event to the backend.
Admin Approval:
Admin verifies and approves the transaction via the dashboard.
Backend transfers TAO to the main platform wallet and mints wTAO on Solana.
wTAO Distribution:
wTAO tokens are sent to the user’s Solana wallet, completing the transfer.
Solana to Bittensor
wTAO Burn:
User sends wTAO tokens to the burn contract on Solana.
Smart contract emits an event to the backend for transaction processing.
Admin Approval:
Admin approves the transaction, triggering backend logic to unlock and transfer TAO from the platform wallet to the user’s Bittensor wallet.
Security and Reliability
Transaction Integrity:
Event-driven architecture ensures accurate and reliable processing of token transfers.
Centralized Control (v1):
Manual approval by admins reduces risks during the initial deployment phase.
Cryptographic Safeguards:
Secure private key management for proxy wallets and smart contracts.
DDoS and vulnerability protection for the backend infrastructure.
Roadmap for Future Enhancements
Automation:
Transition to a fully decentralized, automated bridge system using smart contracts for approval and execution in v1.5.
Scalability:
Optimize gas usage and transaction throughput to reduce costs and latency.
Last updated