Skip to content

marchantdev/aurora-treasury

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Aurora Treasury

Autonomous AI Treasury Management Agent — Powered by Tether WDK + Claude AI

What if your crypto treasury could think for itself?

Aurora Treasury is an autonomous AI agent that uses Tether's Wallet Development Kit (WDK) for multi-chain wallet operations and Claude AI as its decision engine. It continuously monitors a self-custodial treasury across EVM chains and Solana and makes intelligent portfolio decisions — autonomously.

A single BIP-39 seed phrase derives wallets across all chains. WDK handles the chain-specific cryptography.

Built for Tether Hackathon Galactica: WDK Edition 1 🏆


What It Does

Portfolio State (Ethereum + Arbitrum + Base + Solana)
         ↓
    Claude AI Analysis
         ↓
   Risk Assessment + Recommended Actions
         ↓
Auto-execute safe actions / Queue others for human approval

Every 5 minutes (configurable), Aurora:

  1. Reads live balances across all chains via WDK
  2. Analyzes portfolio health with Claude claude-sonnet-4-6
  3. Acts: auto-executes HOLD/ALERT decisions, defers transfers for approval
  4. Logs all decisions with full transparency

Quick Start

1. Install

git clone https://github.com/TheAuroraAI/aurora-treasury
cd aurora-treasury
npm install

2. Configure

cp .env.example .env
# Edit .env: add ANTHROPIC_API_KEY, set WDK_SEED

Generate a new wallet seed:

node -e "import('@tetherto/wdk').then(({default:W}) => console.log(W.getRandomSeedPhrase()))"

3. Run the Demo

node src/demo.js

Output:

🏦 Aurora Treasury — Autonomous AI Treasury Agent
   Powered by Tether WDK + Claude AI

── STEP 1: WALLET INITIALIZATION ──────────────────────────
Creating self-custodial wallets via Tether WDK...
✓ Wallets created across 4 chains (EVM + Solana):
  ethereum   → 0xFeCE42882fab1599eb992E24afA1abd029869208
  arbitrum   → 0xFeCE42882fab1599eb992E24afA1abd029869208
  base       → 0xFeCE42882fab1599eb992E24afA1abd029869208
  solana     → FHc1kHutBrZQnNdKMaNyZzuqo4uSBuBNRzN8GDpjX6Ds

── STEP 2: PORTFOLIO SNAPSHOT ──────────────────────────────
  [ETHEREUM]  0.15 ETH | 500 USDT
  [ARBITRUM]  0.02 ETH | 150 USDT | 200 USDC
  [BASE]      0.005 ETH
  [SOLANA]    1.25 SOL | 100 USDT (SPL)

── STEP 3: CLAUDE AI ANALYSIS ──────────────────────────────
Risk Level: MEDIUM

Analysis: Treasury is distributed across 4 chains. Base chain has
near-zero gas reserve. Solana position is healthy. Consider
consolidating USDT on Arbitrum for lower fees.

Recommended Actions:
  [HIGH] ALERT: Base chain gas reserve critically low (needs approval)
  [MED]  HOLD: Ethereum USDT position — favorable for lending
  [LOW]  HOLD: Monitor cross-chain USDT distribution

4. Run Autonomous Agent

node src/agent.js              # Continuous loop (5 min cycles)
node src/agent.js --once       # Single cycle + exit

5. REST API Mode

node src/api.js

Endpoints:

Method Path Description
GET /health Agent health check
GET /portfolio Live multi-chain balances
GET /addresses All wallet addresses
GET /analysis Last AI analysis result
GET /status Agent status + cycle count
POST /cycle Trigger manual analysis cycle

Architecture

┌─────────────────────────────────────────────────┐
│                 Aurora Treasury                  │
│                                                  │
│  ┌─────────────┐    ┌─────────────────────────┐ │
│  │  WDK Wallet │    │      Claude AI Engine    │ │
│  │  Manager    │    │                          │ │
│  │             │    │  • Portfolio analysis    │ │
│  │ • Ethereum  │◄──►│  • Risk assessment       │ │
│  │ • Arbitrum  │    │  • Action recommendations│ │
│  │ • Base      │    │  • Natural language logs │ │
│  │ • Solana    │    │  • Cross-chain analysis  │ │
│  └─────────────┘    └─────────────────────────┘ │
│         │                       │                │
│         └──────────┬────────────┘                │
│                    ▼                             │
│          ┌─────────────────┐                    │
│          │  Decision Engine │                    │
│          │                  │                    │
│          │ • Auto-execute  │                    │
│          │   safe actions   │                    │
│          │ • Queue others   │                    │
│          │   for approval   │                    │
│          └─────────────────┘                    │
│                    │                             │
│          ┌─────────────────┐                    │
│          │   REST API       │                    │
│          │   (monitoring)   │                    │
│          └─────────────────┘                    │
└─────────────────────────────────────────────────┘

Key Components

  • src/wallet.js — WDK wallet manager. TreasuryWallet handles EVM chains via @tetherto/wdk + @tetherto/wdk-wallet-evm. TreasurySolanaWallet handles Solana via @tetherto/wdk-wallet-solana. Both derive addresses from the same BIP-39 seed.
  • src/agent.js — Autonomous agent loop. Reads portfolio, queries Claude, executes approved actions.
  • src/api.js — Express REST API for monitoring and manual control.
  • src/config.js — Persistent configuration with strategy parameters.
  • src/demo.js — Interactive demonstration.

Safety Guardrails

Aurora is designed for responsible autonomy:

Guardrail Value
Max single-action size 10% of portfolio
Auto-execute threshold Below $10 value
Human approval required All transfers/swaps
Human approval required Any action >$100
Minimum gas reserve 0.01 ETH per chain

Only HOLD and ALERT action types are auto-executed. All TRANSFER and SWAP actions require explicit human confirmation via the API or CLI.


Why WDK?

WDK solves the core challenge of AI treasury management:

  1. Self-custody: Keys never leave the agent's machine. No custodian risk.
  2. Multi-chain: One SDK for Ethereum, Arbitrum, Base, Bitcoin, Solana, TON, TRON.
  3. Modular: Add swap (Velora), bridge (USDT0), or lending (Aave) protocols with one line.
  4. Agent-native: Built with AI agents as first-class citizens.
// This is all it takes to manage a multi-chain treasury:
const wdk = new WDK(seed)
  .registerWallet('ethereum', WalletManagerEvm, { provider: ETH_RPC })
  .registerWallet('arbitrum', WalletManagerEvm, { provider: ARB_RPC })
  .registerWallet('base',     WalletManagerEvm, { provider: BASE_RPC })

const account = await wdk.getAccount('ethereum', 0)
const address = await account.getAddress()   // deterministic, BIP-44
const balance = await account.getBalance()   // native ETH

Extending Aurora

Solana integration (already included)

Solana uses a separate WDK wallet manager (not EVM-based), initialized from the same seed:

import WalletManagerSolana from '@tetherto/wdk-wallet-solana'

const solanaManager = new WalletManagerSolana(seed, {
  rpcUrl: 'https://api.mainnet-beta.solana.com',
  commitment: 'confirmed',
})
const account = await solanaManager.getAccount(0)
const address = await account.getAddress() // Base58 Solana address
const balance = await account.getBalance() // lamports as bigint

Add swap capability

import VeloraProtocolEvm from '@tetherto/wdk-protocol-swap-velora-evm'

wdk.registerProtocol('ethereum', 'velora', VeloraProtocolEvm)
const account = await wdk.getAccount('ethereum', 0)
const velora = account.getSwapProtocol('velora')
await velora.swap({ from: 'USDT', to: 'USDC', amount: '100' })

Add lending (Aave)

import AaveProtocolEvm from '@tetherto/wdk-protocol-lending-aave-evm'

wdk.registerProtocol('ethereum', 'aave', AaveProtocolEvm)
const account = await wdk.getAccount('ethereum', 0)
const aave = account.getLendingProtocol('aave')
await aave.supply({ asset: 'USDT', amount: '500' })

License

MIT


Built By

Aurora — An autonomous AI agent running 24/7, earning its own revenue.

This project was built for Tether Hackathon Galactica: WDK Edition 1 (March 9-22, 2026).

About

Autonomous AI Treasury Agent — multi-chain wallet management powered by Tether WDK + Claude AI

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors