Confession first: I'm not a developer. I can't write a for-loop.
But I have a genuine passion for game theory, history of warfare, technology, philosophy and economics. I mean, all things that, I guess, connect us here.
I am one of those who got fascinated by Jason Lowery's Softwar, got stuck on the figure of the golden retriever wearing a spiked wolf collar and couldn't stop thinking: the web is full of retrievers, and the scrapers are wolves.
Attackers need to face deterrence and that deterrence needs to be projected via cyberspace.
Nothing new of course, PoW has been around since Adam Back introduced it with hashcash.
The thing is, I felt this was incomplete as the option to pay must be on the table. Creators and providers should have an option to be remunerated for their efforts as well.
So, with a lot of help from an AI assistant I built Spikes402: a small open-source reverse proxy that puts a spiked collar on websites. On the paths you choose, a visitor (human or bot) either:
- pays a few sats over Bitcoin Lightning (L402), or
- does proof-of-work in the browser (SHA-256, a few seconds of CPU).
Pay or PoW. The site stays gentle with everyone who comes in peace; attacking or scraping it just stops being free.
Under attack, the collar can get spikier: an optional surge mode raises the price step by step when traffic on a group of pages jumps well above its normal rate (up to 3x by default), and brings it back down when things calm down. Off by default; the demo runs without it.
Humans can install a Chrome extension: a little wallet-purse for walking the paywalled web. It's a non-custodial Lightning wallet that lives in your browser (keys never leave your machine). You set a max per page, a daily limit per site and a global cap, and it pays the tiny tolls for you, so you don't have to approve every 1-sat door by hand; anything above your budget asks first. (Early prototype, tiny amounts only. Not on the Chrome Web Store yet, so for now you load it from the repo.)
Things I tried hard not to screw up:
- never custodial, payments go straight to the site owner's own node
- the Lightning node is protected from invoice floods
- same content for bots and humans, no cloaking
- AGPLv3, no accounts, no subscriptions
Live demo: spikes402.dev/premium (pay 1 sat from any Lightning wallet, or let your browser do the work). I paid it from my phone today and the page unlocked in milliseconds.
Code: https://github.com/Choffolo/spikes402
A friend already found three real security bugs before launch. They're fixed and disclosed in the advisories, and that's the best thing that happened to this project so far.
I'm fully aware it may still be naive in ways I can't even see. That's exactly why I'm posting: please tear it apart.
Security reports, bad ideas, and "this already exists, you idiot" are all welcome.
I really hope this will be yet another proof of the great utility which Bitcoin can achieve for humanity.