hackquest logo

Spike

A quantum-safe, multi-skilled autonomous DeFi AI agent built on the 0G Network

视频

项目图片 1
项目图片 2
项目图片 3

技术栈

React
Next
Web3
Ethers
Node
Solidity
Python

描述

Problem:


AI agents (single or multi-agent orchestrators) are no longer experimental. They already monitor markets 24/7, rebalance portfolios, optimize yields, hedge risks, execute trades, and manage liquidity positions.

Traditional ECDSA signatures (used on Ethereum, 0G's EVM layer, etc.) are vulnerable to future quantum attacks via Shor's algorithm.

Google Quantum AI research (March 2026) shows that breaking elliptic curve cryptography (like secp256k1 used in most blockchains) could require far fewer qubits (~500,000) and run in ~9 minutes

Solution:

Post-Quantum Cryptography

  • ML-DSA-65 (Dilithium3) (NIST FIPS 204) signs every agent action before it is written on-chain

  • ML-KEM-1024 (Kyber-1024) (NIST FIPS 203) + AES-256-GCM encrypts agent configs before upload to 0G Storage

  • Both algorithms run via @noble/post-quantum in the browser — private keys never leave the client in plaintext

  • Key fingerprints are registered on PQCKeyRegistry.sol; the agent checks registration before executing any trade

On-Chain Skill Registry

  • SkillRegistry stores four DeFi skills on-chain: LP Provider, DCA Strategy, Lending/Borrowing, Simulated Trade

  • Users select a skill during the configure wizard; the skillKey (keccak256 of skill ID) is passed to deployAgent

  • AgentRegistry enforces that the skill is active in SkillRegistry at deploy time

Agent NFT (INFT)

  • Every deployed agent mints an ERC-721 AgentNFT that stores the agent's Dilithium fingerprint and skill key

  • tokenURI returns live performance metadata: total actions, success rate, PnL bps, sourced from AgentRegistry

  • PQC-gated transfers: the receiving wallet must have a registered PQC key

Portfolio Optimization

  • services/quantum runs FastAPI + scipy locally — no external service required

  • Portfolio weights use classical Markowitz (SLSQP) with an efficient frontier calculation

  • VaR-95 / CVaR-99 are estimated via Monte Carlo simulation (log-normal, 100k samples)

  • Rebalance trades are selected by a greedy cost-minimizing algorithm

  • Optimization results are cached in 0G Storage KV for 6 hours, keyed by portfolio hash — the agent skips re-running if drift is below driftThreshold

0G Network Integration

  • 0G Storage (@0gfoundation/0g-storage-ts-sdk): stores Kyber-encrypted agent configs and appends immutable audit logs

  • 0G Compute (@0glabs/0g-serving-broker): runs inferMarketRegime to classify the current market as bull / bear / sideways / volatile (requires ZG_INFERENCE_PROVIDER)

  • 0G Chain (EVM, chainId 16602 testnet): five smart contracts govern key registration, attestation, skill catalog, agent NFTs, and lifecycle

本次黑客松进展

- 5 contracts deployed & verified on 0G Testnet (chainId 16602) — PQCKeyRegistry, TeeAttestationVerifier, SkillRegistry, AgentNFT (ERC-7857 INFT), AgentRegistry; all source-verified on chainscan-galileo.

- Full 0G stack integrated — agent configs encrypted with ML-KEM-1024 and stored on 0G Storage, optimization results cached in 0G KV (6hr TTL), market regime classified via 0G Compute LLM, ML-DSA-65 signatures TEE-attested through 0G Compute TeeML and committed on-chain.

- Production deployment live — Next.js frontend on Netlify, FastAPI quantum optimizer on Railway, agent decision loop on Cloudflare Workers; TEE attestation wired end-to-end so deployAgent passes on the deployed version.

融资状态

MVP status

队长
WWan Muhammad Aqil Wan Jaafree
项目链接
部署生态
0G-Galileo-Testnet0G-Galileo-Testnet
赛道
AIDeFiOtherInfra