Skip to content

Repository files navigation

omnitao logo

omnitao

Cross-chain terminal for moving capital into Bittensor and across Bittensor assets

What Is omnitao? · How It Works · Quick Start · Environment Variables · Architecture

omnitao.mp4

What Is omnitao?

omnitao is a bridge-first interface for the Bittensor ecosystem.

It lets you move from EVM assets into Bittensor-native assets and subnet alpha positions without forcing users through separate bridge tools, manual wrapping flows, or Substrate wallet UX.

Examples of what omnitao can do:

  • USDC on Base -> Quasar subnet token on Bittensor
  • TAO <-> vTAO on Bittensor EVM
  • alpha -> USDC / ETH / other destination token on Base
  • cross-chain swaps powered by LI.FI even when Bittensor is not involved

The product goal is simple: make complex Bittensor capital movement feel like one guided route instead of a sequence of disconnected tools.

How It Works

Core inbound path:

Any EVM Chain / Solana ──[LI.FI]──> vTAO (Base)
                                     ↓ LayerZero OFT send
                                vTAO (Bittensor EVM, chain 964)
                                     ↓ unwrap / unstake
                                TAO (Bittensor EVM)
                                     ↓ addStake(hotkey, amount, netuid)
                                Alpha Token (selected subnet)

Reverse path examples:

  • alpha -> TAO on Bittensor EVM
  • alpha -> USDC / ETH / other destination token on Base
  • vTAO -> destination token on Base

Under the hood, omnitao composes:

  • LI.FI for cross-chain swap routing
  • LayerZero OFT for Base <-> Bittensor EVM bridging
  • Bittensor EVM contracts and staking precompiles for wrap, unwrap, stake, unstake, and move-stake flows

Current Capabilities

  • Route from EVM assets and Solana into Bittensor assets
  • Stake into subnet alpha from the app
  • Unstake alpha back to TAO
  • Reverse bridge from alpha or vTAO into destination EVM tokens
  • Show estimated outputs, USD values, and destination balances in the swap UI
  • Reserve TAO gas dynamically for Bittensor EVM routes to reduce wallet-level failures

Quick Start

pnpm install
cp .env.example .env.local
pnpm dev

Then open http://localhost:3000.

If you are just trying the UI locally, start with:

  • WalletConnect project ID
  • CoinGecko API key

If you want gas-drip behavior available during local testing, also configure the drip wallet private key.

Environment Variables

Copy .env.example to .env.local and fill in the values you need:

NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID=
COINGECKO_API_KEY=
GAS_DRIP_PRIVATE_KEY=0x<hex-private-key>

Optional overrides:

# GAS_DRIP_AMOUNT_WEI=2000000000000000
# GAS_DRIP_THRESHOLD_WEI=2000000000000000

Notes:

  • NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID: from cloud.walletconnect.com
  • COINGECKO_API_KEY: used for the TAO/USD price feed
  • GAS_DRIP_PRIVATE_KEY: server-side only, never expose it as a public env var

TAOSTATS_API_KEY is no longer required in the current app flow.

Scripts

Script Description
pnpm dev Run the Next.js app locally
pnpm build Build for production
pnpm start Start the production build
pnpm lint Run ESLint
pnpm test Run the project test suite
pnpm type-check Run TypeScript type-checking

Local Notes

When testing bridge flows locally:

  • some routes depend on live wallet state and live quote timing
  • Bittensor EVM gas requirements can change as route estimates update
  • the first wallet popup can sometimes be delayed because route preparation and fee quoting happen before the first transaction is spawned

For the smoothest local testing:

  • keep a small TAO balance on chain 964 for gas
  • keep some ETH on Base when testing Base-side swap or bridge steps
  • use the app's warnings and reserve hints as dynamic guidance, not fixed constants

Architecture

omnitao is a Next.js app that builds a unified route model across several asset families:

  • EVM tokens
  • TAO and vTAO on Bittensor EVM
  • subnet alpha positions
  • aggregated subnet positions

Main pieces:

  • Route selection: hooks/useUnifiedRoute.ts
  • Execution orchestration: hooks/useUnifiedExecution.ts, hooks/useStepExecution.ts, hooks/useReverseStepExecution.ts
  • Bittensor-specific execution helpers: lib/bridge.ts, lib/staking-precompile.ts
  • UI swap surface: components/bridge/SwapCard.tsx, components/bridge/UnifiedPicker.tsx
  • Preflight + gas reserve logic: hooks/usePreflightWarnings.ts, lib/bittensor-gas-reserve.ts

Key Contracts

Contract Chain Address
Staking Precompile V2 Bittensor EVM (964) 0x0000000000000000000000000000000000000805
vTAO OFT Base (8453) 0xe9f6D9898f9269B519E1435E6ebafF766c7f46BF
vTAO OFTAdapter Bittensor EVM (964) 0x79ce842deaa61d7668a2f31d964502f0d777ba89
vTAO ERC20 Bittensor EVM (964) 0x31049849ccdd983d8f401077537438eaf12b12af

Project Structure

app/                          Next.js App Router
components/
  bridge/                     Swap UI, pickers, route preview, execution panels
  ui/                         Shared UI primitives
config/
  chains.ts                   Chain config including Bittensor EVM
  contracts.ts                Contract and protocol addresses
hooks/
  useUnifiedRoute.ts          Unified route derivation
  useUnifiedExecution.ts      Route-type execution dispatcher
  usePreflightWarnings.ts     Validation and warning generation
lib/
  bridge.ts                   LayerZero bridge transaction builders
  route-engine.ts             Route models and fee helpers
  staking-precompile.ts       Stake / unstake / move-stake helpers
  bittensor-gas-reserve.ts    Dynamic chain-964 reserve logic
public/
  logo.png                    README / branding asset
  omnitao.mp4                 Demo video
docs/
  superpowers/                Specs and execution plans

Fee Model

omnitao is configured to charge a 0.5% integrator fee on LI.FI swap legs.

In practice, the total cost a user sees on LI.FI-routed legs also includes protocol and gas costs from the underlying route. The integrator fee is only one component of the total route cost.

Status

omnitao is an active working prototype / MVP with live routing, execution flows, and ongoing UX iteration.

Recent areas of work include:

  • unified output amount and balance display
  • aggregated reverse-bridge output fixes
  • dynamic Bittensor EVM gas reserve handling
  • clearer preflight messaging for vTAO and other chain-964 routes

The README is product-facing, but the codebase is still moving quickly. If something feels inconsistent, the latest behavior in the app and code should be treated as the source of truth.

About

omnitao is a crosschain bridge enabling seamless swaps between EVM chains and Bittensor subnets - no new wallets or CEXs required.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages