🤖

Synthesis Yield Agent

Autonomous DeFi agent that earns yield, proves privacy, and gets smarter over time

Live on Base + Ethereum ZK Privacy (Groth16) Uniswap V3 LP + V4 Hooks Self-Improving
Live Dashboard GitHub

Two AI agents, one pipeline. The Yield Agent decides what to do. The ZK Agent proves it's authorized to do it. The agent tracks every decision, compares predicted vs actual yield, and adjusts its own risk weights. No human in the loop.

Architecture

AI Decision Layer
Claude Haiku analyzes yields, balances, gas recommends action
ZK Privacy Layer
3 Groth16 proofs authorization + budget + cumulative spend hookData
Treasury Layer (Ethereum Mainnet)
Lido stETH yield-bearing agent budget agent withdraws only yield
Execution Layer (Base Mainnet)
Uniswap V4 Hook verifies ZK proof on-chain swap LP / Aave

7-Step Pipeline

01
OBSERVE
Scan DeFi yield rates (Aave, Morpho, Compound) + wallet balances + Uniswap LP pools via DeFi Llama + on-chain validation
02
THINK
Claude Haiku analyzes rates, balances, gas costs, and LP yields — recommends swap, deposit, LP, or hold
03
PROVE
Generate 3 Groth16 ZK proofs: agent authorization (EdDSA), budget range, cumulative spend — all without revealing private data
04
GATE
Encode authorization proof as Uniswap V4 hookData. The ZKGatedHook verifies the proof before allowing the swap
05
SWAP
Execute token swap via Uniswap Trading API with Permit2 signing, optimal routing, and slippage protection
06
EARN
Deposit into highest-yield protocol (Aave V3) or mint Uniswap V3 full-range LP position for swap fee yield
07
DISCLOSE
Generate selective ZK disclosure proofs for auditors — prove compliance without revealing transaction amounts or wallet identity

Live on Base + Ethereum

7
Contracts Deployed
2
Chains (Base + Ethereum)
594
Tests Passing
14
Security Audits
24/7
Live Agent on Hetzner
$22.66
Live USDC Under Management

Self-Improving Agent

The agent doesn't just execute — it learns. Every allocation decision is tracked, measured against reality, and fed back into future decisions.

Record Decision
Every supply/withdraw is logged with predicted APY, risk score, protocol TVL, and utilization at time of decision
Measure Outcome
After each cycle, compare actual yield earned vs what was predicted. Track gas costs, hold duration, profitability
Evaluate Accuracy
Per-protocol accuracy: win rate, APY prediction error, overestimate frequency. Protocols that consistently over-promise get flagged
Adjust Weights
Risk scoring weights auto-adjust: penalize protocols that under-deliver (+15% risk), reward consistent performers (-10% risk). LP tick ranges narrow or widen based on regime win rates
View learning stats on the dashboard →

On-Chain Artifacts

Wallet: 0x8d691720bF8C81044DB1a77b82D0eF5f5bffdE6C

ContractAddress
ZKGatedHook (V4)0x45eC09fB08B83f104F15f3709F4677736112c080
AuthorizationVerifier0x2a8FBE80BDc9cb907b20acBE84F13a858CBEdAe4
BudgetRangeVerifier0x8d7520a34f3EFbB86d02232C4fc31dB9415142d3
CumulativeSpendVerifier0x1c7A42fea03ec0C86c94B886588a2680184428D9
PolicyCommitment0x049B09c4aE1974F84164b65a9f0AB412dA9814f2
ERC-8004 ZK Agent#32271
ERC-8004 Yield Agent#32272
LP Position (WETH-USDC)#4816034 (0.05% fee, full range)
Ethereum Mainnet
AgentTreasury (Lido stETH)0x049B09c4aE1974F84164b65a9f0AB412dA9814f2

Safety Guardrails

Fail-closed AI: API failure = reject all actions
50% max swap fraction per transaction
Circuit breakers: USDC depeg, TVL crash, gas freeze
ZK proofs required before swap execution
Spending scope enforced (max single + period limits)
Gas price ceiling (5 gwei cap on Base)
Rate cross-validation across 3 data sources
Paper mode default — live requires explicit flag

Run It Yourself

# Clone + install
git clone https://github.com/SenorCodigo69/synthesis-yield-agent
cd synthesis-yield-agent
python -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt

# Scan live yield rates
python -m src scan

# View Uniswap LP pool yields
python -m src pools

# AI-powered swap recommendation
python -m src swap --ai

# Run the live agent loop
python -m src run --mode live --capital 50

# View learning stats — how the agent is improving
python -m src learn

Repos + Links

Submission Declarations

FieldValue
Primary AI Modelclaude-opus-4-6
Agent HarnessClaude Code (CLI)
Track 1Agents that pay
Track 2Agents that keep secrets
Track 3Uniswap — Agentic Finance
Track 4Let the Agent Cook
Conversation LogCONVERSATION-LOG.md
Track 5Lido — stETH Agent Treasury
Open SourceYield AgentZK AgentstETH Treasury