Effortless, safe, and efficient non-custodial DEFI portfolio management.
Clean, safe, and efficient non-custodial engine for managing DeFi positions.
This project is a headless, specialized execution engine (accessible via x402 payments) that handles complex DeFi blockchain math and interactions, volatility monitoring, and transaction bundling.
Instead of asking users to lock funds into risky third-party vaults or relying on hallucination-prone LLMs to craft raw transactions, this microservice acts as an off-chain calculation layer. It monitors on-chain data using The Graph and outputs, signable transaction bundles that an autonomous AI agent, bot or user wallet signs directly.
Existing problems:
How Clean Endpoints solves them:
Offload complex work: Clean Endpoints handles heavy data aggregation, precise calculations, and multi-step transaction routing off-chain. This eliminates manual UI errors and unreliable AI math, turning complex operations into single, optimized execution payloads.
Trustable code: You retain total control of your assets without locking tokens in risky vault contracts or sharing private keys. The service never holds funds—it simply generates safe, pre-calculated transaction bundles that you or your agent verify and sign directly.
Easy-to-use: It's a lightweight microservice that connects seamlessly to AI agents, custom scripts, or frontends via x402. Its pay-per-use architecture removes subscriptions and setup friction, letting any client trigger actions on demand.
Future: The future of DeFi is setting up automated scripts and AI agents. With Clean Endpoints, a simple bot can automatically jump into higher-yield pools, copy top traders' moves in real time, or protect your positions before you get liquidated—paying fractions of a cent per request while your funds stay safely in your own wallet.
As more protocols and networks get added, this microservice becomes a plug-and-play utility belt for crypto automation. It lets any developer launch fast, hands-off financial tools without having to write complicated smart contract math or risk user funds.
Clean Endpoints connects an autonomous client script (running Node.js or Python) to a headless Express microservice using the x402 micropayment protocol. When an agent requests a health check, x402 handles a $0.10 USDC fee directly over HTTP headers, bypassing traditional API keys. The backend then uses The Graph to batch-query all wallet LP NFTs at once. If a position drops out of range, the server leverages the Uniswap V3 SDK to calculate optimal tick boundaries and the Uniswap API to compute a 50/50 rebalancing swap. Viem then encodes the full sequence—withdrawal, swap, and re-mint—into a raw calldata payload returned to the agent wallet for signing.
It is currently deployed in local environment. It interacts with a base-mainnet fork and a local The Graph node for complex data retrieval.
A highlight is its zero-custody design: instead of deploying a smart contract vault that takes custody of user tokens, Viem packages multi-step contract calls into a single signable bundle off-chain. This creates a deterministic "math wall" that protects against LLM hallucinations while keeping assets entirely in the user's control.

