hackquest logo

Clova

No-loss prize savings on Base, managed by a bounded AI agent — save, never lose your principal, win the combined yield.

비디오

프로젝트 이미지 1
프로젝트 이미지 2
프로젝트 이미지 3

기술 스택

Web3
React
Solidity

설명

# CLOVA — Save. Never lose your principal. Win together.

**A no-loss prize-linked savings dApp on Base, run by an AI agent
that is strictly bounded on-chain.**

🌐 Live app: https://clova-lake.vercel.app/

## The Problem
Three things stop everyday people from growing their savings in DeFi:
1. **Fear of AI** — nobody wants to hand an AI agent the keys to their money.
2. **Complexity** — yield farming, protocol risk, and gas fees are exhausting.
3. **Weak motivation** — DeFi yields are small and feel invisible.

## The Solution
Clova turns saving into a game you can't lose — secured by **bounds,
not trust**. You deposit USDC and it stays in *your own* smart account,
earning yield in audited protocols (Aave). An AI agent (Venice) manages
that yield, but it is **capped on-chain at just 5 USDC** and can never
touch your principal. Each round, everyone's yield is pooled into a
single prize and drawn fairly via Pyth Entropy. Win, and you take the
combined yield. Don't win, and you keep **every cent** of your principal
— withdrawable anytime.

## How a Round Works
1. **Onboard once** — Connect MetaMask, upgrade to a Smart Account
   (EIP-7702), sign ONE bounded permission (ERC-7715), deposit USDC.
2. **Yield accrues** — aTokens earn interest directly in your wallet.
3. **AI evaluates** — Venice + live web search picks the healthiest
   protocol and explains every decision in plain language.
4. **Sweep** — the agent sweeps only the yield (never principal) to the
   prize pool, gaslessly via 1Shot.
5. **Fair draw** — Pyth Entropy selects a provably-fair winner,
   proportional to deposit.
6. **Payout** — winner takes the pooled yield; everyone else's principal
   stays whole.

## What Makes Clova Different
- **Non-custodial** — the agent never holds your funds. A bounded
  delegation lets it move *yield only*; every other action is rejected
  on-chain by MetaMask's DelegationManager.
- **AI judges health, not just APY** — Venice weighs audits, exploits,
  TVL trends and sentiment, not only the highest number.
- **Economic anti-Sybil** — tickets are proportional to deposit, so
  splitting into many wallets gains nothing.
- **Self-funding agent** — it pays for its own Venice calls via x402,
  from a bounded treasury delegation.

## Sponsor Technologies (all live in the main flow)
- **MetaMask Smart Accounts Kit** — ERC-7715 advanced permissions cap
  the agent at 5 USDC; EIP-7702 upgrades the EOA to a smart account.
- **1Shot** — every on-chain action runs through
  `relayer_send7710Transaction` with a 7702 authorization list; gas is
  paid in USDC, so users need zero ETH.
- **Venice AI** — the agent's brain, with live web search; reasoning is
  shown to users in the AI Transparency Panel.
- **x402 + ERC-7710** — the agent settles each Venice call via an x402
  gateway, redeeming a bounded treasury delegation (max 5 USDC) through
  the DelegationManager.
- **Pyth Entropy** — on-chain verifiable randomness for fair draws.

## Security Model
Safety doesn't come from trusting the AI — it comes from limits:
- **Layer 1 (delegation):** MetaMask caps the agent at 5 USDC per permission.
- **Layer 2 (contract):** `depositYield()` reverts if principal is touched.
- **Layer 3 (backend):** the agent only ever sweeps `balance − baseline`.

Users can revoke in one click — the agent's reach drops to zero instantly.

## Links
- 🌐 Live app: https://clova-lake.vercel.app/
- 🎬 Demo video: https://youtu.be/j0jvrqEpPXg
- 📂 Source code: https://github.com/orgs/ClovaRepo/repositories
- ⛓️ Network: Base mainnet

**Bounded by code, not trust.**

해커톤 진행 상황

## Progress During the Hackathon

We built Clova end-to-end during the hackathon — from empty repo to a

live product on Base mainnet.

Smart contracts (Solidity / Foundry)

- ClovaSavingsPool: participant registry, principal baseline tracking,

yield-only sweep guard, fee + prize distribution.

- Aave yield adapter behind a uniform IYieldAdapter interface

(+ Compound & Moonwell adapters for rotation).

- Pyth Entropy integration for provably-fair, proportional draws.

- Full Foundry test suite — including tests that try to BREAK the

caveats (agent touching principal) and assert they revert.

- Deployed to Base Sepolia, then Base mainnet.

Backend agent (Node / TypeScript)

- Signal collector + normalizer (APY/TVL).

- Venice AI reasoner with live web search and safe JSON parsing.

- Guardrail layer (whitelist lock + emergency rules).

- Executor: builds ERC-7710 redeemed executions, sent gaslessly via the

1Shot relayer with EIP-7702 authorization, gas paid in USDC.

- x402 gateway: the agent self-funds Venice calls by redeeming a bounded

treasury delegation through MetaMask's DelegationManager.

- Round scheduler + decision-log API for the transparency panel.

Frontend (Next.js + wagmi)

- Onboarding: connect → EIP-7702 upgrade → ERC-7715 bounded permission

(5 USDC) with human-readable caveats → deposit.

- Dashboard: principal, win-chance, active protocol, fees, withdraw &

revoke (always available).

- AI Transparency Panel showing Venice's reasoning and sources.

- Win history with one-click on-chain verification.

Integrations proven on mainnet

- Real yield sweep via 1Shot (Redeem Delegations, gas in USDC).

- Real x402 + ERC-7710 micropayment for Venice.

- Real Pyth Entropy draw selecting a verifiable winner.

- All four sponsor technologies working in the main demo flow.

자금 모금 상태

None — bootstrapped, hackathon-stage MVP.

팀 리더
DDiva Filemon Manik
프로젝트 링크
배포 생태계
BaseBase
부문
DeFiAI