Attackfee

Security for the write side of your site

Open to read. Priced to write.

AI agents are cheap to run and getting cheaper. Most of them only read, and that is fine. The ones that write fill your comment sections and grind your login page. Attackfee puts a small cost on every write. Reading stays free, including your docs and read APIs.

Try the demoRead the docs

  • Reads stay free. Page views are never gated.
  • Writes carry a cost. A person pays it once a visit, in the background.
Pale hail falls on a dark grid. Most cells stay open; a few are lit orange where a write was priced.

The cheap side of your site is the side that writes

Every public website has two halves. The read half serves pages, docs and API responses. It is built to be cached and crawled, and agents reading it is how people find you now.

The write half is small and fragile. A comment, a signup, a login attempt or a posted search query each cost you something real: a row in a database, a moderator's minute, a call to a paid search backend, a locked account. On most sites these routes cost the sender nothing at all. An agent can hit them ten thousand times before anyone looks at a dashboard.

Attackfee changes the price of the write half and leaves the read half alone.

How it works

  1. You mark the routes that change something. Comments, contact forms, signups, logins, posted search and write APIs. Each route gets a class: search, write, account or admin. A heavier class asks for more work. Anything you leave unmarked that is a GET stays a free read.
  2. A visitor's browser does a little background work. While someone reads or types, the page script does a short proof of work and trades it with your server for a pass. There is nothing to solve and nothing to click.
  3. The pass rides along with the post. Pressing Send just sends. One pass covers 20 actions for 15 minutes, so a person pays about once per visit.
  4. A write without a valid pass is refused. The server answers 403 and includes a fresh challenge.
  5. Volume pays again and again. A script has to earn a new pass every 20 actions. Ten thousand login attempts means earning 500 passes, each with its own round of work.

In the repo's benchmark the median check on a desktop took about 0.2 seconds, and about 0.4 seconds on an emulated phone. No real phone has been measured yet. If the work ever runs past 8 seconds, the page shows a "Verify before sending" button instead of waiting.

What stays open

Agents are welcome to read. Attackfee is built so that reading never costs anything.

What carries a cost

You decide which routes count and how heavy each one is. The four classes, from light to heavy:

A pass earned for a heavier class also covers the lighter ones.

For sites that see GPU-backed grinding, there is an optional memory-hard mode that is much harder to speed up on graphics cards. It is off by default because it is heavier on phones.

For agents

An agent that writes to an Attackfee site has a predictable path. It sends the Attackfee-Client: agent header and gets JSON back instead of an HTML page. When a write needs a pass, it does the same work a browser does and retries.

Paying per action over HTTP 402 instead of doing the work is built into the code and switched off. No Attackfee site takes payment today, and there is no price list. If a site owner turns it on later for their own copy, the owner decides which routes cost more by choosing their class.

Privacy

Attackfee prices actions without needing to know who sent them.

Limits

Security copy that skips this part is not worth reading, so here it is.

Where it runs

The packages are not on npm yet. Today you install them from a copy of the repo.

Send a write without a pass and see what your server says.

Try the demoRead the docs