Your contract hides the vote. The ledger still shows it.
Tell finds what a Midnight Compact contract reveals about its private inputs, measures it in bits, and shows the fix before you deploy.
Free and open source, Apache-2.0. In CI: uses: RohanGlitched/tell@v1
- vote 00e7c2…85ca
- vote 00c6ab…d861
- vote 005289…663f
- vote 003baa…92e3
- vote 006da8…7e6c
- vote 002751…8dbe
6 of 6 votes recovered in four guesses. Each is hash(choice) with only four possible choices. Read them from the indexer now.
New in Wave 3Every point from the Wave 2 review, answered with something you can open.
You said. We did.
Read the whole list- doneOn Preprod, addresses in the READMEBoth ballots deployed with real votes, as the review asked.
- doneTell DeskA new contract on Preprod running its whole lifecycle: 4 sealed reports, an acknowledged, fixed and revealed finding, and 4 privacy grades a wallet can read.
- doneFixes, verifiedVerified patches for guessable hashes, secrets in the clear, the same tag on every action, branches and personal values, compiled and scanned again before they are offered: ballot F to B, vault F to A. Other kinds get the fix in words.
- doneShare links and a README badgeSend a report as a link; show your grade on GitHub.
- in progressReal outreach, trackedPublic issues to 11 teams naming the file and kind of finding, and one on Midnight's examples; replies and fixes counted as they come.
- doneWho paysFree core. Audit-firm licenses and an ecosystem grant first, private-repository checks later; prices are hypotheses, counted from the bottom.
Why this happensCompact checks that private data is disclosed on purpose. It does not check how much the disclosure gives away.
Midnight keeps private inputs off the chain. What a contract does with them can still give them away: a hash of a vote, a branch on a balance, the same tag on every post. Every contract has a .
Compiler and TellFive lines that compile, five secrets that leak.
Tell starts where disclose() stops.
id is public in the same call; the salary falls to brute force.The reportWritten to be read by a developer today and attached to an audit tomorrow.
Findings an auditor would write, in the time it takes to compile.
ballot-leaky.compact
Compact 0.31.1. Circuits register and vote and constructor. 3 findings.
- F-1critical
Guessable hash
choice() is hidden behind a persistentHash anyone can reverse. Circuit
vote, line 36. - F-2low
Linkable tag
voterKey() is hidden, but leaves the same tag every time. Circuit
register, line 27. - F-3low
Linkable tag
voterKey() is hidden, but leaves the same tag every time. Circuit
vote, line 32.
What a chain observer records when vote runs
- 1voters.member(tag)
- 2ballots.member(tag)
- 3ballots.insert(tag, hash(choice()), 2 bits)
The fix Tell wrote and verified
Scanned again
How it worksStatic analysis of what the compiler builds. No model, no sampling.
It reads your contract the way the compiler does.
- 1
Compile
Runs the Compact compiler your
pragmaasks for, preferring 0.31.1 for Ledger 8 and 0.36.0 for Ledger 9 (mainnet since November 6). - 2
Read the circuits
Uses the compiler’s
reduce-to-circuitform: helpers inlined, loops unrolled, every step a guarded binding. - 3
Trace and count
Follows each witness and argument through hashes, casts and branches to every public write, counting the bits that survive.
- 4
Grade and report
A to F per contract and a fix per finding, as text, JSON, SARIF or a report you can share.
IntegrationsOne engine, wherever the contract is being written.
Run it where you work.
GitHub Actioncode scanning
Checks every pull request that touches a .compact file. Findings appear in GitHub code scanning on the line that leaks; the build fails above the severity you choose.
- uses: RohanGlitched/tell@v1
with:
path: contract
fail-on: highCommand line
A readable report, JSON for scripts, SARIF for code scanning. Runs the compiler your pragma asks for.
npx tsx engine/src/cli.ts . --sarif tell.sarif --fail-on high
Web scanner
Paste a contract or a public repository. Share a report as a link that carries the contract itself; nothing is stored.
tell-midnight.vercel.app/scan
README badgenew
Your repository's grade on its README, refreshed about once a day.
[](https://tell-midnight.vercel.app/scan#r=OWNER/REPO)
Pull-request reviewwith verified fixes
The Action comments on the changed lines of each pull request with the finding, the bits it gives away and, where one passes, a verified patch as a suggestion you commit.
- uses: RohanGlitched/tell@v1
with:
comment: true
suggest-fixes: true
comment-on: mediumVS Code
Leaking lines marked on open and save, with the bits and the fix on hover, a quick fix that shows Tell's patch, and the grade in the status bar.
Problems: critical: choice() is hidden behind a persistentHash anyone can reverse (2 bits) Status bar: Tell: F
MCP serverfor coding agents
Agents that write Compact call tell_scan on what they wrote, tell_check_fix after each edit, and tell_explain_rule for the why. Runs locally; nothing is sent anywhere.
claude mcp add tell -- node /path/to/tell/mcp/dist/server.js
EvidenceAll of it reproducible from the open repository.
Proved on Midnight Preprod, not just in a test.
Two ballots, the same 6 votes, one line apart. The site reads both from the indexer and runs the attack Tell predicted.
6 of 6 votes recovered
Hash the four candidates, match the ledger. See it live
0 of 6 recovered
Each vote is a commitment with a salt only the voter holds. See it live
Every buildathon app, scanned
111 public repositories, 248 contracts compiled, 96 projects analysed circuit by circuit. 15 with a finding at medium or worse, each read by hand.
A 47B 34C 14F 1
Read the surveyThe leak zoo
Eleven leaks, eleven fixes (22 contracts), 22 attack tests in CI.
- ballot
hash(vote)attacked, fixed - payband
hash(id, salary)attacked, fixed - reserve
branch on a bidattacked, fixed - board
same tag per postattacked, fixed - vault
key cast to publicattacked, fixed - raffle
hash in the constructorattacked, fixed - faucet
shielded mint, public nonceattacked, fixed - deposit
bid paid in the clearattacked, fixed - club
own leaf as a lookup keyattacked, fixed - keyring
account id is the private keyattacked, fixed - poll
hash in a Ledger 9 eventattacked, fixed
Tell DeskCoordinated disclosure for privacy leaks, on Midnight.
Tell the team before you tell the world.
A public report of a privacy leak exposes the users first. Tell Desk seals the finding on Midnight, lets the team answer and fix it without announcing an open bug, and records the contract’s grade for wallets to read.
live on Preprod
Sealed finding
- 1Seal
The researcher seals the report. The ledger stores a commitment, a per-report tag, the time and status pending. The text goes to the team off chain.
- 2Acknowledge
The maintainer proves in zero knowledge that they hold the opening and a credential for that project. Status: acknowledged.
- 3Fix
Same proof again once the fix is out. Status: fixed. The chain never said which project it was: the proof hides among every registered maintainer credential, counted live below.
Who paysThe engine, CLI, Action and every rule are Apache-2.0.
Free for open source. Paid for private code and audit work.
Open-source core
live
Free
Always free. Public repositories never pay.
- Apache-2.0
- SARIF for GitHub code scanning
- Public repositories, unlimited
Hosted pull-request bot
planned
$49 per private repository a month
Planned; a hypothesis to test with the first pilot. Priced per repository, not per seat: Midnight teams are small. Public repositories stay free.
- Private repositories
- Fix suggestions on the pull request
- Grade history per contract
Audit-firm license
in progress
$3,000 to $6,000 a year per firm
A price we will test, not sold yet. Pilot talks requested with two firms on November 7; the first engagement is free.
- Bulk and private scans
- Report templates
- Rule updates for each compiler release
Ecosystem sponsorship
planned
By agreement
$30,000–60,000 for 12 months, to be requested; everything it pays for stays open source.
- Compiler and ledger release tracking
- Template integration
- Public survey reruns
Before you deployA contract’s history is public forever.