Search projects, hackathons, sponsors and tech

    ← All projects

    AgentPermit Delta

    AI proposes, you approve: delta-neutral Uniswap V3 LP hedged on Hyperliquid, with ENSv2 identity.

    Demo

    About

    AgentPermit Delta turns a natural-language goal into a bounded, human-approved WETH/USDC strategy. Nothing is ever signed by a model. You describe what you want. The server then makes three real reads before it will answer. The Uniswap V3 Ethereum subgraph on The Graph returns the 0.05% and 0.3% USDC/WETH pools with exactly seven complete UTC days of TVL, volume, fees and prices, plus the indexed block. Hyperliquid mainnet returns ETH mark price, funding, open interest and order-book depth at plus or minus half a percent. OpenAI then compares the two fee tiers under a strict JSON schema and returns a pick-a-tier, open-or-wait recommendation where every stated reason must cite a metric ID that was actually supplied, with both pools represented. Missing, incomplete or stale data fails the proposal. There is no fabricated fallback. The full GraphQL query, raw inputs, model request and model response are written atomically to a local evidence file with no API keys in it. The model advises. It never sizes or sends anything. Deterministic code fixes the test limits: 500 USDC total, 300 for the LP, up to 200 of perp reserve, a range of plus or minus twenty percent, isolated 1x leverage. A proposal older than five minutes cannot be approved, so historical evidence cannot be replayed as a current decision. On approval the executor mints a real Uniswap V3 position against the official Ethereum contracts on a pinned Anvil mainnet fork, resolving the pool through the factory and rechecking both tokens and the fee before minting. It reads the confirmed on-chain LP amounts, then opens a matching ETH short on Hyperliquid testnet with deterministic client order IDs. A ten-second monitor recomputes LP WETH plus free WETH plus pending fees plus perp ETH, and only re-hedges when residual exposure passes twelve dollars. It closes after sixty seconds outside range or when liquidation sits within ten percent of mark. The interesting part is what happens when things go wrong. Every external intent is persisted before it is sent. A timeout leaves that intent "unknown", and on restart the process looks the order up by its deterministic client order ID and requires a fresh account read before it touches anything. Unknown outcomes block replacement orders instead of double-sending. If initial coverage fails three times, it unwinds both legs. Closing demands the perp position reach exactly zero; residual exposure is not written off as dust. ENSv2 on Sepolia gives the service a discoverable identity. The owner delegates only the endpoint record to an operator key and keeps payout and protected records, and a wallet-free client resolves the endpoint independently. This is test funds on a fork, a testnet and Sepolia. Delta neutrality is not a profit promise: funding, basis, range, liquidation and execution risk all remain.

    How it's made

    The whole thing is one TypeScript repo with no build-time framework beyond Vite: a Node 24 server that runs .ts files natively via type stripping, a React 19 client, and viem instead of ethers for every chain call. 33 deterministic Node tests, strict TypeScript and a production build all run under one command. The Graph leg queries the documented Uniswap V3 Ethereum subgraph on The Graph Network with a server-side API key, pulling two pools plus their poolDayDatas and validating that seven consecutive complete UTC days came back, that the token identities match the real USDC and WETH addresses, and that the subgraph's indexed block is recent. That validation is the point: the AI never sees data the code has not already vouched for, so the model's citations can be checked against the supplied metric IDs after the fact. OpenAI Responses with gpt-5-nano runs under a strict structured-output schema. The schema forces the model to reference metric IDs from the payload and to cover both fee tiers, and the server rejects the response if a citation does not resolve. The model returns a fee tier and an open/wait call, and that is all it is allowed to influence. Uniswap execution uses the official V3 SDK for tick math and mint calldata, driving the real NonfungiblePositionManager, SwapRouter and factory on an Anvil fork pinned to mainnet block 25965916. Funding happens by impersonating a USDC whale inside Anvil only. A separate disposable-fork script proves the full lifecycle end to end for both fee tiers: mint, read, remove, collect, burn the NFT, sell the WETH, and assert zero WETH residue. Hyperliquid uses the nktkas client. Sizes and price precision are discovered from exchange metadata rather than hardcoded, orders go out IOC with deterministic client order IDs, and mainnet is used read-only for analysis while only testnet ever receives an order. The client order ID is the whole recovery story: it is what lets a restarted process ask "did my order land?" without ever guessing. ENSv2 on Sepolia uses the permissioned resolver so an operator key can write exactly one record, agentpermit.endpoint, and nothing else. The client resolves that endpoint with no wallet at all. Two hacky bits worth naming. First, persistence is temp file, fsync, rename, directory fsync, so a kill -9 mid-mint cannot produce a half-written ledger. Second, there is a deliberate chaos mode: two env vars make the first hedge order request only 80 percent of the needed size and then throw away a known-good response to simulate a network timeout, which is how the recovery path gets demonstrated live instead of merely claimed. Keys never reach the browser bundle; the client gets an ephemeral session token minted at server startup and writes additionally require a loopback Host and an allowed Origin.