Winner of the Quack x ChainGPT Super Web3 Agent Bounty.
Vibe Quack is a fully autonomous, gas-sponsored AI Agent. It allows users to Research, Architect, Audit, and Deploy smart contracts via natural language—without ever paying gas fees or exposing private keys. It implements the Quack x402 Protocol to enforce strict policies and secure signatures.
We have implemented 100% of the hackathon requirements:
| Requirement | Implementation Status | Features Used |
|---|---|---|
| ChainGPT Integration | ✅ DONE | Used general_assistant (Research), smart_contract_generator (Architect), and smart_contract_auditor. |
| Quack x402 Protocol | ✅ DONE | Full implementation of HTTP 402 Payment Required, EIP-712 Witness signing, and X-PAYMENT headers. |
| Gas Sponsored | ✅ DONE | User pays 0 BNB. The Agent's Treasury sponsors all deployment and transfer fees. |
| Policy Protected | ✅ DONE | "Policy Engine" enforces Allow/Deny lists and Spend Caps (< 0.05 BNB). |
| Executions (Min 2) | ✅ DONE | 1. Deploy Contract (Hardhat) 2. Fund Contract (Native Transfer). |
| Safety Features | ✅ DONE | Human-readable Transaction Previews, Audit Warnings, Mainnet Safety Locks. |
Vibe Quack is built on a Next.js backend that acts as a secure orchestrator between the User, AI, and Blockchain.
graph TD
User[User Wallet] -->|1. Chat Prompt| UI[Next.js Frontend]
UI -->|2. Request Action| API[Agent API Route]
API -- 402 Payment Required --> UI
UI -- 3. Sign EIP-712 --> User
User -- 4. X-PAYMENT Header --> API
subgraph "Server Side (The Brain)"
API -->|Verify Sig| Q402[Quack Library]
Q402 -->|Check Policy| Policy[Policy Engine]
API -->|Generate/Audit| CGPT[ChainGPT API]
API -->|Execute| HH[Hardhat / Viem]
end
HH -->|Sponsor Gas| BNB[BNB Chain]
- Architect Mode: Uses ChainGPT to generate production-ready Solidity code. Automatically cleans markdown and prepares code for compilation.
- Researcher Mode: A dedicated interface for general Web3 questions (e.g., "What is Uniswap?"), powered by the ChainGPT Web3 LLM.
- Security First: Integrated One-Click Audit. The Agent refuses to deploy without a warning if the code hasn't been audited.
We didn't just mock it; we built a Real Q402 Payment Gate:
- Interception: API returns HTTP
402 Payment Required. - Witness: Frontend constructs an EIP-712 Witness object.
- Signing: User signs the witness via Metamask (No gas, just signature).
- Verification: Server verifies the signature using
viembefore executing logic.
The Agent has its own treasury (PRIVATE_KEY) but is governed by strict code policies:
- Spend Cap: Automatically rejects any transaction estimated to cost > 0.05 BNB.
- Deny List: Blocks interaction from blacklisted wallet addresses.
- Network Toggle: Safety switch to prevent accidental Mainnet deployments.
- Node.js v18+
- A Wallet (Metamask/Rabby)
- ChainGPT API Key
- Wallet Private Key (To act as the Agent's Treasury)
-
Clone the Repo
git clone https://github.com/its-mc/VibeQuack.git cd vibe-quack -
Install Dependencies
npm install
-
Configure Environment Create a
.envfile in the root directory:CHAINGPT_API_KEY=your_chaingpt_key PRIVATE_KEY=0x_your_agent_wallet_private_key
-
Run Development Server
npm run dev
-
Open App Navigate to
http://localhost:3000.
- Connect Wallet: Click "Connect" to authenticate (Policy Check).
- Researcher: Switch to Researcher Mode and ask "What is PancakeSwap?".
- Architect: Switch to Architect Mode.
- Generate: Type "Create a memecoin named QuackCoin".
- Audit: Click 🛡️ AUDIT.
- Observation: You will be prompted to sign an EIP-712 Message (Q402 Protocol).
- Deploy: Click 🚀 DEPLOY.
- Observation: The Agent pays the gas. You pay nothing.
- Fund: Click 💸 FUND CONTRACT.
- The Agent sends 0.001 BNB to your new contract to bootstrap liquidity.
- Framework: Next.js 14 (App Router)
- AI: ChainGPT SDK & API
- Blockchain: Hardhat, Viem, Ethers.js
- Networks: BNB Smart Chain (Testnet & Mainnet)
- Styling: Tailwind CSS
Built with 🦆 for the Quack x ChainGPT Hackathon.