Aegis Vault
Aegis Vault is a verifiable AI-managed trading vault on 0G where users define strict on-chain risk mandates, operators compete by committing AI models + strategies on-chain, and smart contracts enforc
Videos




Tech Stack
React
Solidity
Ethers
Node
Web3
Description
Aegis Vault is a non-custodial, AI-managed trading vault for crypto assets running on TWO chains: 0G Aristotle Mainnet (real Jaine DEX) and Arbitrum One (real Uniswap V3). Users deposit capital, choose a risk profile, pick an operator from the marketplace, and let the smart contract enforce guardrails on every AI-proposed trade — without ever taking custody of the funds.
Today, anyone who wants AI-driven trading has two bad options. DeFi protocols are trust-minimized but offer no alpha. Centralized AI bots offer alpha but require giving up custody and trusting an off-chain operator. **Aegis Vault is the third option: alpha-seeking strategies with the trust model of DeFi.** The user's funds stay in a smart contract they control. Every AI output is cryptographically bound to its execution via EIP-712 — the vault rejects any trade whose attestation hash doesn't match what the AI actually produced.
## What's contract-enforced
Eleven of fifteen policy fields are enforced directly by the vault: EIP-712 intent hash match, intent expiry, cooldown between trades, AI confidence threshold, max actions per day, assetIn balance, **asset whitelist on both sides of the swap** (post-audit Finding 1 fix), sealed-mode ECDSA verify, commit-reveal anti-MEV, fee caps, and pause guard. Position size, daily loss cap, and stop-loss are currently enforced by the orchestrator as pre-submission validation, roadmapped for on-chain enforcement on Arbitrum first.
## Two audiences (no governance token)
- **Vault owners** pick an operator from the marketplace, set risk profile, deposit. They retain withdrawal rights permanently. Pause / operator-swap / fee-accrual belong to the full fee-bearing vault variant (roadmapped for Arbitrum where gas is plentier).
- **Operators** register on-chain, publish a bonded strategy manifest (keccak256 committed), declare an AI model, post stake in USDC.e. Their manifest, performance history, and slashing record are all on-chain and public. No governance token — protocol revenue flows to a ProtocolTreasury governed by an M-of-N multi-sig.
## Differentiated features
- **Sealed strategy mode** — AI response hash is a field in the EIP-712 ExecutionIntent struct. Vault runs ecrecover against policy.attestedSigner; wrong AI → wrong hash → tx reverts. Commit-reveal anti-MEV is built INTO the vault contract (commit at block N, execute at ≥ N+1).
- **Dual-chain without a bridge** — same AegisVault bytecode on 0G and Arbitrum. EIP-712 block.chainid domain separator is the only cross-chain safety mechanism needed; no bridge contract, no message relayer.
- **Operator marketplace** with bonded manifests, public fee schedules, on-chain reputation, 5 stake tiers (USDC.e-denominated), slashing caps (per-action AND per-rolling-window), 14-day slashable cooldown on unstake.
- **Insurance pool** backstops operator misbehavior beyond individual stake.Progress During Hackathon
Deployed to production on two mainnets from zero, with post-audit hardening and a full technical whitepaper.
### Smart contracts — Track 2 sealed mode + dual-chain
- Sealed strategy mode from scratch: VaultPolicy.sealedMode + attestedSigner, ExecutionIntent.attestationReportHash, commitIntent + executeIntent with commit-reveal + ECDSA verify
- Full EIP-712 typed-data hashing; domain separator binds chainId + vault address for cross-chain replay protection
- 16 KB vault → 3.4 KB via 3 external DELEGATECALL libraries (SealedLib, ExecLib, IOLib) + EIP-1167 minimal-proxy factory (clone cost ~400K gas vs 2.7 MB fresh deploy)
- Post-audit Finding 1 fix: both-sides asset whitelist enforcement in ExecLib — assetIn AND assetOut must appear in vault's allowedAssets or tx reverts
- Post-audit Finding 4 fix: OperatorRegistry address unified across frontend + orchestrator + contracts configs
- **0G Aristotle Mainnet**: 14 contracts live at a fresh deploy, Jaine real venue active (pools ~$1M TVL: USDC.e/W0G $360K, WETH/W0G $278K, WBTC/W0G $189K). Factory 0x7D0D6c77
- **Arbitrum One**: 8 contracts live (execution layer), Uniswap V3 canonical integration. Factory 0x49354460
### Operator marketplace v2
- Extended OperatorRegistry with publishManifest(uri, hash, bonded) + declareAIModel(model, provider, endpoint)
- Frontend: AI model input with live-dropdown suggestions + manual entry fallback + manifest JSON upload with auto-keccak256
- First operator live: Aegis Alpha bot (0x4E08...eC5d) with bonded manifest hash 0xef462f33...79e
### Production-grade orchestrator
- Vault indexer (O(1) lookups, event-driven, persists across restarts)
- Multi-wallet executor pool with NonceManager + deterministic sharding — no nonce collisions across parallel cycles
- Parallel vault processing via p-limit; exponential backoff retry (3x tx, 2x compute); session idempotency
- Post-audit Finding 5 hardening: STRICT_MODE refuses zero-stake operators regardless of contract tier; 0G Storage opt-out gracefully handled
- Per-chain registry scaffold (orchestrator/src/config/chains.js) for future multichain fan-out
- 6 live 0G Compute chatbot services detected, GLM-5-FP8 selected automatically
### Frontend (React 19 + wagmi + viem)
- 6-step Create Vault wizard, chain-aware venue resolver (Jaine on 0G, Uniswap V3 on Arbitrum)
- Operator register flow with AI model + bonded manifest
- Marketplace, Governance M-of-N UI, AI Actions journal
- **In-app whitepaper page** at /whitepaper — editorial markdown rendering, lazy-loaded (zero main-bundle cost)
- Chain-aware faucet: mainnet shows info panel with Jaine/Uniswap swap links + canonical token addresses
- Dead-hook neutering: controls not in slim vault (pause/updatePolicy/fee-accrual) show "not available in this build" toast instead of silent revert
### Frontend UX hardening (kept from prior checkpoint)
- Toast system (sonner), blockchain error parser (lib/txErrors.js), TX phase tracker (lib/txPhase.js), ConfirmModal, NetworkWarning auto-switch, per-wallet draft persistence, real-time manifest JSON validation, multi-phase deploy progress with retry, mobile sticky bar, ARIA across wizard
### CI/CD + Testing + Docs
- Slither static analysis on every push (.github/workflows/security.yml)
- `npx hardhat test` passing 145/152 (7 failures are legacy full-vault tests against slim factory constructor, documented in HACKATHON_SUBMISSION.md)
- Complete docs: README, ARCHITECTURE, DEMO, WHITEPAPER (5000 words, 11 sections), HACKATHON_SUBMISSION, PRE_DEPLOY_CHECKLIST, PITCH_SCRIPT, OPERATOR_GUIDE, STRATEGY_MANIFEST, AI_AGENT_DECISION_FLOW
- Architecture diagram: docs/diagrams/architecture-multichain.svg + 1920×1080 PNG
### Metrics (refreshed)
- 22 smart contracts live across two mainnets (14 on 0G, 8 on Arbitrum)
- 1 operator registered with bonded slashable manifest on 0G
- 1 sealed-mode vault holding real USDC.e on 0G (0xAEDAc17B...)
- Multiple verified on-chain executions (historical + current)
- Full technical whitepaper shippedFundraising Status
**Current status:** 🟡 Not actively fundraising. Bootstrapped through hackathon.
**Team & funding context:**
- **Solo builder** (self-funded, hackathon-bootstrapped)
- **Built from scratch during hackathon** — no prior codebase, no grants, no pre-committed capital
- **Gas costs self-covered** (~7 0G for full mainnet deploy + testing)
- **No token planned** — protocol revenue flows to `ProtocolTreasury` contract, governed by M-of-N multi-sig; intended for audit costs, bug bounties, insurance pool top-ups
**What seed funding would enable (if/when raised):**
| Priority | Item | Estimated cost |
|---|---|---|
| 1 | Smart contract audit (Certik / OpenZeppelin / Trail of Bits) | $30–80k |
| 2 | Insurance underwriting (Nexus Mutual or native pool capitalization) | $50–200k |
| 3 | Dedicated orchestrator infrastructure (multi-region, monitoring, SLA) | $30k/yr |
| 4 | Frontend redesign + compliance review for regulated capital access | $40k |
| 5 | Operator bootstrap grants (pay first 5 operators to run orchestrators) | $50k |
| 6 | Community + developer relations | $30k/yr |
**Total target seed raise:** $500k–$1M — to ship Aegis to audited, insured, institutional-grade production.
**Asks from 0G Foundation / hackathon organizers:**
- Dedicated 0G RPC endpoint for orchestrator (current public RPC has reliability issues)
- Access to TEE-attested 0G Compute providers (for genuine hardware-grade sealed mode)
- Feedback on vault factory gas patterns (block gas limit fluctuations caused deployment challenges)
- Connection to ecosystem insurance partners if/when we mature
**Open to:**
- Ecosystem grants (builds-on-0G grants, Track 2 winner prize)
- Strategic angel investors (DeFi operators, TradFi hedge funds exploring AI vaults)
- Technical partnerships (Gelato for keeper network, The Graph for subgraph indexing, Pyth for extended oracle coverage)
**Not open to:**
- Extractive token launches
- Retail-only accelerators without regulatory support
- Anything that would compromise the "contract enforces" trust model
**Timeline:**
- **Short-term** (4 weeks post-hackathon): polish, public beta with 3 whitelisted operators, first external deposits
- **Medium-term** (3 months): smart contract audit, launch ERC-4626 vault shares, strategy template registry
- **Long-term** (6–12 months): seed fundraise conditional on traction (TVL > $1M, >10 active operators, audit-clean report)