HashClawHashClaw
TestnetFaucet
HashKey Chain · RWA Portfolio Manager

Autonomous wealth
management, on-chain.

HashClaw monitors your RWA portfolio around the clock and rebalances when drift exceeds threshold — using live yield signals and AI-optimised swap legs.

About

AI-managed RWA portfolios on HashKey Chain

HashClaw is a non-custodial autonomous wealth manager built for HashKey Chain's RWA ecosystem. It combines real-time yield oracle data with Groq AI to keep your portfolio at optimal allocations — without you lifting a finger.

4Managed Assets
5%Drift Threshold
12.4%Peak APY (veHSK)
60sMin Cooldown
How it works

AI rebalancing for RWA portfolios

Connect your MetaMask wallet on HashKey Chain. Deposit assets into TreasuryVault to begin automated portfolio management under target allocations.

TreasuryVault
assetId: 0 · amount: 100.0000
Vault credited
01Connect & Deposit
02AI Monitors Drift
03Groq Decides Optimal Legs
04Sign & Execute On-Chain
Connect & Deposit
deposit.ts
1import { ethers } from 'ethers';
2
3const provider = new ethers.BrowserProvider(window.ethereum);
4const signer = await provider.getSigner();
5
6const vault = new ethers.Contract(
7 VAULT_ADDRESS,
8 VAULT_ABI,
9 signer
10);
11
12// Deposit xXAG into vault
13const tx = await vault.deposit(
14 0, // assetId: xXAG
15 ethers.parseEther("100") // amount
16);
17await tx.wait();
18console.log('Deposited into TreasuryVault');
Architecture

HashClaw Architecture

01.

Treasury Vault

User Portfolio Layer

Users deposit RWA assets into TreasuryVault. The contract tracks balances per assetId and exposes getPortfolio() for the agent to read live allocations without moving real tokens.

TreasuryVault.sol

function getPortfolio(address user)

view returns (

uint256[] assetIds,

uint256[] balances,

string[] symbols

)

{

// reads userBalances mapping

return _buildPortfolio(user);

}

02.

Yield Oracle

Signal Layer

YieldOracle stores live APY data for all 4 vault assets (in basis points). The owner seeds it after deployment; the agent and frontend read getAllApys() in every rebalance cycle.

xXAG4.8%
veHSK12.4%
xMMF5.2%
On-Chain APY Registry
03.

Rebalance Executor

Execution Layer

RebalanceExecutor accepts signed swap legs from either the background agent or the user's own wallet. It calls debitBalance on the vault for each leg and emits PlanSubmitted for full on-chain auditability.

RebalanceExecutor.sol

// multi-user: agent OR self

require(

msg.sender == user

|| msg.sender == owner(),

"Unauthorized"

);

// pure accounting swap

vault.debitBalance(user, from, amt);

vault.creditBalance(user, to, amt);

emit PlanSubmitted(planId, user);

Quick start

Running in
minutes

terminal
$ git clone https://github.com/anbusan19/hashclaw
$ cd hashclaw
$ pnpm install

# Set env vars
$ cp .env.example .env
$ export HASHKEY_RPC_URL=https://testnet.hsk.xyz
$ export GROQ_API_KEY=your_groq_key
$ export PRIVATE_KEY=0xYOUR_KEY

✔ Dependencies installed

Installation

$ pnpm install

Networks

HashKey Testnet
HashKey Mainnet
Launch App

AI-Optimised Rebalancing

Groq's Llama-3.3-70b weighs live APYs against target allocations. A safety guard ensures every leg reduces drift — never increases it.

GroqLlama-3.3-70b

On-Chain Audit Trail

Every rebalance plan is recorded on-chain via PlanSubmitted events. The Agent Logs page lets anyone verify the full history with explorer links.

✓ PlanSubmitted emitted
✓ Reasoning stored on-chain
Verifiable on HashKey Explorer
FAQ

Frequently
asked
questions

Launch App