Skip to content

About

An arcade built on Squeekchain's own round arithmetic: pack work into 10,000-unit rounds before the round closes.

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Latest commit

 

History

34 Commits

Folders and files

Repository files navigation

Squeek Pack

An arcade that runs on Squeekchain's own arithmetic. Squeektoshi's wheel produces work one pass at a time, and work is counted in rounds of ten minutes. You close the rounds: his running arrives as bursts, a round holds 10,000 work units, and work never moves from one round to the next. Pack what fits, let the rest go, and the round is priced at the difficulty your own rounds set.

One page. No wallet, no sign-up, nothing to buy. https://squeekpack.evm0x.com

The four expressions it runs on

Quoted from the Squeekchain whitepaper, and the only maths in the game:

blockUnits += floor(w × 10^12 / D)
D_next      = floor((29 × D + floor(w × 1,000 / 40)) / 30)   when w >= 40
D_next      = D                                              when w <  40
height      = floor(blockUnits / 10^9)

w is the work a round held, D is difficulty: the work that 1,000 Squeek blocks cost. A round holds at most 10,000 because ten minutes at the paper's minimum 60 ms between passes is exactly 10,000. A passage past the cap is rejected, and unused room is lost when the round closes, because work never moves between rounds.

Two consequences the game is built around:

  • Difficulty is a ratchet you turn yourself. A heavy round pulls difficulty a thirtieth of the way toward the level where that round's work would have earned exactly 40 blocks, so round four pays less per unit than round one. That is the rule, not a penalty.
  • The remainder carries. Every billion block units completes a block, so the fractional part of a round is not lost, it waits for the next round to push it over the line.

Playing

  • The chute is loaded before you touch anything. The burst sitting in it is the shift's own first burst, built from the block the page is reading, and START hands that same shift over rather than dealing a new one. So the number you decide on is the number you get.
  • A burst is one unbroken run, so it carries a work count: 150 units is nine seconds, 2,500 is two and a half minutes.
  • TAKE IT (space / enter) adds it to the round. LET IT PASS (↓ / backspace) drops it for good.
  • A burst that does not fit is rejected and still leaves the chute.
  • Each round offers 13,000 work against 10,000 of room, so about three bursts a round have to go. A round that lands exactly on 10,000 is sealed.
  • A shift is four rounds. Score is Squeek blocks completed.

Below the board

The round owns one screen. Everything under it is a manual page, and every panel reads the same chain reading the chute is priced with:

  • What a round is worth. Drag the rule and the page prices a round at the live difficulty with the whitepaper's own expression, including where the round leaves the difficulty afterwards.
  • The wheel, right now. Block height, block progress, core status and the difficulty, plus a line drawn from the samples this visit has taken. No second poller: the panel reads what the game already reads.
  • The shift log. A finished shift dies with its results sheet, so each one is written to this browser: seed, blocks, work, fill, rounds sealed. Ten deep, totals on top.
  • The holder ladder. LIGHT, HEAVY, PRIME, what each weight counts and what it buys.
  • Questions worth asking. Including the answers that make the page look worse.

What is real, and what is the arcade

Real: the round cap, the reject rule, the pricing, the difficulty ratchet, the block boundary, the starting difficulty, the shift seed.

The arcade, and labelled as such on the page: the clock is compressed (a burst waits about two seconds instead of ten minutes), and holder status buys sight, one burst of preview, not score. Nothing here signs, spends, or holds anything, and no number on screen is a chain balance. Block units are arithmetic, not a balance you own.

Data

Source Used for
api.squeekchain.com/v1/status builder.anchor.workPerThousandBlocks (starting difficulty), builder.anchor.blockHeight (which block seeds the shift), measurement.coreStatus and measurement.freshness (live / ghost / offline)
SqueekCore.state() on Sepolia, 0xFD6C166D4B8E2962E65746a13e5a0797CD4dE0c4 fallback for difficulty and block height when the API is silent
api.squeekchain.com/v1/accounts/<address> holder tier, read from the browser
community.squeekchain.com/v1/community/profiles/<code> holder tier by member code, via api.php because that host only sends CORS to squeekchain.com

If both are silent the shift starts at the paper's floor of 1,000 and says so on screen rather than inventing a number. With no chain reading at all the seed is marked LOCAL.

Files

File What it is
pack.js The rules. Pure functions, no DOM, no clock, no network: bursts, block units, difficulty, a shift state machine
packer.js The page. Phase machine, painting, the burst clock, sheets, keyboard
chain.js Polling and the seed, with the API's answers taking precedence over the contract's
round.js Shift seed derivation and the 1200×630 result card
audio.js Tones synthesised in the browser, so there are no audio files
holder.js Reads a public profile and returns a tier
api.php Server-side read of a member-code profile. Only needed for member codes
logo.svg The mark at full detail: a crate part filled, ruled in tens. Used in the header
favicon.svg, favicon-16x16.png, favicon-32x32.png, favicon.ico The same mark simplified, so it survives a 16 pixel tab
apple-touch-icon.png, android-chrome-*.png, site.webmanifest Install icons and manifest
og.png 1200x630 social card, referenced by the og:image tags
DESIGN.md The direction this build follows

pack.js is deliberately separable: node can load it and check the arithmetic without a browser. That is how the reject path, the seal path, the ratchet and the block boundary were verified before the page was wired to them.

Those checks now live in test/pack.test.js instead of in a scratch file. Thirty-three tests, no dependencies:

npm test

They pin each of the four expressions to the paper (including the floor in floor(29D + ...), which rounds the ratchet up by a thirtieth of the gap rather than down), the 13,000 offered against the 10,000 capacity, that work never crosses a round boundary, that a rejected passage is counted as lost, and that the same seed always replays byte for byte. The last of the twelve bursts is the remainder that makes the round add up, so it can land off the size table — that is asserted as its own invariant rather than left implicit.

Running it

Static hosting is enough:

python3 -m http.server 8080

For member-code holder reads you need PHP in front of it:

php -S 127.0.0.1:8080

The game itself never needs a server.

Credit

Built by evm0x. Rules and numbers belong to Squeekchain; the arcade around them is this repo's.

squeekchain-project: ea3a25e1-6786-476a-a774-eebcc79fd4e7

About

An arcade built on Squeekchain's own round arithmetic: pack work into 10,000-unit rounds before the round closes.

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages