
Aquara
Autonomous system that manage positions across 1inch Aqua strategies via EIP-7702.
Demo
About
Aquara is an autonomous system that manages concentrated liquidity positions on 1inch Aqua on Base, delegated through a scoped, revocable EIP-7702 session key so it can act without ever taking custody of the user's funds. The problem: once a concentrated strategy drifts out of its band, or was deployed into a pair with no flow, it earns exactly zero while the capital still looks "invested." Take a $3,000 LP split across two strategies: one band drifts out of range, the other sits in a pair nobody trades, and both show $0.00 volume every morning. The fix is a multi-leg operation (verify on-chain truth, get sane quotes, sequence approvals, dock, swap, ship), and every leg carries its own gas cost, revert risk, and stale-data trap. So instead of babysitting it daily, most LPs just leave it idle for weeks. Existing tooling doesn't help either: manual rotation demands 24/7 monitoring, custody-based vaults take away direct ownership, and one-shot scripts trust a single quote and fail cryptically on the first stale read. Aquara replaces that manual loop with a deterministic rotation cycle that runs on a 15-minute cron: - Evaluate: every position gets a verdict (healthy, depleted, side-depleted, oor-suspect, thin-allowance, inactive) from live chain reads, layered with trash rules and a gain gate. Proven dead capital skips both gates and rotates immediately. - Snapshot: raw balances and decimals are read straight from chain before docking, so under-backed positions are caught before anything moves. - Preflight + approve: swap routes are quote-checked with zero gas spent before committing; any quote priced more than 25% off spot is rejected outright, and missing approvals land in one batched transaction before docking starts. - Dock, merge, deploy: intents are cancelled (Aqua is allowance-based, so docking moves nothing), everything is merged into USDC using measured, not estimated, amounts, and one deploy call ships fresh positions into the current top earners. Each stage executes as a single atomic Calibur batch, with the relayer paying gas. Tokens never leave the user's wallet, every batch is simulated before it's sent, and every dollar is reconciled afterward, flagging anything beyond 3% drift between what was snapshotted and what actually got redeployed.
How it's made
Stack: a Bun 1.4 monorepo with web/ (Next.js 16, React 19, wagmi/viem) for the dashboard and API, rotator/ and taker-bot/ as separate Bun/Hono services, and Postgres/Prisma for jobs, decisions, and per-maker settings. No new smart contracts were written; the whole system is TypeScript orchestrating existing on-chain primitives, which is exactly why it was shippable in a 12-day window. The pieces are glued together as a shared library, not as APIs between services. The rotator cron imports web/lib/rotation.ts (the verdict engine), web/lib/oneinch-quote.ts (the quoter), and web/lib/calibur-agent.ts (execution) directly by relative path. That means the dashboard's manual "deploy" button and the autonomous cron run the literal same code path and can never disagree about what a position's state is or what a fair quote looks like. Partner technologies and what each bought us: - 1inch Aqua: its allowance model is the entire custody story. Strategies are virtual intents and tokens never leave the wallet, so docking moves nothing and rotation needed zero vault code. strategies/makers and strategies/overview give positions, bands, and performance windows; leaderboard/makers (with strategies/opened as a fallback) gives rotation targets. - 1inch Swap API v6.1: every merge and cover leg goes through one shared quote-then-swap function, so we never hand-rolled a router integration or slippage math, and both the dashboard and the cron inherit the same pacing, retries, and off-market sanity check for free. - 1inch Price API v1.1: the single source of spot truth, used three ways: proving a position is actually out of range (band vs. spot, not vibes), sizing USD budgets, and reconciling snapshot dollars against deployed dollars after every rotation. - Calibur / EIP-7702: one signature creates a scoped, 30-day, revocable session key. The whitelist (Aqua ship/dock, token approvals, the 1inch router) is the entire access-control layer; zero contracts deployed, zero custody surface to audit. - Base: gas cheap enough to make 15-minute cron ticks, per-leg simulation, and $1 demo positions make economic sense. The architecture assumes reverts are basically free, which would not hold on mainnet L1 gas.