Getting started

LEECH

A leech bites a coin and drinks half a percent of every trade that coin makes. These docs explain the bite, the draw, and the jar we keep the leeches in.

What it is

Every coin that trades has a vein: a stream of buys and sells moving through its pool. A leech attaches to that vein and takes 0.5% of each trade as it passes. It doesn't care whether the trade is a buy or a sell, a pump or a dump. Volume is blood.

The home page has a live plate of the twelve busiest veins on Solana. The pulses are real trades from GeckoTerminal, refreshed every minute. Apply a leech and you watch it fill up at the speed that coin actually trades.

The parts

PartWhat it does
VeinA trading coin, read from its most active pool.
LeechAttaches to one vein and draws half a percent per trade.
DrawWhat a leech has taken so far, in USD.
StageThread, Fed, Swollen, Gorged. Set by lifetime draw.
ClotA vein with no trades for five minutes. Leeches fall off.
The jarEight leeches per visitor on the plate. $LEECH is the jar on-chain.
NOTEThe plate reads real trades and computes every draw in your browser. Nothing on it signs a transaction or touches a wallet.

Where to go next

  • Quick start — apply your first leech in under a minute.
  • The draw — the formula, with numbers.
  • leech.js — the same arithmetic as a module you can import.
Getting started

Quick start

Three clicks on the plate, or six lines of code.

On the plate

  1. Open the plate. Twelve veins are labelled Fig. 1 to Fig. 12 with their tickers.
  2. Click anywhere on a vein's own branch. A leech leaves the jar and latches on.
  3. Watch the red pulses. Each one that passes the leech is a gulp, and the floating number is what it drew.

Click a leech to read its card: stage, drawn, gulps, how many share the vein, and how fast it's drinking. Pull it off sends it back to the jar with everything it drew still inside.

In code

import { veins, draw, stage } from "https://leechfamily.vercel.app/lib/leech.js";

const ward = await veins();            // 12 busiest Solana veins
const v = ward[0];
const usd = draw(v, { leeches: 1, minutes: 60 });
console.log(v.symbol, usd.toFixed(2), stage(usd).name);
<script type="module">
  import { veins, draw } from "https://leechfamily.vercel.app/lib/leech.js";
  const [v] = await veins({ limit: 1 });
  document.body.textContent = `$${v.symbol}: $${draw(v, { minutes: 60 }).toFixed(2)} an hour`;
</script>

Try it

This runs the module above against the live ward, right here.

Leeches per vein Minutes
Press the button. It fetches twelve veins and works out one leech's draw on each.
The procedure

How it works

A trade goes through a vein. A leech on that vein takes its half percent. The rest of the trade carries on, a little lighter.

The loop

  1. Read. The ward pulls the twelve most active Solana pools every minute.
  2. Pulse. Each vein sends pulses at its real trade rate. One pulse can stand for a batch of trades when a coin trades faster than the eye can follow.
  3. Bite. When a pulse crosses a leech, the leech draws value × 0.005 ÷ leeches on the vein.
  4. Swell. The leech's lifetime draw sets its stage and its size.
  5. Clot. A vein that stops trading drops its leeches back into the jar.

Why volume, not price

A leech doesn't need the coin to go up. It needs the coin to move. A coin that dumps 40% on heavy selling feeds a leech better than a coin that drifts up 2% on nothing. That's the whole joke, and also the whole design.

NOTEPulses are spaced for the eye, but their value is not. If a coin does 300 trades a minute and the plate shows 2.4 pulses a second, each pulse carries the dollars of about two trades. The total per minute matches the real volume.
The procedure

Veins

A vein is one coin's busiest pool, as GeckoTerminal sees it in the last five minutes and the last hour.

Fields

FieldMeaningFrom
figPosition on the plate, 1 to 12trending rank
symbolBase token tickername before “ / ”
poolPool address on Solanaaddress
tradesPerMinPulse: buys + sells in 5 min ÷ 5transactions.m5
bloodPer5mUSD traded in 5 minvolume_usd.m5
bloodPerHourUSD traded in 1 hvolume_usd.h1
avgTradebloodPer5m ÷ trades in 5 minderived
change1hPrice change, 1 h, %price_change_percentage.h1
clottedNo trades in 5 minderived

Refresh and turnover

The ward refreshes every 60 seconds. A coin that is still trending keeps its figure number. A coin that drops off the list gives its bed to the next one, and any leeches on it fall off with what they drew. The Bleeding Book writes it down.

The procedure

Attach

A leech bites a vein's own branch, never the shared trunk.

Where it can bite

Each vein shares its lower trunk with others. A leech can only bite the branch that belongs to one coin, from its last fork up to the tip. That keeps every draw tied to exactly one coin's trades.

Rules

CaseWhat happens
Jar emptyNothing bites. Pull a leech off first.
Vein clottedRefused. There's nothing to drink.
Eight already on the veinRefused. The ninth has nowhere to bite.
Click misses a veinNothing happens. Leeches need blood, not paper.

Position matters, a little

Pulses travel from the root up to the tip. A leech near the fork gets each pulse first; a leech near the tip gets it after the others have drunk. Every leech on a vein still draws an equal share of each trade, so position changes timing, not the amount.

The procedure

The draw

Half a percent of every trade, split evenly between the leeches on the vein.

Formula

draw per trade  = trade_usd × 0.005 ÷ leeches_on_vein
draw per minute = (volume_usd.m5 ÷ 5) × 0.005 ÷ leeches_on_vein

Worked examples

VeinVolume, 5 minLeechesOne leech / minOne leech / h
Quiet coin$7501$0.75$45.00
Busy coin$40,0001$40.00$2,400.00
Busy coin, crowded$40,0004$10.00$600.00

From the command line

curl -s "https://api.geckoterminal.com/api/v2/networks/solana/trending_pools?page=1" \
  | jq -r '.data[:12][] | .attributes
      | "\(.name)\t$\((.volume_usd.m5|tonumber) / 5 * 0.005 | . * 100 | round / 100) / min"'
WARNINGTrending lists move fast. A vein that draws $40 a minute now can be clotted in ten. Read the draw as a rate, not a promise.
The procedure

Crowding

Two leeches on one vein drink the same blood. Each gets half.

The split

The vein doesn't bleed faster because more leeches are on it. The half percent per trade is fixed, and the leeches on the vein divide it evenly. Up to eight can share one vein.

Leeches on veinEach draws
10.500% of each trade
20.250%
40.125%
80.0625%

What that means

A crowded busy vein can still beat an empty quiet one. The ward table's last column shows what one more leech would draw on each vein right now, already split by the leeches that are there.

The procedure

Stages

A leech's lifetime draw decides its stage and how fat it looks.

Thresholds

StageFromLooks like
Thread$0Thin, quick, all stripes
Fed$1Rounder in the middle
Swollen$10Twice the width, slow to move
Gorged$50Full size. It stops looking hungry, but it keeps drinking

Size

Size grows with the square root of the draw, capped at Gorged: swell = min(1, √(drawn ÷ 50)). Pulling a leech off doesn't reset it. A Gorged leech put on a new vein arrives Gorged.

The procedure

Clotting

No trades for five minutes and the vein clots. Leeches don't wait around.

When it happens

On each refresh, a vein with zero buys and zero sells in the last five minutes is marked clotted. It turns grey on the plate, its label is struck through, and every leech on it falls off and crawls back to the jar.

What they keep

Everything. A fallen leech keeps its full draw and its stage. It just needs a new vein.

NOTEA coin leaving the trending list is treated the same way: the leeches fall off and a new coin takes the figure number.
The procedure

The Bleeding Book

A ruled ledger under the plate that writes down every bite, every stage and every fall.

Entries

EventExample
AttachNo. 3 latched onto Fig. 5, $WIF.
StageNo. 3 is now Swollen on $WIF. $10.42 inside.
Pull offNo. 3 came off $WIF with $12.08 inside. Back in the jar.
ClotFig. 5, $WIF, clotted. No. 3 fell off with $12.08 inside.
Turnover$BONK took the bed at Fig. 5.

The book keeps the last 80 entries and lives only in your tab. Close it and the ink dries.

The procedure

The family

LEECH drinks from the trade itself. Seven cousins drink from everything around it.

The cousins

Fig.NameDrinksWhere it bites
ILEECH0.5% of the tradeThe vein itself, on the plate
IIThe StokerGasThe base fee every transaction pays to run
IIISir SandwichMEVA buy before your swap and a sell after it
IVMiss SlipSlippageThe gap between the quoted price and the filled one
VThe ConductorPriority feesThe tip that moves you up the queue
VIThe TollkeeperBridge feesMoving coins from one chain to another
VIILord LiquidityLP feesThe pool's cut of every swap
VIIIThe ArtistCreator feesThe launcher's share of every trade on a new coin

Poking them

On the home page every cousin is a figure you can click. It gulps, spills a little gold, and tells you what it just took. LEECH himself swells up on each poke with a real trade from the busiest live vein, and after eight pokes he's gorged for a few seconds.

Reference

leech.js

The arithmetic of a leech on a coin. One ES module, no dependencies, served from this site.

Import

import F, { veins, toVein, draw, stage, Leech, RATE } from "https://leechfamily.vercel.app/lib/leech.js";

API

ExportSignatureReturns
veinsveins({ limit?, fetch? })Promise of vein objects, busiest first
toVeintoVein(pool, fig)A vein from one GeckoTerminal pool
drawdraw(vein, { leeches?, minutes? })USD one leech draws
stagestage(usd){ index, name, next, toNext, swell }
Leechnew Leech(vein).gulp(usd, crowd), .stage, .detach()
RATEconstant0.005
STAGESconstantFour stages with thresholds

A leech by hand

const [v] = await veins({ limit: 1 });
const l = new Leech(v);
l.gulp(1200);        // a $1,200 trade passes: draws $6.00
l.gulp(300, 2);     // $300 trade, shared with one other: $0.75
console.log(l.drawn, l.stage.name);   // 6.75 "Fed"
l.detach();

In Node

Node 18+ has fetch built in. Save the module locally or pass your own fetch with veins({ fetch }).

Reference

Spec and constants

Every number the plate uses, in one place.

Constants

NameValueUsed for
RATE0.005Share of each trade a lone leech draws
MAX_PER_VEIN8Leeches one vein will hold
CLOT_AFTER_MIN5Minutes without trades before a clot
Jar size8Leeches per visitor on the plate
Ward size12Veins on the plate
Refresh60 sHow often the ward is re-read
Pulse cap2.4 / s per vein (1.6 on phones)Visual spacing; value is scaled to match volume

Number formats

Draws under one cent show four decimals ($0.0042), the rest show two. Blood per hour is shortened: $9.8k, $1.21M.

Reference

Data sources

One public endpoint, no key, read straight from your browser.

GeckoTerminal

curl -s "https://api.geckoterminal.com/api/v2/networks/solana/trending_pools?page=1"

The plate takes the first twelve pools from the trending list. Each pool's five-minute and one-hour buckets become a vein. Ticker links in the ward open the pool on DexScreener.

When it's down

If the first read fails, the plate shows offline · demo blood and runs on twelve made-up veins named VEIN1 to VEIN12 so you can still see a leech work. If a later read fails, the last good ward stays up and the badge goes grey.

NOTEGeckoTerminal's public API allows about 30 calls a minute per visitor. The plate uses one.
Reference

Limits

What a leech on this plate can't do, written down so nobody's surprised.

It can't

  • Move money. The plate reads trades; it never sends, signs or holds anything.
  • See trades that happen between refreshes one by one. It uses five-minute totals and spaces them into pulses.
  • Follow a coin off the trending list. When a coin leaves, its leeches fall off.
  • Remember you. Leeches, draws and the Bleeding Book live in your tab and reset when you close it.

Edge cases

CaseBehaviour
Same ticker twice on the wardTwo different pools. They are two different veins.
Volume reported but zero tradesTreated as clotted.
Tab in the backgroundThe browser slows the plate down; draws catch up in steps of a quarter second.
Token

$LEECH

The jar we keep every leech in.

Contract

CA: soon

Buy $LEECHChartX

Specs

ItemValue
Ticker$LEECH
ChainSolana
Supply1,000,000,000
Tax0%. A leech doesn't bite its own jar.
LiquidityIn the pool while the curve fills, burned when it completes
Mint and freeze authorityRenounced
Token

FAQ

Questions people ask the leech.

Are the trades real?

Yes. Every vein is a real Solana pool and the volume is what GeckoTerminal reports for it. The draw is what a leech would take at half a percent, worked out in your browser.

Does a leech prefer pumps?

No. It prefers trades. A coin bleeding out on heavy selling feeds it just as well as one going up.

Why can't I put nine on one vein?

Eight is the limit, and with eight each one only gets a sixteenth of a percent. Find a quieter vein to yourself.

Where did my leech go?

Its vein clotted or its coin left the ward. Check the Bleeding Book. It fell off with everything it drew and it's back in the jar.

Can I use the numbers in my own page?

Import leech.js. It's the same code the plate runs.