Skip to content

About

Autonomous AI portfolio manager on Circle Arc — for Agora Agents Hackathon

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

13 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sumplus Vault

Wall Street has risk officers. Crypto whales have ops teams. Everyone else? They click and pray.

Sumplus Vault changes that — autonomous AI portfolio management, guarded by your own policy, settled on Arc.

An institutional-grade autonomous portfolio manager, accessible to everyone, built for Circle Arc — the stablecoin-native L1.

Submission to the Agora Agents Hackathon (Builder Series) — RFB 04 — Adaptive Portfolio Manager.

🟢 Live demo: sumplus-vault.vercel.app · contracts on Arc testnet · 57 tests green 📺 Walkthrough video: see submission · 🛠 Starter kit for Arc agent builders: docs/starter-kit.md


🛠 Use this as an Arc agent starter kit

If you're building an AI agent that touches an Arc vault and needs enforced guardrails, fork this repo and lift any of the three reusable primitives we extracted as standalone modules:

Primitive What it gives you Where to copy from
PolicyVault pattern Single execute(target, data, expectedPolicyHash, ...) entrypoint that reverts on policy-hash mismatch — so an agent literally cannot bypass user rules. contracts/src/SumplusVault.sol
Action-intent gating Policy rules opt into bypass for specific intents (e.g. emergency_unwind skips cooldowns; rebalance doesn't). The "fire-truck rule" for agents that need both routine + crisis behavior. backend/src/maria/
Provider-agnostic LLM reasoner Decisions are deterministic; the LLM only writes the explanation prose. Drop-in compatible with any OpenAI-protocol endpoint. backend/src/llm/reasoner.ts

Why standalone: every module has zero Sumplus-specific dependencies and ships with its own tests. Read docs/starter-kit.md for a 5-minute fork-and-build guide.


What it does

You deposit USDC. You configure your own risk policy (max drawdown, asset whitelist, trade size limits, protocol blocklist). An AI agent monitors the market, rebalances your vault between USDC, wstETH, and USYC (Circle's yield-bearing stablecoin) — and every action it proposes runs through your policy first. If the action would violate your rules, it is blocked at the vault contract level.

Every decision lands on Arc with sub-second finality, paid in USDC gas, with a tamper-proof audit trail.

Three states the AI brain knows

State When Allocation (USDC / wstETH / USYC)
Risk-on Low volatility, drawdown < 5% 60 / 25 / 15
Risk-off High volatility OR drawdown > 10% 40 / 0 / 60
Black-swan Drawdown > 15% (policy auto-trigger) 0 / 0 / 100

The black-swan transition completes in under one second on Arc, vs. ~3 minutes and $400+ gas on Ethereum mainnet. This isn't a nice-to-have — it's the difference between saving 15% of capital and saving zero.


Architecture

                    ┌──────────────────────────────────────┐
                    │       User (deposits USDC, sets       │
                    │           policy on-chain)            │
                    └─────────────────┬────────────────────┘
                                      │
                    ┌─────────────────▼────────────────────┐
                    │         SumplusVault.sol              │
                    │  - holds user USDC + assets           │
                    │  - execute(action, policyHash)        │
                    │  - reverts if policy hash mismatch    │
                    └─────────────────┬────────────────────┘
                                      │ emits AuditEvent
                                      │
              ┌───────────────────────┼────────────────────────────┐
              │                       │                            │
   ┌──────────▼─────────┐   ┌────────▼──────────┐    ┌────────────▼─────────┐
   │  Maria Policy      │   │  Strategy Brain   │    │  Arsenal Skills      │
   │  (off-chain, TS)   │   │  (3-state engine) │    │  - rebalance         │
   │  - 5 rule classes  │   │  + LLM reasoning  │    │  - emergency_unwind  │
   │  - hash-bound      │   │                   │    │                      │
   └────────────────────┘   └───────────────────┘    └──────────────────────┘
              │
              │ all validated actions emit on-chain audit event
              │
   ┌──────────▼──────────────────────────────────────────────────────────┐
   │                       Arc Testnet (chain 5042002)                    │
   │   sub-second finality · USDC native gas · CCTP-ready                 │
   └──────────────────────────────────────────────────────────────────────┘

Three Sumplus subsystems power the vault:

  • Maria — policy guardrail (compliance layer originally built for institutional Sumplus customers)
  • Arsenal — skill library (composable on-chain action primitives)
  • IAA — audit framework (intent + action + audit log)

The vault is the first user-facing externalization of all three.


Repository layout

contracts/   Foundry — SumplusVault.sol, PolicyRegistry, mock tokens, oracle, swap
backend/     TypeScript — Maria engine, Strategy Brain, Arsenal skills, agent loop
frontend/    Next.js — deposit/withdraw, policy config, decision timeline, demo console
docs/        Architecture notes, Arc testnet reference, design decisions
scripts/     Deploy + seed + black-swan injection

Quickstart (will be filled out as we build)

# 1. Smart contracts
cd contracts && forge install && forge test && forge script ScriptDeploy --rpc-url $ARC_RPC --broadcast

# 2. Backend agent
cd backend && pnpm install && pnpm dev

# 3. Frontend
cd frontend && pnpm install && pnpm dev

Status

🚧 Active development for Agora Agents Hackathon submission. Submitting early and iterating. Live demo URL + Loom video posted as soon as v1 lands.

License

MIT — to be added.

About

Autonomous AI portfolio manager on Circle Arc — for Agora Agents Hackathon

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages