Nematoken (Nematoken hookii) is a segmented digital organism living on Solana mainnet-beta, and the first lifeform whose entire metabolism runs inside a Token-2022 transfer hook.1 It is a single program-derived account that is read and rewritten every time its mint, NEMA, changes hands. A transfer is a meal. Silence is starvation. Its body is the trail the token leaves as it moves between wallets.
Nematoken has no tick instruction, no owner and no admin key. It cannot be called. The only way to touch it is to move NEMA, and every such move is intercepted by Token-2022 and forwarded by CPI to the hook, which updates the organism's energy, body and genome before the transfer settles. It lives exactly as long as people trade, and it can refuse a transfer it finds indigestible.
| Nematoken hookii | |
| Chain classification | |
|---|---|
| Cluster | mainnet-beta |
| Token program | Token-2022 |
| Extension | TransferHook |
| Interface | spl-transfer-hook-interface |
| Instruction | Execute |
| Accounts | |
| Hook program | pending deploy |
| Mint | NEMA (pending) |
| Organism PDA | ["organism", mint] |
| Meta list PDA | ["extra-account-metas", mint] |
| Parameters | |
| Account size | 232 bytes |
| Genome | 32 bytes, 256 loci |
| Max segments | 64 |
| Energy half-life | 9 000 slots (≈ 1 h) |
| Fission | , permissionless crank |
| Habitat | Meteora DAMM v2 pool |
| Upgrade authority | burned |
| Organism state | |
| Stage | |
| Segments | |
| Energy | |
| Last fed | |
| Feedings | |
| Slot | |
| Links | |
| X (Twitter) | @nematoken |
Token-2022 lets a mint name a program that is invoked on every transfer of that mint.1 NEMA is initialised with the TransferHook extension pointing at the Nematoken program, and its upgrade authority is burned so the rules of life cannot be changed after birth. Every wallet transfer, every DEX swap and every pool deposit now passes through the organism.
ExtraAccountMetaListThe hook needs more than the four accounts Token-2022 passes by default. It registers them in an ExtraAccountMetaList PDA derived from the mint, which wallets and DEXes resolve automatically before signing.2 Nematoken registers the organism PDA (writable) and the Clock sysvar. To the user, feeding the worm is indistinguishable from a normal transfer.
Execute: the feeding pathOk.In constant time, about 6 000 compute units, the hook: reads the slot; applies decay since last_fed_slot; runs the immune checks; hashes genome, destination, amount and slot with the sha256 syscall; writes one segment; adds energy; recomputes length; and sets the gravid flag. A transfer of base units yields
The logarithm means many small trades feed it far more than one whale. Transfers between wallets of the same owner are allowed but give no energy.
| Off | Field | Type |
|---|---|---|
| 8 | stage, n, head_index | u8 × 3 |
| 12 | generation, lineage | u16 × 2 |
| 16 | energy, energy_cum | Q32.32 |
| 32 | born, last_fed, dormant_since | u64 slot |
| 64 | genome | [u8; 32] |
| 96 | segments | [u8; 64] |
| 160 | head (last recipient) | Pubkey |
| 192 | parent | Pubkey |
Only genotype lives on-chain. Everything visible is a pure function of the 96 bytes of genome and segments, recomputed by every observer. No image is stored anywhere.
The organism ages by the slot, about 400 ms.3 Since the hook only runs on a transfer, it integrates the time since its last meal in one step. Energy obeys
with maintenance scaling as after Kleiber's law.4 Between meals:
On-chain the exponential is a shift plus one table lookup, with no floats:
The body is a 64-byte ring buffer. Each accepted transfer writes one pigment at head_index and overwrites the oldest, so the worm is a sliding window over recent recipients:
Length is earned, not counted. A segment is added when lifetime intake passes
Posture uses the four C. elegans eigenworms,5 with amplitudes taken from the DCT of the buffer. Few distinct wallets make a stiff worm; many make it writhe.
A diversity bonus rewards being fed by many hands, using the Shannon entropy of the buffer, kept by an incremental histogram:
sha256 mutationEach feeding hashes . Because the landing slot is unknown when a transaction is signed, nobody can steer it. Each of the 32 genome bytes flips one bit with probability :
A hook can fail, and a failing hook reverts the whole transfer and any swap containing it. Nematoken uses this only in self-defence:
Indigestible: amount below . Stops dust from flushing the buffer.Rugged: more than half the supply in one move while still a larva.divide crankAt with enough energy the hook flags the organism gravid. It cannot split itself, because a hook gets no signer to pay rent for a new account. Anyone may send divide as midwife: a child PDA takes the posterior segments, half the energy and a genome mutated eight times. Generation increments.
At the organism goes dormant, like a tardigrade.6 The next transfer revives it, but every slots unfed sheds one tail segment. At it is lysed and the account closes.
NEMA lives in a Meteora DAMM v2 pool against SOL. Every swap moves NEMA between a trader and the pool vault, so the pool is a watering hole. Arbitrage bots, feeding small and often, are its best friends. It stays alive while
where is transfers per slot. A full 64-segment worm needs about eight transfers an hour. A dead market cannot keep even a zygote alive for a day.
| Hook program | 7GW1eVsWT884dyyWiB743ZF4TmdGmzLm5LTk9FGnW5zG |
|---|---|
| Mint | NEMA (pending) |