UHI Hookathon 2026 · Uniswap v4 · Live on Unichain Sepolia

AI Proposes.
Agents Compete.
The Hook Enforces.

The first Uniswap v4 Hook that turns AI intent into real-world commerce — with on-chain enforcement, smart pricing, and a built-in loyalty engine.

5
Protocol Layers
4
Loyalty Tiers
99/0.5/0.5
Auto Settlement
20/20
Tests Passing

Everyone is building AI agents.
Nobody is asking: who guards the agent?

Three critical gaps exist in the current DeFi + AI landscape.
🤖

Unguarded AI Execution

AI agents can propose any transaction. There's no on-chain layer verifying that the agent's plan matches the user's real intent.

🏪

DeFi ≠ Real Commerce

Uniswap swaps are raw token exchanges. No merchant verification, no loyalty rewards, no commerce logic. Unusable for real-world payments.

💸

Static Pricing

AMM fees ignore user context. A loyal VIP customer pays the same fee as a first-time user. No commerce-aware dynamic pricing exists.

5-Layer Protocol Stack

Each layer has a distinct responsibility. AI thinks, Hook guarantees.
Layer 0 · Intent Verification

AI Intent Layer

User says "Pay $30 to Hot Pot King with USDC" → AI compiles to PaymentIntent struct → planHash = keccak256(intent) verified on-chain

Layer 1 · Agent Market (Roadmap)

Competitive Agent Execution

Multiple AI agents bid for optimal execution route. Agents stake tokens → sealed bids → Hook selects best → winner earns fee, losers keep stake.

Layer 2 · Commerce Guard

On-Chain Enforcement

beforeSwap() enforces: merchant whitelist, operating hours, transaction limits, slippage bounds, intent hash verification. Invalid = revert.

Layer 3 · Smart Pricing

Commerce-Aware AMM Pricing

Dynamic fee = f(loyalty tier, peak hours, volatility). Not a simple discount — it's the first context-aware fee model for real-world commerce on an AMM.

Layer 4 · Settlement + Loyalty

Auto Settlement & Rewards Engine

99% merchant / 0.5% platform / 0.5% reward pool auto-split. FOODY cashback, loyalty points, tier upgrades, and VIP Soulbound NFT auto-mint.

Uniswap v4 Pool
Real Economy · Restaurants · Diners · Loyalty

Core Solidity

Clean, auditable, composable. Built on Uniswap v4's BaseHook.
  PaymentIntent.sol
struct PaymentIntent {
    address diner;           // Consumer
    address restaurant;      // Merchant
    address tokenIn;         // Payment token
    uint256 amountIn;        // Payment amount
    uint256 minAmountOut;    // Minimum received
    uint16  maxFeeBps;       // Max fee tolerance
    uint48  expiry;          // Expiration timestamp
    bytes32 orderId;         // Order identifier
    bytes32 intentHash;      // AI Agent signed hash
}
  FoodySwapHook.sol — beforeSwap()
function beforeSwap(..., bytes calldata hookData) {
    PaymentIntent memory intent = abi.decode(hookData, (PaymentIntent));

    // Layer 0: Intent Verification
    require(intent.intentHash == keccak256(abi.encode(intent)), "INVALID_INTENT");
    require(block.timestamp <= intent.expiry, "INTENT_EXPIRED");

    // Layer 2: Commerce Guard
    require(restaurants[intent.restaurant].isActive, "MERCHANT_NOT_FOUND");
    require(_isWithinHours(intent.restaurant), "CLOSED");
    require(intent.amountIn <= restaurants[intent.restaurant].maxTxLimit, "OVER_LIMIT");

    // Layer 3: Smart Pricing
    uint24 fee = _calculateFee(intent.diner, intent.restaurant, intent.amountIn);
    poolManager.updateDynamicLPFee(key, fee);
}
  FoodySwapHook.sol — afterSwap()
function afterSwap(...) {
    // Layer 4: Auto Settlement (99/0.5/0.5)
    _splitSettlement(restaurant, amountOut);

    // Loyalty Update
    _updateLoyalty(diner, amountIn);

    // VIP Soulbound NFT Auto-Mint
    if (loyaltyPoints[diner] >= VIP_THRESHOLD) {
        _mintVIPSoulbound(diner);
    }
}

20 / 20 Tests Passing

15 unit tests + 5 fuzz invariants (256 runs each). Every layer is tested. Every revert is intentional. Run it yourself with forge test -vv
~/foodyswap-hook
$ forge test -vv

4-Tier Loyalty System

Spend more, pay less. Automatic tier upgrades powered by on-chain activity.
🟤
Bronze
$0+ spent
2%
Fee Discount
🪙
Silver
$200+ spent
5%
Fee Discount
🟡
Gold
$500+ spent
8%
Fee Discount
💎
VIP
$1,000+ spent
12%
Fee Discount + SBT NFT

Fee formula: dynamic_fee = base_fee(3000) - tier_discount - peak_bonus

Live on Unichain Sepolia

Verified and deployed. Click any contract to view on Uniscan.

AI Intent Demo

Simulated — type a payment command and watch how AI compiles natural language into swap parameters across all 5 layers.
FoodySwap AI Agent
AI
Hi! I'm the FoodySwap AI Agent. Tell me what you'd like to pay. For example:
"Pay $30 to Hot Pot King with USDC"
Layer 0 Intent Verification
Layer 1 Agent Market
Layer 2 Commerce Guard
Layer 3 Smart Pricing
Layer 4 Settlement + Loyalty
"Everyone is building AI agents. But nobody is asking: who guards the agent? FoodySwap is the answer — the first Hook where AI proposes, agents compete, and the protocol enforces truth. And we proved it works with something everyone understands: paying for dinner."
— FoodySwap Team

What Sets FoodySwap Apart

Built at the intersection of AI, DeFi, and real-world commerce.
Novel Architecture

First of Its Kind

The only Uniswap v4 Hook combining AI intent verification, agent execution, and real-world commerce in a single contract.

Unique Execution

5-Layer Protocol Design

Not a simple if-else Hook — a complete protocol stack with intent verification, commerce guards, smart pricing, and settlement.

Impact

DeFi Meets Real Economy

Directly connects Uniswap liquidity to physical merchants. Not another DEX tool — a bridge to real commerce.

Production-Ready

Fully Functional

End-to-end on-chain demos: payment flows, merchant validation, operating hours enforcement, VIP NFT minting, and dynamic fee calculation.

Thesis-Aligned

Aligned with Vitalik's Vision

Directly implements the AI wallet thesis: AI suggests, local simulation verifies, the protocol enforces. A natural evolution of the smart wallet.

New Primitive

Intent-Enforced Commerce

Introduces "Intent-Enforced Liquidity" — a new DeFi primitive where swaps carry verifiable merchant context.

Market Opportunity

Chinese restaurants alone outnumber McDonald's, KFC, and Wendy's combined in the U.S.
Target Restaurants 25,000
Diners per Restaurant / Day × 50
Avg Spend per Diner × $20
Platform Fee × 0.5%
Daily Platform Revenue $125,000 / day
$45.6M
Annual Platform Revenue
From just 0.5% per transaction — powered by a single Uniswap v4 Hook
Source: Est. 37,000–50,000 Chinese restaurants in the U.S. (Wikipedia, industry reports). FoodySwap targets 25,000 as initial TAM.

Built for the x402 World

API keys were built for humans. The next generation of buyers are AI agents that pay with USDC — no signups, no dashboards, no keys. FoodySwap is already there.
Agent requests API HTTP 402 + price Agent pays USDC Access granted

x402 Protocol

Coinbase's open protocol turns HTTP 402 "Payment Required" into a machine-native payment layer. AI agents pay per-request in USDC — fractions of a cent, no human in the loop.

🌐

Already Adopted

Google Cloud, AWS, and Anthropic have adopted x402. Over 50 million agent transactions processed. The infrastructure is live — the ecosystem is ready.

🍔

FoodySwap = x402 for Commerce

Our Hook turns every restaurant into a programmable payment endpoint. AI agents pay with USDC on Base — no API keys, no signups. One wallet, instant access to every merchant.

🔏

ZK-Verified Trust

Zero-knowledge proofs close the trust gap — verify a payment is authentic without revealing private data. No more "pay and hope." On-chain enforcement guarantees what you paid for.

💰

Micro-Payment Native

FoodySwap's 0.5% platform fee is settled on-chain in real-time. No invoices, no 30-day net terms. Every swap splits settlement instantly — 99% merchant, 0.5% platform, 0.5% rewards.

🚀

The Vending Machine Economy

In the x402 world, agents don't visit websites or read docs — they query endpoints and pay or move on. FoodySwap makes every Uniswap pool a commerce vending machine.

"I regret to inform you that we may have found a real use case for crypto." — Steve Krouse, Founder of Val Town (developer experience purist, zero interest in crypto)

Live Sandbox

Real on-chain transactions on Unichain Sepolia — pick a demo wallet, claim test USDC, pay a restaurant, and verify every transaction on Uniscan.

1. Choose a Demo Wallet

🦄 Uniswap Wallet
Peak hours: extra 1% fee discount

2. Claim Test USDC

Select a wallet first

3. Pay a Restaurant

Sichuan Garden
Pearl Dim Sum
Golden Pho
Claim USDC first, then pay

Your On-Chain Profile

Wallet
USDC Balance
FOODY Balance
Loyalty Tier
Total Spent
Loyalty Rewards
Swap Count
Dynamic Fee
VIP Status

Transaction History

No transactions yet

What's Next

From hackathon to protocol.
Phase 1 · Hookathon

Core Hook Deployment

Intent verification, commerce guard, smart pricing, settlement & loyalty engine. Full test suite and demo.

Phase 2 · Agent Market

Competitive Agent Execution

Multiple AI agents bid for best execution. Staking, sealed bids, reputation scoring. Creating an on-chain agent marketplace.

Phase 3 · Self-Driving Liquidity

AI-Optimized LP Management

Autonomous LP rebalancing using AI signals. Volatility-adaptive fees, liquidity density optimization, strategy profiles.

Phase 4 · Commerce Network

Multi-Merchant Ecosystem

Onboard real restaurants, cross-merchant loyalty, FOODY token economy, and merchant analytics dashboard.

From Swaps to
Programmable Commerce

FoodySwap makes every Uniswap pool a point-of-sale.