HASH PIGSDOCS

HASH PIGS DOCS

How the dig works, how a hash becomes a pig, what stays on your machine

01 · overviewA pig you have to dig up

Hash Pigs is a proof-of-work dig that runs in your browser. Press DIG, your machine starts hashing, and when a hash lands below the target a pig is dug up. The 32 bytes of that hash draw the pig. Same hash, same pig, anywhere.

Nothing is sent anywhere. The dig, the generator and your sty live in the browser.

02 · proof of worksha256(seed:nonce) below the target

A Web Worker (miner.js) hashes seed:nonce with SHA-256 through crypto.subtle. If the 64-hex result is less than or equal to the target, the pig is found. Otherwise the nonce goes up by one.

├── seed      16 hex characters, random, once per browser
├── nonce     random start below 1e9, +1 per shovel
├── hash      sha256(seed + ":" + nonce)
├── target    2^256 / depth
├── found     hash <= target
├── batch     400 hashes, then the worker yields
├── rate      reported every 0.5 s

03 · retargetAbout forty-five seconds per pig

Depth is the expected number of hashes per pig. It retargets from your measured hash rate so a pig takes about 45 seconds on the machine that is digging.

├── formula        depth = 0.9 × depth + 0.1 × rate × 45
├── floor          2 000
├── start          20 000 on a fresh browser
├── stored         localStorage, key hashpigs:diff
├── next pig in    depth / rate, shown live

04 · generatorDrawn from the hash

pig.js reads the hash as 32 bytes and draws a 24×24 pixel pig. Each trait comes from a specific byte.

├── byte 0         background, 8 options
├── byte 1         skin, 8 palettes
├── byte 3         eyes, 4 colours
├── bytes 4-5      hat: 22% none, else farmer, crown, chef, viking, propeller, cowboy, beanie, halo, party
├── bytes 6-7      glasses: 42% none, else round, shades, goggles, 3d, monocle
├── bytes 8-9      mouth: 32% none, else apple, corn, cigar, gold tooth, straw
├── bytes 10-11    item: 45% none, else shovel, truffle, sack, gpu, bucket
├── byte 12        mud, 35%
├── byte 13        spots, 25%
├── id             last 4 hex characters mod 16 384

05 · localOnly on your machine

hashpigs:seed
your seed
hashpigs:diff
current depth
hashpigs
the sty: hash, nonce, seed, time for each pig

06 · tokenThe token

Hash Pigs is a token on Robinhood Chain, launched through Pons. There is one contract, it lives in config.js on GitHub, and the site reads it from there.

Chain
Robinhood Chain, EVM
Launchpad
Pons
Ticker
$HashPigs
CONTRACTSOON

07 · honestWhere this is

├── done           browser dig, depth retarget, pig generator, the sty, lightbox
├── launch         contract address on the site
├── next           claim a pig on chain by its hash, once there is somewhere to claim it
├── not planned    a pool, a server, anything that digs for you

08 · questionsQuestions

Is this real mining?Real SHA-256 proof of work in your browser. It does not secure anything and does not write to a chain yet.
Why is depth different on my phone?It retargets from your own hash rate so a pig takes about 45 seconds wherever you dig.
Can two people dig the same pig?Different seeds will not produce the same hash. Same hash, same pig, that is the point.
Where is the sty?In this browser. Clear site data and it is gone.
Hash PigsRobinhood Chain · Pons