Untouched

DeFi yield vault & AI gateway on Arc: fund LLM compute via USYC yield, keep principal untouched.

Untouched

Created At

ETHGlobal Mumbai

Project Description

Untouched is an OpenAI-compatible API gateway on Arc Testnet. You connect a wallet and stake USDC once into UntouchedVaultV2. The principal stays in the vault. A 14-day slice of 5% APY is issued as a yield battery, and that battery is the only balance the API key can spend. A $50 stake adds about $0.0959 of battery. One unt_live key is issued after the stake confirms, and staking again does not create a second key.

Calls use the OpenAI Chat Completions shape at /api/v1/chat/completions. Included models are Gemini 2.5 Flash, Llama 3.3 70B on Groq, and Qwen 2.5 and DeepSeek R1 on OpenRouter, billed at $1 per 1 million tokens. Untouched pays those providers with its own keys. Claude and GPT stay locked. If the estimate is over the per-call cap, or the battery is empty, the request is rejected and costs nothing. A successful call returns an x402 PAYMENT-RESPONSE. Withdraw pays principal minus the yield already spent and closes the position.

The vault was written, tested, and deployed in Arc Studio. Native USDC is both the gas token and the deposit asset. The dashboard shows principal, battery, receipts, and the key. The playground runs a call and shows the execution trace. The phone is only stake, battery, usage, and withdraw.

How it's Made

Untouched is a Next.js 15 app on Arc Testnet (chain 5042002). The vault, UntouchedVaultV2, was written in Solidity, tested with Foundry, and compiled and deployed in Arc Studio. The live app stakes into that contract. Arc USDC at 0x3600…0000 is both the gas token and the deposit asset: native value is 18 decimals, the ERC-20 precompile is 6 decimals, and 1 micro-USDC is 1e12 wei. depositNative needs no approve. A $50 stake locks $50 of principal and adds about $0.0959 of yield battery, 14 days at 5% APY. recordUsage is owner-only and cannot pass that quota. withdraw pays principal minus used yield and closes the position.

The browser uses wagmi, viem, and Web3Modal. Stakes are legacy type-0 transactions because Arc rejects EIP-1559. The server uses ethers v5 StaticJsonRpcProvider with skipFetchSetup, and it never batches JSON-RPC, because the public Arc RPC rejects batches and the ethers browser build otherwise sends a referrer Node fetch will not accept. After every stake and on every status read, balances are taken from positions(address) so a serverless instance cannot keep an old number.

Chat is POST /api/v1/chat/completions with one unt_live key issued after the first confirmed stake. The gateway checks the cap and the battery, calls Gemini, Groq, or OpenRouter with Untouched’s own keys, then records usage. Included models are $1 per 1 million tokens. A 200 sets an x402 PAYMENT-RESPONSE using a real EIP-3009 TransferWithAuthorization. An empty battery returns 402 and spends nothing. Supabase stores the wallet and the key so a cold instance still recognizes them.

background image mobile

Join the mailing list

Get the latest news and updates