Search projects, hackathons, sponsors and tech

    ← All projects

    Overdraft

    On 1inch Aqua, makers quote depth they can't back. Overdraft measures the gap and ships the fix.

    Demo

    About

    On 1inch Aqua, the liquidity you see isn't always liquidity you can trade. Aqua's trick is virtual balances: one wallet can back many positions at once, so a maker can quote far more depth than it could ever pay out. Great for capital efficiency, but it means quoted depth is a promise, not a guarantee, and nobody was checking how much of that promise is real. Overdraft checks. For every live position on every chain, it works out how much is actually backed (coverage = min(wallet, allowance) / committed), indexes it on The Graph, and reads the backing straight off-chain. On Ethereum right now: about $25.3M quoted against $1.6M backed. That's 6.3% real, $23.9M phantom, spread across 1,046 under-backed positions. Then it goes past a dashboard. We proved the gap actually bites (a real position quotes 15,818 1INCH; the fill reverts at settlement) and shipped SolvencyGuard, a SwapVM instruction that makes a position refuse to quote past its real backing. Funded makers are never blocked; overquotes revert before a single token moves. This isn't a knock on Aqua, which has been audited eight times. It's the coverage and monitoring layer those audits don't touch. Every number is live and reproducible, cross-checked against on-chain rawBalances.

    How it's made

    Indexing: one Subgraph schema deployed per chain (Ethereum + Base) on Subgraph Studio, plus a Rust Substreams module to reach Firehose-only chains a subgraph can't. Both read Aqua's Shipped/Docked events off the same schema. Coverage engine (Node + viem): it enumerates positions from The Graph, then reads min(balanceOf, allowance to Aqua) live on-chain, prices in USD via DefiLlama, and flags positions that quote more than a token's entire supply. Contracts (Foundry): SolvencyGuard is a custom SwapVM instruction (opcode 0x22) plus a modified AquaSwapVMRouter, tested against 1inch's real swap-vm on a mainnet fork (4 passing tests). Agent layer: an MCP server and a reusable SKILL over the subgraph, so any agent can ask about Aqua solvency in plain English. Site: one static page (no framework) with a live dashboard and an interactive guarded-swap demo that reads real backing via eth_call. A few hacky bits worth mentioning: we rebuild each position's Order from raw Shipped bytes to match its on-chain strategyHash; the router shifts opcode bytes down by one through an array trick, so the guard actually runs at byte 0x22; and enumeration falls back to a keyless Blockscout sweep when public RPCs gate eth_getLogs.