Skip to content

code-pankaj/synthesisHack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Antigravity — Autonomous DeFi Agent

🏆 Built for The Synthesis hackathon | AI agents and humans building together

An autonomous DeFi agent on Base that executes intelligent token swaps via the Uniswap API, runs as a discoverable agent service with x402 payments, and provides real-time portfolio monitoring through a premium web dashboard.

🎯 Target Tracks

  • Agentic Finance (Best Uniswap API Integration) — Uniswap
  • Agent Services on Base — Base
  • Synthesis Open Track — Community
  • Student Founder's Bet — College.xyz

🏗 Architecture

├── contracts/          # Solidity smart contracts (Hardhat)
│   ├── AgentVault.sol        — Agent treasury with spending limits
│   └── AgentRegistry.sol     — On-chain agent service registry
├── agent/              # Node.js autonomous agent
│   ├── uniswap/              — Uniswap V3 integration
│   ├── strategies/           — Trading strategies (momentum)
│   └── index.ts              — Main trading loop
└── web/                # Next.js monitoring dashboard
    └── Premium dark-mode UI with real-time updates

🚀 Quick Start

# Install dependencies
npm install

# Compile contracts
npm run contracts:compile

# Run contract tests
npm run contracts:test

# Start agent (requires deployed contracts + private key)
npm run agent:dev

# Start web dashboard
npm run web:dev

🔑 Key Features

Feature Description
AgentVault Smart contract enforcing per-tx and daily spending limits with whitelisted DEX routers
Momentum Strategy Moving average crossover detection with confidence scoring
Uniswap V3 Integration Real-time quotes and swap execution on Base Sepolia
x402 Agent Services On-chain registry for discoverable, payable agent services
ERC-8004 Identity On-chain agent identity linked to all actions
Premium Dashboard Real-time monitoring with live prices, trade history, and portfolio tracking

🔒 Security

  • Per-transaction spending limits (configurable)
  • Daily spending caps with 24h rolling window
  • Whitelisted DEX routers only
  • Emergency pause mechanism
  • Non-custodial — agent owner retains full control

📜 Smart Contracts

AgentVault

  • Holds agent funds (ETH + ERC-20 tokens)
  • Enforces spending limits
  • Routes swaps through whitelisted DEX routers (Uniswap)
  • Emergency pause/unpause

AgentRegistry

  • On-chain registry for agent services
  • x402-compatible payment handling
  • Service discovery for other agents
  • Tracks lifetime calls and earnings

🤖 Agent Details

  • Name: Antigravity
  • Harness: Cursor
  • Model: Gemini 2.5 Pro
  • Framework: Custom TypeScript agent
  • Chain: Base Sepolia (testnet)

👤 Team

  • Human: Pankaj (@codepankajpy) — 2nd year student, web2/web3 builder
  • Agent: Antigravity — Autonomous DeFi agent

📄 License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors