Every number this project shows is either a named constant of the Cairo source, arithmetic the Cairo performs, or a value read off a chain while you are looking at it. This page is where the first two are written down, and where the thing that is missing is written down too.
What is missing
read this before anything elseThere is no circuit
No AIR. No Cairo program. No prover. No proof. IShieldVerifier is the
interface of a proof system that does not exist in the repository. The only
implementations of it are mocks::AcceptAnything and
mocks::RefuseAnything — a stub that returns true and a stub that
returns false. MODE_PROOF is reachable, compiled and
unit-tested against that stub; it is not proven, and calling it proven would be
a lie.
The same hole shows up on the verifier side. integrity.cairo asks
Integrity's live mainnet FactRegistry whether a fact is registered,
and a fact is Poseidon(program_hash, Poseidon(output)). For that to mean
anything, somebody must have run a Cairo program whose output is a spend's public inputs
and proved its execution with Stone or Stwo. That Cairo program does not exist.
program_hash is a constructor argument because there is nothing to hash yet.
The plumbing is real and tested; the thing the plumbing would carry is not written.
So the mode that ships publishes the note
proof_mode() answers PATH_IN_THE_CLEAR whenever the verifier
address is zero, which is the only way this can be deployed today. In that mode,
exit_with_path and move_with_path carry — in the clear, in the
calldata, forever — the note's wots_seed, all sixty-six felts of its
signature, its nonce, its leaf_index, and all twenty siblings of
its Merkle path. Entry and exit are fully linkable. Anyone who indexes the chain can
join the Entered event that made leaf n to the Exited
event that spent it.
What none of it lets a reader do is spend anything. That is the one thing that
changed when the signature went in, and it was not a privacy fix: before it, a spend
published owner_secret while recipient was a free parameter of
the same call, so anybody who read the transaction before it was sequenced could resend
the identical calldata with their own address in it. Now the signature is taken over a
message that names the recipient, so the lifted version recovers a different key,
which rebuilds a different commitment, which is not the leaf it points at.
The bench lets you try it →
What an observer sees anyway, in every mode
- That a note entered tranche
tat timeT, becauseenteris a transaction. - Exactly how much collateral went in and how much debt went out — they are the tranche's denominations, and those are public constants of the deployment.
- The tranche's live note count, its two indices and its two aggregates.
- Every nullifier, and so how many notes have been retired.
- The price the oracle answered with, and whether a tranche is marked.
Everything genuinely private today, in one sentence
A live note is a hash. While it sits in the tree the chain holds
Poseidon(DOMAIN_NOTE, owner_pk, asset, collateral, debt, nonce) and
nothing else: not an owner, not an address, not a balance. That is real, and it is
considerably less than “seen by no one”.
And nothing is deployed
No Starknet contract, no Ethereum contract, no testnet, nothing. The addresses this project reads — Integrity's registry and Pragma's oracle — belong to other people and have never been sent a transaction by anything in this repository. The desk on the home page is a simulation running in your tab, and says so in its own header.
Constants
blackhole/src/constants.caironothing in the repo is a magic literal| name | value | what it decides |
|---|---|---|
| TREE_DEPTH | 20 | 2²⁰ = 1 048 576 note slots, and the length of every sibling path |
| ROOT_HISTORY | 32 | past roots that stay spendable, so a spend built against a root that has since moved still lands |
| BPS | 10 000 | 1.00× = 100% |
| MIN_HEALTH_BPS | 12 500 | 125%. Below it a tranche accepts no new notes and no moves |
| MAX_LEVERAGE_BPS | 50 000 | 5.00×. The same bound written as leverage — a test asserts leverage_bps(MIN_HEALTH_BPS) == MAX_LEVERAGE_BPS, so they are one rule |
| LIQ_HEALTH_BPS | 11 000 | 110%. Below it anyone may mark, which opens a window |
| LIQ_DISCOUNT_BPS | 300 | 3%. What a keeper is paid for absorbing — and the number that sets the cliff at 10 300 bps |
| ABSORB_WINDOW_SECONDS | 900 | how long a window stays open. While it is open no note can leave: that is the whole cost of not liquidating people one by one |
| MAX_ABSORB_BPS | 2 500 | the most debt one window may relieve — a quarter of what is owed |
| PRICE_SCALE | 100 000 000 | 1e8, because that is Pragma's decimals, asserted on every read rather than assumed |
| RAY | 1e27 | the fixed-point scale of both per-tranche indices |
| EMPTY_HEALTH_BPS | 1 000 000 000 | what health_bps answers for a tranche that owes nothing, so an empty tranche is always enterable |
| DOMAIN_NOTE | 'blackhole/note/v1' | 0x626c61636b686f6c652f6e6f74652f7631 |
| DOMAIN_NULL | 'blackhole/nullifier/v1' | 0x626c61636b686f6c652f6e756c6c69666965722f7631 |
| DOMAIN_ZERO | 'blackhole/empty-leaf/v1' | 0x626c61636b686f6c652f656d7074792d6c6561662f7631 — zeros[0] |
| MODE_PATH / MODE_PROOF | 'PATH_IN_THE_CLEAR' / 'PROOF' | what proof_mode() answers. Zero verifier address ⇒ the first |
The domain tags are readable ASCII on purpose: a tag you can print is a tag you can check against a spec without a decoder. Both a commitment and a nullifier are Poseidon over felts, and without a distinct first field one could be replayed as the other.
A note, field by field
blackhole/src/note.cairothis order, always| # | field | what it is |
|---|---|---|
| 0 | DOMAIN_NOTE | stops a commitment being replayed as a nullifier |
| 1 | owner_pk | a Winternitz public key — the only field an observer never learns while the note lives, and the only thing that can authorise a spend. Revealing it later authorises nothing: it is a key, not a secret |
| 2 | asset = asset_tag(tranche_id, gen) | tranche id above the generation, t × 2³² + gen. A note minted in one tranche cannot be spent in another, and a commitment built against a generation that has moved on is an unspendable leaf |
| 3 | collateral = denom_collateral | the tranche's denomination, bound into the note |
| 4 | debt = denom_debt | the other denomination, bound in too |
| 5 | nonce | makes two otherwise identical notes different leaves |
The contract cannot check fields 2–4 at entry: at entry it holds the hash and nothing else. It checks them at exit, when the preimage is revealed. A note committed with the wrong tranche id or the wrong denominations is simply unspendable and its deposit is lost. That is inherent to a commitment scheme, and it is why building the commitment is a client-side invariant rather than a contract one — which is what the desk's enter flow is actually for.
Golden vectors
Pinned in blackhole/tests/test_vectors.cairo; reproduce with
snforge test test_vectors. The home page recomputes all three in your browser
and will not claim anything if they move.
What opens a note
blackhole/src/wots.cairoWinternitz over Poseidon · no curveA Winternitz one-time signature is a hash chain walked forwards. The secret is the bottom of the chain, the public key is the top, and a signature is the chain stopped partway — at a height the message dictates. Verifying is walking the rest of the way.
Why not a curve. Shor's algorithm solves a discrete logarithm in polynomial time,
so a 251-bit curve has no margin left to argue about. Grover's only takes the square root
of a search, so a hash designed to 128 bits still answers for 64 — the bar NIST calls
category 1, and the bar AES-128 sits at. Those three numbers are
POSEIDON_SECURITY_BITS, GROVER_SECURITY_BITS and
CURVE_BITS_VS_SHOR, and pq_profile() reads them back off the
contract.
The parameters, and the identities between them
| constant | value | why that value |
|---|---|---|
| WOTS_W | 16 | four bits a chain — the usual trade of calldata against hashing |
| WOTS_MSG_CHAINS | 63 | 63 base-16 digits cover the 252 bits a felt252 can hold: 32 out of the low word, 31 out of the high one |
| WOTS_MAX_CHECKSUM | 945 | = 63 × 15, which is an assertion rather than a literal |
| WOTS_CSUM_CHAINS | 3 | 16³ = 4096 holds 945; 16² = 256 does not |
| WOTS_CHAINS | 66 | and therefore exactly 66 felts of signature |
The scheme, field for field
🔴 The checksum is the whole security argument
A forger can only walk a chain forwards, so every message whose digits are all at
least as large is reachable from a signature. The checksum is
sum(15 − digit): raise any digit by one and it falls by exactly one, so at
least one of the three checksum chains would have to be walked backwards, which is
a preimage. That is not asserted in prose —
raising_any_digit_lowers_the_checksum raises every raisable digit of a real
message one at a time and checks the drop, and
the_best_forgery_an_adversary_can_build_does_not_verify builds the best
forgery an adversary can and checks that it does not.
🔴 There is no verify call, and that is deliberate
check_signed_spend never checks a signature against a public key the caller
supplies. It recovers the key, rebuilds the note under it, and checks the Merkle
path. One check does the work of two, and it cannot be passed by handing it a key of your
choosing. A forged signature, a repointed recipient and a foreign seed all land the same
way: the recovered key does not open that leaf.
🔴 One key signs once
Two signatures under one Winternitz key leak enough to forge a third message. Here a key
opens exactly one leaf and the first spend that lands burns that leaf's nullifier, so the
bound on reuse is the nullifier set rather than the user's discipline. The one misuse the
contract cannot see is minting a replacement note under the same master, which is
why a_moved_note_must_be_minted_under_a_fresh_key is a test.
What it costs, measured
snforge test test_bench --detailed-resources, Cairo steps. Read as deltas.
The two subtractions are independent and they agree to within 3 393 steps, which is the rest of the entrypoint: the commitment, the twenty-level path, the nullifier and the storage write.
The token, and the pad it launches on
Launchy v6 · Starknet mainnet🔴 nothing launchedThe token launches on Launchy, on Starknet — the same chain as the protocol. That is the whole reason to prefer it: no bridge between a position and the token that names it, one settlement layer, and a fee sink that can be the Cairo contract rather than a Solidity one somewhere else.
Everything in this section is read with starknet_call while you look at it,
through the same relay as the rest of the page. None of these contracts is
Blackhole's, and nothing on this site launches anything.
2^128/100 = 1 % · tick spacing 20 000 · extension = the pad's poolGuard. Read out of pool_config() of the newest launch, not quoted from a document.
the 1 % splits50 % creator · 30 % the pad's treasury · 20 % Ekubo — and withdraw_creator_fees(memecoin, recipient) exists, which not every pad offers
registry0x064bdb4094881140bc39340146c5fcc5a187a98aec5a53f448ac702e5de5067e — register_token is what makes a launch appear in the pad's Markets list. Skipping it leaves the token live, tradeable and invisible there.
the address is known before the sendthe salt, memecoin_class_hash() and the factory as deployer give a deterministic Starknet address — checked 24/24 against real launches, by taking the salt out of a launch's own calldata and the address out of the MemecoinCreated event of the same transaction
🔴 The deployment fee moves between the read and the block
It is priced by a Pragma oracle. It read 41.10 STRK and then 41.41 STRK twenty minutes apart on 3 December, and 23.62 STRK on 6 December. A launch script that approves exactly what it read dies in the gap; the pad's own front approves 105 % of it, and so should anything else.
The name and the symbol
A name and a symbol are felt252 arguments of the launch call, fixed for the
life of the token the moment it lands. They were typed once, by the person who will send
the transaction:
0x426c61636b686f6c65, which is literally its own bytes
symbolBLACKHOLE = 0x424c41434b484f4c45
already taken on this pad?no — all 430 launches were listed and every one's symbol() read; nothing answers BLACKHOLE. A symbol is not unique and is spoofable, so this is a courtesy check, not a guarantee
🔴 addressnone. It has not been launched. The pad makes one predictable before the send — salt + memecoin_class_hash() + the factory as deployer — but predictable is not deployed, and nothing on this site prints an address it has not read off a chain
What this supersedes
An earlier build pointed the token at Stockereum on Ethereum, and the Solidity
folder still holds the BlackholeFeeSink written for it: two functions that
change anything, both permissionless, both with a single immutable destination, no owner
and no launch call. It is kept because it is tested and honest about itself, and it is
no longer the plan — that pad gates a launch behind an EIP-712 quote signed by its
own signer, which is recorded here as derived, decoded and unverified for our
use.
Entrypoints, and what each one publishes
blackhole/src/shield.cairono owner, no pauser, no upgrade path| entrypoint | calldata | publishes |
|---|---|---|
| enter(tranche_id, expected_gen, commitment) | 3 felts | the tranche, the time, the commitment, the new root, the leaf index, and the exact amounts — they are the tranche's constants |
| move_with_path(…) | 94 felts | wots_seed, 66 signature felts, nonce, leaf_index and all 20 siblings — none of which authorises anything else |
| exit_with_path(…) | 94 felts | the same, plus the recipient — which is inside the signed message, so it cannot be changed |
| move_with_proof / exit_with_proof | nullifier, root, proof span | only a nullifier — and there is no prover, so these are unreachable in practice |
| mark(tranche_id) | 1 felt | that the tranche is under 110%, and the window's deadline. Permissionless, moves no tokens, names nobody |
| absorb(tranche_id, relief_bps) | 3 felts (a u256 is two) | the keeper, the relief, the seizure, and health before and after |
| close(tranche_id) | 1 felt | that health is back over 125%. Permissionless, and it cannot be used to open a window |
The selectors the desk prints are starknet_keccak(name) — i.e.
keccak256(name) & (2²⁵⁰−1) — each computed with cast keccak
and masked. They have never been checked against a deployed class, because the class
they belong to has never been declared anywhere. The two read selectors the home page
uses against Pragma and Integrity were checked, against those classes' own
external entry points.
Liquidation without a victim
health_of, absorbboth terms are sums, so it names nobodyThe health rule
health_bps = total_collateral × price × BPS / PRICE_SCALE / total_debt
// and the same rule written as leverage:
leverage_bps = health_bps × BPS / (health_bps − BPS)
There is no per-note liquidation here and there cannot be one: the contract does not know which notes exist, only how many and what they are worth in aggregate. So a liquidation is a tranche event.
An absorption
relieved = total_debt × relief_bps / BPS seized = relieved × PRICE_SCALE × (BPS + LIQ_DISCOUNT_BPS) / (price × BPS) index_collateral ×= (total_collateral − seized) / total_collateral index_debt ×= (total_debt − relieved) / total_debt gen += 1
Both indices are multiplied down in proportion, so the haircut lands on every live note
at once, no note can be taken below zero, and the ordering of notes is preserved. A note's
value is then
denom × index_now / index_at(entry gen).
The cliff
Absorbing relief r for a seizure of
r × (BPS + LIQ_DISCOUNT_BPS) / BPS raises health if and only if health
exceeds BPS + LIQ_DISCOUNT_BPS = 10 300 bps. Below that a keeper would
be paid to make things worse, so absorb asserts
health_after > health_before and refuses. LIQ_HEALTH_BPS is
set 700 bps above that floor on purpose, so there is a band in which a keeper provably
helps. The home page's simulator has a button that walks straight off the cliff, and the
revert that follows is the contract's own.
What a keeper learns
That this tranche is under 110%, how many notes it holds, its two aggregates, and the price. All four were public before it called. It learns nothing about any individual note, and it cannot aim.
The two live contracts this is written against
confirmed by chain reads on 2026-12-03,SN_MAIN spec 0.10.3neither is oursPragma — the oracle
decimals. The adapter asserts it on every read: a pair answering in another scale would move every health number by a factor of a hundred, silently
what else is refusedfewer than 3 publishers, a price older than 3 600 s, a timestamp from the future, a zero price
Integrity — the STARK fact registry
How the browser's arithmetic is checked against the Cairo's
726 assertions over 145 printed vectorsA JavaScript Poseidon that disagrees with the contract's by one constant produces hashes that look exactly as convincing and are worthless. So the Cairo was made to print its own answers, and the browser is diffed against them.
tools/vectors/test_dump.cairois dropped into a scratch copy of~/blackhole— the contracts and their 72 tests are never touched — andsnforge test test_dumpprints 145BHVEClines.tools/vectors/parse.mjsturns them intojs/vectors.json.js/checks.jsrecomputes every one of them withjs/poseidon.jsandjs/engine.jsand compares. It runs in your browser on every load, andnode tools/diff.mjsruns the identical function and exits non-zero on a single mismatch.
What is covered: the three domain tags · the sponge at every length from 1 to 8, so both
padding parities · asset_tag · hash_pair · all 21
zeros levels · 21 commitments · 20 nullifiers · every one of the 380
siblings of 19 paths over 5 tree shapes, plus the root each implies and the root the
contract's own walker recomputes from it · the health rule and the leverage rule over 13
price points · 9 absorptions with relief, seizure, both indices, both aggregates and
health before and after · and two absorptions inside one window followed by an exit
settled against generation 0.
The round constants deserve their own line. Starknet's Hades derives them as
BE(sha256("Hades" + i)) mod p for 273 values;
tools/vectors/gen-rc.mjs generates them so the derivation is in the
repository rather than 273 copied literals. If one were wrong, not a single vector would
land.
Measured, not estimated
From snforge test test_bench --detailed-resources in ~/blackhole:
a commitment costs 191 Cairo steps and a nullifier 133; a twenty-deep path
check costs 9 432. An enter over the rig's baseline is
126 574 steps and an exit_with_path 166 189. 72
snforge tests pass, plus 13 forge tests in the
solidity/ leg.
The palette was read, not chosen
every hex carries the pixel it came fromSampled from the account's own banner (the band y=47…206, 493×160 px). The ground
#090909 is 60.97% of the band; the whole saturated hue census is one
family around 15°; the disc ramp runs #381A11 → #612E1F → #8C4531 → #B46045
→ #DD8160 → #F1A17B, one modal colour per luminance band, and the single brightest
pixel is #F4BDA0 at (325, 119).
--ink #F2E9E3, --ink-dim #BDADA5 and --bad #C46D50
are derived, not sampled, and are labelled as such in the stylesheet: the banner
contains no light neutral to read, so the ramp was continued one step past its brightest
pixel with the hue held and the saturation dropped. --bad exists because
--ember-3 measured 4.59:1 against the darkest surface — passing AA by 0.09,
which is too thin a margin to keep.
Type is Inter Tight and IBM Plex Mono. The plates are generated, screened over the ground so only their light survives, and anchored to the top of the document rather than fixed: fixed, a hot core stays in one screen position and every row of a dense table scrolls through it.