Skip to content

keplwch/YieldsPilot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

YieldsPilot Banner

YieldsPilot

Autonomous DeFi Agent with Privacy-Preserving Yield Management

Website License


Private cognition. Trusted onchain action.

YieldsPilot is an autonomous AI agent that manages staking yield on behalf of users. You deposit stETH (or wstETH), the agent earns yield via Lido's rebasing mechanism, privately reasons about how to manage that yield (swap, rebalance, compound), and every action is executed and verified onchain. The agent can never touch your principal, only the yield it generates.


Live

🌐 Live on yieldspilot.com

Mainnet Registry Contract: 0x6df25A1734E181AFbBD9c8A50b1D00e39D482704


Demo Videos

Application Demo

📹 Watch App Demo on YouTube

Full walkthrough: connect wallet → deposit stETH → treasury creation → agent monitoring dashboard → treasury management (withdraw, pause, daily limits, allowed targets) → deposit more stETH and wstETH to existing treasury

Lido MCP Server Demo

📹 Watch MCP Demo on YouTube

Standalone Lido MCP server in action: Claude Desktop integration → query staking positions → check balances → stake ETH → wrap/unwrap stETH ↔ wstETH → governance delegation, all via natural language

Uniswap Real Swap Demo (Mainnet)

📹 Watch Uniswap Swap on YouTube

Live recording of the agent executing a real swap on Ethereum mainnet via the Uniswap Trading API v1, routed through the Treasury contract with Permit2 approval flow and verified onchain TxID


How It Works

┌─────────────────────────────────────────────────────────┐
│                    HUMAN (You)                          │
│   Deposit stETH → YieldsPilot Treasury                  │
│   Principal: LOCKED    |  Yield: AGENT-MANAGED          │
└─────────────────────────┬───────────────────────────────┘
                          │ yield accrues daily (rebasing)
                          ▼
┌─────────────────────────────────────────────────────────┐
│              YIELDPILOT AGENT LOOP                      │
│                                                         │
│  1. DISCOVER  │ Check treasury balance, yield, rates    │
│  2. PLAN      │ Venice (private) + Bankr (multi-model)  │
│  3. EXECUTE   │ Swap on Uniswap / Rebalance / Hold     │
│  4. VERIFY    │ Confirm onchain state matches intent    │
│                                                         │
│  Every action logged → agent_log.json (ERC-8004)        │
└─────────────────────────────────────────────────────────┘

Architecture

Layer Technology Purpose
Treasury Solidity 0.8.24 + OpenZeppelin Yield-separated vault (principal locked, yield spendable)
Private Reasoning Venice AI (no-data-retention) Agent thinks privately, acts publicly
Multi-Model Analysis Bankr LLM Gateway Risk (GPT-5-mini) + Market (Claude Haiku 4.5) + Strategy (Gemini 3 Flash)
Swap Execution Uniswap V2/V3 + Permit2 Real token swaps via Trading API v1 with Permit2 approval flow
Staking Ops Lido SDK + MCP Stake, unstake, wrap, unwrap, balance queries
Monitoring Vault Monitor + Telegram Real-time alerts on yield changes
Identity ERC-8004 Onchain agent identity with structured logs
Dashboard React + Vite + Tailwind Beautiful real-time agent monitoring UI

What Makes YieldsPilot Special

Who This Is For

Meet Lena. She's the part-time treasurer of a 200-person creative cooperative DAO. The DAO holds 50 ETH staked through Lido, earning daily stETH rebases. Every week, Lena logs into three dashboards, checks if yield has accrued, evaluates gas prices, looks at ETH/USDC rates, and decides whether to swap the yield into stablecoins for the DAO's operating budget. It takes 45 minutes each time. She has a full-time job. Half the time, she just lets the yield sit because she doesn't have bandwidth.

She can't delegate this to a bot because that means handing over the DAO's treasury keys. She can't use a centralized yield optimizer because the DAO voted against custodial solutions. And every time she checks DeFi dashboards and queries rates through APIs, she's leaking the DAO's financial strategy to every service she touches.

Lena's problem isn't technical. It's structural: there's no way to let an agent manage yield without also trusting it with the principal, and no way to automate DeFi reasoning without exposing your strategy to the infrastructure you reason through.

The Problem

DeFi yield sits idle because active management requires constant monitoring, gas timing, and swap execution. Delegating to a bot means trusting it with your funds and your data. Existing solutions either expose your reasoning patterns to LLM providers (building a profile of your risk tolerance and portfolio over thousands of API calls) or require you to hand over full custody of your tokens.

How might we let someone like Lena put her DAO's staking yield to work automatically, without trusting a bot with the principal or leaking the DAO's strategy to every API it touches?

Our Solution

YieldsPilot automates the entire yield management lifecycle while keeping your strategy private:

  1. You deposit once: stETH or wstETH goes into a yield-separated treasury smart contract
  2. The agent manages yield autonomously: it monitors accrued yield, evaluates market conditions across 3 LLMs, and executes swaps on Uniswap when conditions are favorable
  3. Your principal is untouchable: the smart contract mathematically prevents the agent from accessing your deposited principal. It can only spend yield, and only up to a daily limit you configure
  4. Your strategy stays private: all reasoning happens via Venice's no-data-retention API. No one (not even Venice) can see what the agent is thinking or planning
  5. Everything is verifiable: every action is onchain, every decision is logged in ERC-8004 format, and you can audit the full history

For Lena, this means: deposit the DAO's stETH, set a daily spend cap of 50 BPS, whitelist USDC and DAI as allowed targets, and walk away. The agent handles the rest. The DAO's principal is locked by math, the strategy stays private, and every swap shows up onchain for the whole DAO to audit.

Future Vision: Where This Goes Next

The current implementation is a fully functional proof-of-concept. Here's the roadmap for turning it into a production-grade autonomous yield manager:

Smarter Agent Strategies The agent loop today follows a simple discover-plan-execute-verify cycle. With more sophisticated strategy modules, it could implement DCA (dollar-cost averaging) out of stETH yield into a portfolio of tokens, dynamically adjust swap timing based on gas prices and DEX liquidity depth, or compound yield back into stETH when market conditions are unfavorable for swaps.

Multi-Protocol Yield Sources Currently locked to Lido stETH. The treasury contract architecture supports any ERC-20 yield source: Rocket Pool rETH, Coinbase cbETH, or LP positions from Aave/Compound. The agent could compare APRs across protocols and automatically migrate to the highest-yielding source.

Cross-Chain Expansion The treasury contract can be deployed on any EVM chain. With bridge integration, the agent could move yield across L2s (Arbitrum, Optimism, Base) to capture higher yields or lower gas costs.

Social & Collaborative Strategies Multiple users' treasuries could opt into shared strategy pools where the agent manages collective yield for better execution (larger swaps = less slippage). Users maintain individual principal ownership while benefiting from coordinated execution.

Advanced Risk Management The multi-model analysis (Bankr) currently provides a single risk assessment per cycle. Future iterations could implement continuous monitoring with automatic pause triggers, volatility-adjusted position sizing, and insurance protocol integration (Nexus Mutual) for smart contract risk.

User Experience Upgrades Natural language treasury management via the Lido MCP server: "set my daily limit to 25% and pause swaps until ETH is above $4000", turning complex DeFi operations into conversational commands. Push notifications (Telegram, Discord, email) for every agent action with one-tap approval for high-value swaps.


Sponsor Integrations

YieldsPilot's design is built around the deep integration of six sponsor technologies. A single yield management cycle flows through all of them in sequence: Lido generates the yield, Venice reasons about it privately, Bankr validates across multiple models, Uniswap executes the swap, Protocol Labs records the receipt, and the vault monitor alerts the user.

Venice AI: "Private Agents, Trusted Actions"

Venice provides the agent's intelligence layer with a critical guarantee: no data retention. Every LLM call is stateless: no session aggregation, no cross-request correlation, no training on queries.

This matters because DeFi agent reasoning is uniquely sensitive. Over weeks of operation, the agent makes thousands of LLM calls analyzing treasury balances, yield rates, swap timing, and market conditions. Each individually is benign; together they paint a complete picture of a user's risk tolerance, reaction patterns, and portfolio value. Venice ensures these reasoning traces exist only in the agent's local logs.

How YieldsPilot uses Venice:

Capability Integration Details
Private reasoning No-data-retention inference venice.chat.completions.create() via OpenAI-compatible SDK, every call stateless
Market-aware decisions Live data in prompts ETH price, stETH/ETH peg, gas costs, and pool liquidity injected into every reasoning call via marketContext parameter
Liquidity-aware sizing TVL-relative swap limits System prompt encodes hard rules: >1% of pool TVL → split across cycles, >5% → reduce to 1% max per cycle
Structured output JSON-only responses Venice returns { action, params, confidence, risk_assessment }, parsed and validated before execution
Model selection llama-3.3-70b Chosen for strong structured output compliance and reasoning depth at low latency

The system prompt in agent/services/venice.ts encodes the full decision framework: yield thresholds, daily spend caps, gas-cost-vs-yield evaluation, stETH peg monitoring, and pool liquidity constraints. Venice sees everything the agent knows, reasons privately, and outputs a single action: swap_yield or hold.

Lido: "stETH Agent Treasury" + "Vault Monitor" + "Lido MCP"

Lido is the yield engine. Users deposit stETH (or wstETH) into a yield-separated treasury smart contract. The stETH rebases daily via Lido's liquid staking mechanism, generating yield above the locked principal. The agent can only touch the yield, never the principal.

Three distinct Lido integrations:

Integration Track What It Does Code
Treasury contract stETH Agent Treasury Yield-separated vault. Principal locked, yield spendable. Daily spend caps (BPS), allowed target whitelist, pause, emergency withdraw. Supports stETH and wstETH deposits. contracts/YieldsPilotTreasury.sol
Vault monitor Vault Position Monitor Real-time monitoring of yield accrual, balance changes, and agent actions. Change detection with instant Telegram alerts on significant events. agent/services/vaultMonitor.ts
MCP server Lido MCP Standalone MCP server with 9 tools: stake, unstake, wrap, unwrap, balances, rewards, withdrawal status, governance delegation, position summary. Works with Claude Desktop, Cursor, or any MCP client. mcp/lido-mcp-server.ts

The treasury contract is the security foundation. The agent calls treasury.swapYield(router, amountIn, calldata, tokenOut, minAmountOut) which atomically: approves the router for stETH → calls the router with swap calldata → verifies minAmountOut received → resets approval to zero. Funds never leave the contract during a swap; the contract IS the swapper.

The Lido service in agent/services/lido.ts handles all protocol interactions: stETH.submit() for staking, wstETH.wrap()/unwrap() for conversions, balance queries across ETH/stETH/wstETH/shares, and exchange rate lookups for yield calculation.

Watch the Lido MCP demo on YouTube to see all 9 tools in action via Claude Desktop: querying positions, staking ETH, wrapping/unwrapping stETH, etc all through natural language.

Read the full MCP documentation →: setup guides, example conversations, architecture diagram, and what you can build with it.

Uniswap: "Agentic Finance"

Uniswap serves as the execution layer. The agent uses the Trading API v1 for optimal routing across V2 and V3 pools, with Permit2 approval flow for Universal Router compatibility and real transaction IDs on every swap.

Component What It Does Code
Trading API v1 (/quote) Fetches optimal swap routes across V2, V3, and mixed protocols with configurable slippage getQuote() in agent/services/uniswap.ts
Trading API v1 (/swap) Builds router calldata from quotes for the Treasury contract to execute buildContractSwap() in agent/services/uniswap.ts
Permit2 approval flow Treasury approves Permit2, Permit2 grants allowance to Universal Router, all reset after each swap swapYield() in contracts/YieldsPilotTreasury.sol
Treasury-based execution Atomic approve→Permit2→call→verify→reset pattern, funds never leave the contract swapYield() in contracts/YieldsPilotTreasury.sol
DeFiLlama Yields API Fetches Uniswap V3 pool TVL and 24h volume for liquidity-aware swap sizing fetchPoolLiquidity() in agent/services/marketData.ts
Dry run support Quote-only mode for agent planning and risk assessment without execution dryRun() in agent/services/uniswap.ts

The agent uses DeFiLlama pool data to make liquidity-aware decisions. When the reasoning LLM considers a swap, it sees TVL, 24h volume, and fee tiers for the top pools, with explicit guidance about when swap size relative to pool TVL suggests splitting across cycles. This prevents large swaps from causing excessive price impact.

How Permit2 works in our Treasury contract: The Uniswap Universal Router pulls tokens via Permit2, not via direct ERC-20 transferFrom. When swapYield() executes, the Treasury: (1) approves Permit2 for the exact stETH amount, (2) calls IPermit2.approve() to grant the router a time-limited allowance (30 min expiry), (3) calls the router with swap calldata, (4) verifies minAmountOut received, (5) resets both Permit2 and direct approvals to zero. All five steps happen atomically in a single transaction. Funds never leave the contract.

Proof of real execution: Watch the real swap demo on YouTube for a live recording with verified TxIDs. You can also inspect the first treasury contract on Etherscan to see actual swap transactions onchain. The app at yieldspilot.com is fully functional for testing, though note that Lido staking yield accrues slowly, so it may take time before the agent has enough yield to execute a swap.

Bankr: "Best LLM Gateway Use"

Bankr provides multi-model reasoning through a single gateway. Instead of one LLM making all decisions, three specialized models each handle a focused task, and their outputs are synthesized into a unified action plan.

Model Task What It Evaluates Code
gpt-5-mini Risk Assessment Is it safe to swap this cycle? Checks yield sufficiency, daily spend limits, swap-to-yield ratio assessRisk() in agent/services/bankr.ts
claude-haiku-4.5 Market Analysis What are market conditions? ETH trend, stETH peg, gas costs, pool liquidity depth, optimal output token analyzeMarket() in agent/services/bankr.ts
gemini-3-flash Strategy Synthesis Given risk + market analysis, what's the final action? Reconciles conflicting signals into a single decision synthesizeStrategy() in agent/services/bankr.ts

All three models receive live market data: ETH prices from CoinGecko, gas costs from RPC, and Uniswap pool liquidity from DeFiLlama. The market analyst model gets liquidity-aware analysis instructions (pool TVL thresholds, fee tier preferences, volume-to-TVL ratios). The strategy synthesizer receives explicit liquidity guidance about maximum safe swap sizes.

The multi-model approach provides natural redundancy: if the risk model says "abort" but the market model says "swap_now", the strategy synthesizer must reconcile the conflict and explain its reasoning. This produces more robust decisions than any single model alone.

Path to self-sustaining economics: Today, the team covers inference costs during the hackathon phase. The roadmap toward self-sustaining inference is straightforward: the treasury contract can be extended with a small performance fee (a percentage of yield successfully swapped). As the agent manages more treasuries and generates fee revenue, that revenue flows back to fund Bankr multi-model inference costs. The agent pays for its own intelligence from the value it creates, not from user principal, not from external subsidies. Zero fees at launch to prove value first, then protocol fees fund inference as usage scales.

Protocol Labs: "Let the Agent Cook" + "Agents With Receipts"

Protocol Labs' ERC-8004 gives YieldsPilot a verifiable onchain identity and a structured audit trail where every cycle is logged.

Component Purpose Details
agent.json ERC-8004 manifest Declares capabilities, tools, safety policies, inference providers, chain support, MCP config, and autonomy parameters. Identity: did:synthesis:34520
agent_log.json Structured cycle log Every discover→plan→execute→verify cycle logged with DID stamp, operator wallet, timestamps, actions, and outcomes
Autonomous loop "Let the Agent Cook" Full autonomy after deposit, configurable interval (default 5min via AGENT_INTERVAL_MS), no human intervention required

The agent loop in agent/index.ts runs the complete cycle autonomously: fetch treasury state + market data in parallel → Venice private reasoning → Bankr multi-model validation → Uniswap swap execution → onchain verification → ERC-8004 log entry. Every decision has a receipt, every action is auditable, and the agent's DID (did:synthesis:34520) is stamped on every log entry, making identity load-bearing in the audit trail, not decorative.

Synthesis: Open Track

YieldsPilot is a cross-sponsor coherent build: not a collection of bounty submissions stitched together, but a single product where Venice, Lido, Uniswap, Bankr, and Protocol Labs all serve one purpose: autonomous, privacy-preserving yield management. A user deposits stETH once and walks away. The agent handles everything else, privately, autonomously, and verifiably.


Quick Start

1. Clone & Install

git clone https://github.com/keplwch/yield-pilot.git
cd yield-pilot
bun install
cd frontend && bun install && cd ..

2. Configure

cp .env.example .env
# Fill in your API keys:
#   VENICE_API_KEY    (from venice.ai)
#   BANKR_API_KEY     (from bankr.chat)
#   UNISWAP_API_KEY   (from developer.uniswap.org)
#   AGENT_PRIVATE_KEY (agent wallet, testnet)
#   RPC_URL           (Alchemy/Infura endpoint)
#   TELEGRAM_BOT_TOKEN (optional, for alerts)

3. Deploy Treasury Contract

# Compile contracts
npx hardhat compile

# Run tests (60 passing)
npx hardhat test

# Deploy to Ethereum Sepolia
./scripts/deploy.sh sepolia

# Deploy to Ethereum Mainnet
./scripts/deploy.sh mainnet

# Run mainnet fork swap test
FORK_RPC=$RPC_URL ./scripts/deploy.sh fork:test

# Verify on Etherscan
./scripts/deploy.sh verify 0xYOUR_CONTRACT_ADDRESS

4. Run Everything Locally

# Install + start all services (frontend, agent, monitor)
./scripts/dev.sh start

# Or individually:
./scripts/dev.sh frontend   # React dashboard on :5173
./scripts/dev.sh agent      # Autonomous agent loop
./scripts/dev.sh monitor    # Vault monitor + Telegram

# Check status
./scripts/dev.sh status

# View logs
./scripts/dev.sh logs

# Stop everything
./scripts/dev.sh stop

5. Production (Docker)

./scripts/prod.sh up        # Starts agent + monitor + dashboard (nginx on :3000)
./scripts/prod.sh logs      # Tail logs
./scripts/prod.sh stop      # Stop all services

6. Lido MCP Server

A standalone MCP server with 9 tools for the Lido staking protocol. Works with Claude Desktop, Cursor, Claude Code, or any MCP-compatible client. Stake ETH, check balances, wrap/unwrap tokens, and vote on governance, all from natural language.

# Quick start (standalone, no full repo needed)
mkdir lido-mcp && cd lido-mcp
npm init -y && npm install @modelcontextprotocol/sdk ethers dotenv tsx
curl -O https://raw.githubusercontent.com/keplwch/yield-pilot/main/mcp/lido-mcp-server.ts
curl -O https://raw.githubusercontent.com/keplwch/yield-pilot/main/mcp/lido.skill.md
npx tsx lido-mcp-server.ts
Tool Type What it does
lido_stake Write Stake ETH → stETH
lido_unstake Write Request withdrawal via Lido queue
lido_wrap / lido_unwrap Write stETH ↔ wstETH conversion
lido_balances Read ETH/stETH/wstETH/shares for any address
lido_rewards Read Protocol stats, APR, exchange rate
lido_withdrawal_status Read Check pending withdrawal requests
lido_delegate_vote Write LDO governance: delegate, vote, list proposals
lido_position_summary Read Full position with estimated daily/annual rewards

All write tools support dry_run: true, preview before executing.

Read the full MCP documentation →: setup guides for every client, example conversations, architecture diagram, configuration reference, and what you can build with it.


wstETH Support

The treasury supports both stETH (rebasing) and wstETH (non-rebasing wrapped stETH). This matters because many DeFi protocols and wallets handle wstETH better than stETH due to its non-rebasing nature.

How it works:

  • Deposit as wstETH: Call depositWstETH(amount): the contract unwraps wstETH → stETH internally and tracks it as principal. You approve wstETH spending to the treasury address first.
  • Withdraw as wstETH: Call withdrawPrincipalAsWstETH(stETHAmount): the contract wraps your stETH → wstETH before sending it back to you. Useful if you want to move funds into DeFi protocols that prefer wstETH.
  • Emergency withdraw: Sends back both stETH and any residual wstETH balance to the owner.

The dashboard's Treasury Management panel includes a toggle to withdraw principal as wstETH directly from the UI.


Treasury Management UI

The dashboard includes a full Treasury Management panel (visible to the connected owner) with:

  • Withdraw Principal: withdraw stETH or wstETH back to your wallet
  • Emergency Withdraw: pull all funds instantly (with confirmation safeguard)
  • Daily Spend Limit: adjust the max BPS the agent can spend per day (with presets: 10%, 25%, 50%, 75%)
  • Allowed Targets: view, add, and remove addresses the agent can send yield to
  • Agent Control: pause/resume agent operations
  • Transfer Ownership: hand over treasury ownership to another address
  • Status Bar: shows daily limit, remaining allowance, and pause state

Non-owners see a read-only view of the treasury state.


Safety Guardrails

  • Principal protection: Smart contract makes principal mathematically inaccessible to agent
  • Daily spend cap: Configurable basis points limit on yield spending per day
  • Target whitelist: Agent can only send yield to pre-approved addresses
  • Dry-run on all writes: Every write operation supports dry run preview before execution
  • Multi-model risk check: Dedicated risk model evaluates every action before execution
  • Compute budget: USD-denominated daily cap on inference spending
  • Emergency pause: Owner can freeze all agent operations instantly
  • Full audit trail: Every cycle logged in structured agent_log.json

Testing

Unit Tests (60 tests)

npx hardhat test

Runs against Hardhat's local network with mock contracts. Covers all treasury operations, registry factory, yield separation, daily limits, access control, wstETH wrap/unwrap, and emergency scenarios.

Mainnet Fork Tests (4 tests) - Initial contract testing

FORK_RPC=$RPC_URL ./scripts/deploy.sh fork:test

Forks Ethereum mainnet locally and tests against real Lido and Uniswap contracts with production bytecode, liquidity, and AMM math:

  1. Full swap test: stETH to WETH via ForkSwapHelper (wraps stETH to wstETH, swaps on wstETH/WETH pool)
  2. Daily limit enforcement: verifies the agent cannot exceed its configured daily spend cap
  3. Non-agent rejection: confirms only the authorized agent wallet can execute swaps
  4. Disallowed router rejection: verifies swaps fail if the target isn't whitelisted

Project Structure

yield-pilot/
├── contracts/
│   ├── YieldsPilotTreasury.sol      # Yield-separated treasury with wstETH support
│   ├── YieldsPilotRegistry.sol      # Multi-user factory (per-user treasuries)
│   ├── test/
│   │   └── ForkSwapHelper.sol       # Test helper: stETH → wstETH → Uniswap V3 swap
│   └── mocks/
│       ├── MockStETH.sol            # Test mock for stETH rebasing
│       └── MockWstETH.sol           # Test mock for wstETH wrap/unwrap
├── test/
│   ├── Treasury.test.ts             # 60 unit tests covering all safety invariants
│   ├── Registry.test.ts             # Registry factory tests
│   └── fork-swap.test.ts            # Mainnet fork swap tests (4 tests)
├── scripts/
│   ├── deploy.ts                    # Hardhat deploy (sepolia, mainnet, status)
│   ├── deploy.sh                    # Unified deploy CLI (compile/test/deploy/verify/fork:test)
│   ├── dev.sh                       # Local development runner
│   └── prod.sh                      # Docker Compose production wrapper
├── agent/
│   ├── index.ts                     # Main autonomous loop (discover → plan → execute → verify)
│   ├── services/
│   │   ├── venice.ts                # Private reasoning via Venice (no data retention)
│   │   ├── bankr.ts                 # Multi-model analysis (GPT-5-mini + Claude Haiku 4.5 + Gemini 3 Flash)
│   │   ├── uniswap.ts              # Swap execution via Uniswap Trading API v1 + Permit2
│   │   ├── lido.ts                  # Lido staking operations
│   │   └── vaultMonitor.ts          # Vault monitor + Telegram alerts
│   └── utils/
│       └── logger.ts                # Structured agent_log.json writer (ERC-8004)
├── mcp/
│   ├── lido-mcp-server.ts           # Lido MCP server (9 tools, standalone)
│   └── lido.skill.md                # Lido agent guide (exposed via MCP resources)
├── frontend/                        # React + Vite + Tailwind dashboard
│   ├── src/
│   │   ├── App.tsx                  # Main layout
│   │   ├── config/network.ts        # Env-based network config (sepolia ↔ mainnet)
│   │   ├── components/              # DepositPanel, TreasuryManagement, ActivityFeed, etc.
│   │   ├── hooks/                   # useAnimatedValue, useLiveYield
│   │   └── providers/               # WalletProvider (wagmi + viem)
│   └── ...
├── config/
│   └── default.ts                   # Centralized configuration
├── types/
│   ├── index.ts                     # Shared TypeScript types
│   └── ambient.d.ts                 # Module declarations
├── docker/
│   ├── agent.Dockerfile
│   ├── monitor.Dockerfile
│   ├── frontend.Dockerfile
│   └── nginx.conf
├── agent.json                       # ERC-8004 agent manifest
├── MAINNET_DEPLOYMENT.md            # Step-by-step mainnet deployment guide
├── hardhat.config.ts                # Multi-chain Hardhat config (sepolia, mainnet, fork)
├── docker-compose.yml
├── .env.example
├── package.json
└── README.md

Tech Stack

  • Language: TypeScript (strict mode)
  • Smart Contracts: Solidity 0.8.24 + OpenZeppelin v5 + Hardhat
  • Frontend: React 18 + Vite + Tailwind CSS
  • Fonts: Space Grotesk, JetBrains Mono, Inter
  • Runtime: Node.js 18+ / Bun
  • Testing: Hardhat + Chai + Mocha (60 unit + 4 fork tests)
  • Deployment: Ethereum Sepolia (testnet) + Ethereum Mainnet (production)

Chains

Chain Purpose Contract
Ethereum Mainnet Production treasury + Lido + Uniswap V2/V3 + Permit2 YieldsPilotRegistry
Ethereum Sepolia Testnet development + mock contracts YieldsPilotRegistry + Mocks
Base Mainnet ERC-8004 agent identity via synthesis.devfolio.co

License

Apache 2.0 — see LICENSE


Built for Synthesis Hackathon