Loops HouseGAINZ — Guard AI NEAR ZK

NEAR HACKATHON
Team
1 member- SEOwner
Serg(MemGo)
Overview
GAINZ (Guard AI NEAR ZK) is a trustless, Rust-native onchain security firewall, Noir Zero-Knowledge policy engine, and MCP server that lets autonomous AI agents spend money on NEAR without giving them the keys to drain the treasury.
WHY GAINZ IS DIFFERENT Unlike centralized offchain proxies that still hold raw treasury keys on a server, GAINZ enforces all rules natively onchain. Even if the AI model or MCP server is compromised via prompt injection, the NEAR blockchain physically rejects unauthorized transfers.
WHAT WE BUILT
- GuardVault Smart Contract (Rust / near-sdk): An on-chain treasury vault enforcing hard per-transaction caps, rolling 24-hour spending limits, and recipient whitelists. The AI agent operates strictly via a scoped NEAR Function Call Access Key and cannot bypass the contract.
- Private Corporate Policies via Noir ZK Circuits: Agents generate zero-knowledge proofs confirming a transaction complies with spending rules without exposing sensitive limits or budgets publicly onchain.
- Immutable IPLD Audit Trail: Every agent intent and execution trace is hashed into a deterministic IPLD CIDv1 and anchored on-chain alongside the ZK proof hash.
- Rust MCP Server + Cerebras Integration: A Model Context Protocol (stdio + CLI demo) server compatible with Claude Desktop, Claude Code, and Cursor, paired with ultra-fast Cerebras inference.
VERIFICATION & TESTING
Includes full near-workspaces sandbox integration tests (cargo test) and a 1-command CLI demo (cargo run -p near_guard_mcp -- --demo) demonstrating valid API billing vs. real-time blocking of a prompt-injection wallet drain.