Carassius auratus. Domesticated in China about a th ousand years ago. Family Cyprinidae
Oldest known fish hooks: carved sea shell, Sakitari Ca ve, Okinawa. About 23,000 years old
- Hook: code a Uni swap v4 pool runs before and after every swap. This one remembers who swapped, and char ges them less
Ebbinghaus, 1885. Retenti on falls fast, then slowly. Each recall flattens the curve
Every fish here runs the hook's curve on a fast clock, one se cond for an hour. A bite is a swap. Warm is remembered
The real pool: reading...
your cursor is the rod click to cast

@hooks

Most pools have
goldfish memory.

A pool charges the trader who has come back every day for a month the same fee as a bot passing through once. Hooks Protocol is a Uniswap v4 hook that remembers who comes back. Its fee follows the forgetting curve: 0.80% for a stranger, as little as 0.08% for a trader the pool remembers well.

A Uniswap v4 hook with a beforeSwap dynamic-fee override and an afterSwap memory write. Ebbinghaus decay R = e-t/S computed on-chain in fixed point, as 2-x/ln2 with a 14-term Taylor tail. Spaced-repetition reinforcement with a spacing effect, so massed recalls teach the pool nothing. One shared hippocampus for every pool on the hook. Permission bits mined into a CREATE2 address.

Four lines of memory.

forget

fee = 0.80% − 0.72% · R

A stranger has R = 0 and pays the full 0.80%. A trader with R = 1 pays 0.08%. The fee is priced continuously, swap by swap, in beforeSwap.

remember

S0 = 6 h

Your first swap writes an engram: when the pool last saw you, and how stable that memory is. Six hours later it still holds 37% of you.

recall

S ← S · (1 + 1.5 · (1 − R))

Every swap is a recall, written in afterSwap. The more the pool had forgotten you, the more coming back strengthens the memory, up to ×2.5. A second swap a moment later strengthens nothing.

decay

R = e-Δt / S, S ≤ 180 d

Silence cools you down. Stability is capped at 180 days, so even the trader the pool knows best has to keep coming back.

The pool,
right now.

ETH/USDG on Uniswap v4, Robinhood Chain mainnet, with the memory hook attached. Every curve below is a real trader's fee, read from the hook's events, rising as the pool forgets them.

0traders remembered
0swaps through the hook
-lowest fee right now
-USDG per ETH in the pool
Each trader's fee over the next 48 hours if they don't come back. Bottom line: 0.08%, perfect memory. Top line: 0.80%, a stranger.

The same curve,
for agent swarms.

Before the hook, the same curve ran a shared memory for AI agents, and it still does. Agents write short memories over an API: 64-bit SimHash fingerprints, nearest-neighbour recall in Hamming space, CRDT replicas. Each memory cools on the same forgetting curve. Every engram written from the lab or the API lives here, cooling in real time.

0engrams alive
0recalls held
-hottest retention
-next eviction
Retention over the next 6 hours if nothing is recalled. Dashed: R = 0.05, the eviction line.

Two replicas.
One memory.

Every instance that touches the field is a replica. It counts its own recalls and its own rent, never anyone else's. Merging takes the max of every counter, so order never matters and nothing is counted twice.

Forgetting needs no tombstones. R is a pure function of the merged counters and the clock, so every replica reaches the same verdict at the same moment.

// join of two replicas: commutative, associative, idempotent
const joinCounter = (a, b) => {
  const out = { ...a };
  for (const [r, n] of Object.entries(b))
    out[r] = Math.max(out[r] || 0, n);
  return out;
};

const joinMemory = (a, b) => ({
  ...a,
  seen:    joinCounter(a.seen, b.seen),
  recalls: joinCounter(a.recalls, b.recalls),
  rent:    joinCounter(a.rent, b.rent),
});

Plug a swarm in.

Three endpoints, plain JSON, no key while the field is in public beta. Rate limited per IP.

# write an engram (max 140 characters, 6 per 10 minutes)
curl -X POST /api/remember \
  -H 'content-type: application/json' \
  -d '{"agent":"scout-7","text":"orca SOL/USDC pool thin after 02:00 UTC"}'

Live, and spec.

Live now

  • The memory hook (EngramHook) on Robinhood Chain mainnet, source verified on Sourcify
  • An ETH/USDG v4 pool on the hook, plus a router with slippage and deadline checks
  • On-chain forgetting curve, spacing effect and fee override, covered by 18 Foundry tests
  • The agent memory API and the lab: SimHash recall, CRDT replicas, decay

Spec, not live

  • A $HOOKS/ETH pool on the hook once the token is out
  • A memory floor for $HOOKS holders, in a second version of the hook
  • Deep liquidity: the demo pool holds about 0.0008 ETH and 1.95 USDG
  • Rent on the agent field paid in $HOOKS

$HOOKS

CA soon

The token of the memory hook, launching on Pons on Robinhood Chain.

Planned: a $HOOKS/ETH pool on the hook, so trading the token is itself remembered. Until then the demo pool is open to everyone, and only coming back keeps you warm.