Position inside a blockwas a claim.Now it is a fact.
index41 proves that transaction A executed before transaction B inside an Ethereum block — by reading each transaction's ordinal position out of the left/right laterality of its merkle authentication path. A relay bonds CTC behind “you will not be sandwiched”. When it happens, the contract asserts front < victim < back, computes the attacker's realized profit from proven logs, and pays the victim from the bond.
Index41 0xb37bc52b…efb10ec2 · chain 102031 · Index41.sol · no wallet, no API key, no .env — this page reads a public node
- 14 · 15 · 16
- positions recovered on-chain
- from the precompile’s own logs
- 1.456%
- of MAX_GAS_CAP — 1,092,100 gas
- three verifications, one transaction
- 8
- laterality bits per position
- one block, 240 transactions
- 120
- Foundry tests, all passing
- npm test — forge test --summary
Three rows of a real Ethereum block,lighting up in order.
Each row's position is dark until the merkle path's laterality has been read bit by bit. Then the index cell fills gold — because at that instant the position stopped being a claim. Block 25764741 was mined 2026-08-16 02:51:11 UTC.
Walk the authentication path leaf → root. Each sibling says which side you were on. L = sibling on the left, so this node was the right child, so the bit is 1.
| depth | sibling | side | bit·2^d | Σ |
|---|---|---|---|---|
| 0 | 0x3d20…51a2 | · | — | — |
| 1 | 0x39a6…f4d4 | · | — | — |
| 2 | 0x0229…cb91 | · | — | — |
| 3 | 0xe81e…8e7b | · | — | — |
| 4 | 0xb168…9605 | · | — | — |
| 5 | 0xefc8…a978 | · | — | — |
| 6 | 0x7af3…83c0 | · | — | — |
| 7 | 0xef11…6518 | · | — | — |
off-chain decode and on-chain emission agree
log 0 TransactionVerified(chainKey=3, height=25764741, txIndex=14)
log 1 TransactionVerified(chainKey=3, height=25764741, txIndex=15)
log 2 TransactionVerified(chainKey=3, height=25764741, txIndex=16)
log 3 SandwichProven(0x111112…373911, 25764741, 14, 15, 16, harm=219708, paid=219708)
log 4 HarmPaid(victim=0x51f400…6a1410, relay=0x9436ed…c45e24, 219708)
Path laterality is the index, in binary.
A merkle authentication path is normally treated as an opaque list of sibling hashes: something you fold to check membership and then throw away. But walking it leaf → root, every step also answers a second question — were you the left child or the right one? That single bit, at that depth, is one bit of your position in the tree.
Collect the bits least-significant-first and you have not verified a position someone told you. You have recovered it from the geometry of the proof itself, where it was never written down and therefore cannot be disputed. Creditcoin exposes exactly this as calculateTxIndex — and it is a view, so it costs nothing.
Ordering follows for free. If A's path decodes below B's path in the same block, A ran first. Not “probably”, not “according to an indexer” — provably, from bytes another chain already committed to.
Same eight bits the Attestcoin precompile folds on-chain. The page shows the off-chain decode and the on-chain emission side by side above, so a mismatch would be visible rather than hidden.
Three proof sources, one interface
The hosted by-index endpoint (no SDK binding, no official example), the SDK’s own by-hash batch, and a local raw builder that needs no proof service at all. Run with --kill-hosted and the local source reproduces the hosted merkle root byte for byte.
src/proof-sources.ts
The prover gets no benefit of the doubt
Before any gas: leaves re-encoded from mainnet and compared, paths re-folded to the root, and the continuity proof’s 60 roots chained until they land on a checkpoint Creditcoin already holds. An off-chain blob bound to on-chain state, for free.
src/audit.ts
Free dry run, then one transaction
calculateTxIndex is a view. Every position is recovered and every verification rehearsed at zero cost, and only then does one transaction spend 1,092,100 gas — 1.456% of the 75,000,000 cap — on three verifyAndEmit calls at once.
contracts/src/Index41.sol
Attestation waiting that reads the error
The proof API’s BlockNotReady payload carries block_number and last_attested_block. Subtract them, multiply by the source chain’s slot time, and you know the earliest instant a retry can succeed. No official example touches either field.
src/prover-api.ts
A ruling cannot be claimed twice
Three per-leg query ids and a composite claim id are burned when the court rules. Replaying the same sandwich against the same court is refused — demonstrated, not asserted, in a recorded run.
docs/pipeline-output-replay.txt
What it deliberately cannot do
Attestcoin proves transaction HISTORY, not STATE. There is no proof over eth_call, storage or balanceOf, and no on-chain batch verify. Harm is therefore derived from proven logs — never from a price read the protocol cannot attest.
docs/PIPELINE.md
Every number above, and where it came from.
A demo that shows a figure it cannot source is a mock in a costume. So here is the accounting, on the page rather than in a README.
| value on screen | what it is | where it came from |
|---|---|---|
| 14 / 15 / 16 | the three block positions | three TransactionVerified logs emitted by the Attestcoin verifier precompile 0x0000000000000000000000000000000000000fd2 inside CC3 transaction 0xd136dea0…4d243810 |
| RLLLRRRR / LLLLRRRR / RRRRLRRR | the merkle path laterality | one bit per sibling of the authentication paths returned by POST /api/v1/proof-batch/3 for exactly the positions the chain reported. Recorded in data/proof-artifact.json, which refuses to be written if its own decode disagrees with the chain. |
| 1,092,100 gas · 1.456% | cost of the ruling | gasUsed from the same receipt, over the Attestcoin verifier gas cap of 75,000,000 |
| 219708 wei | the harm, and the payout | SandwichProven.harm and HarmPaid.amount — the searcher's realized profit, computed on-chain from the proven swap logs, not estimated |
| 240 txs | the source block | Ethereum mainnet block 25764741 header, read from a public mainnet RPC at capture time; block hash 0x2cf1cf66d6…859e8762 |
| 3 sources agree | the cross-check | for each leg the artifact re-derives the position from the path, asserts it equals the position the chain emitted, then asks a mainnet RPC and asserts that agrees too. A fourth, independent check takes one line and no key:curl -s https://eth.blockscout.com/api/v2/transactions/0xec3777f9d0e55d03b9caa3a4b8a786dd62e16eeb327a9f1c45dfbc79af618436 | jq .position |
No testimonials. Witnesses.
This project is days old and has no users to quote. Rather than invent some, here are the machines that checked it, quoted exactly, each with the file the line came out of.
TransactionVerified(chainKey=3, height=25764741, txIndex=15)
the Attestcoin verifier precompile, in log 1 of CC3 transaction 0xd136dea052…
data/proof-artifact.json → verifiedLogsfront-run RLLLRRRR → 14 merkle ok · leaf matches mainnet · 3520 bytes
the audit step, refusing to take the prover at its word
docs/pipeline-output.txtHTTP 422 BlockNotReady: The continuity proof cannot be created because block 25765103 is not attested to yet. Last attested block: 25765100
the proof service, asked for a height it could not possibly serve
docs/pipeline-output.txt — the payload the adaptive poller readsIn the --kill-hosted run, source 3 reproduced the hosted merkle root 0x362ca563…76c16 and the same 60-root continuity proof exactly.
the local prover, with the proof service switched off entirely
docs/PIPELINE.mdThis court ruled on this exact sandwich at unix 1786853490: harm 219708, paid 219708. The replay guard is doing its job.
the contract, refusing to pay for the same sandwich twice
docs/pipeline-output-replay.txtblocks 100 fetched / 203 cached · transactions 1 fetched / 722 cached (20,983 back-filled from blocks) · 925 mainnet round-trips avoided
CachingBlockProvider, measured on the no-proof-service run
docs/PIPELINE.mdThe ones a judge should ask.
Including the uncomfortable ones about the name, the surface count and what the protocol cannot do.
Don't take the animation's word for it.Open the receipt.
Five logs, one Creditcoin transaction, 1,092,100 gas. Three of the logs were written by the Attestcoin precompile itself — not by this project's contract, and certainly not by this website.
# from the repository root
npm install
npm run dev # the page you are looking at
node scripts/capture-proof.mjs --check # re-read every source, diff the artifactno .env · no wallet · no API key. --check re-reads Creditcoin, the proof service and an Ethereum mainnet RPC, then exits non-zero if any of them disagrees with the committed artifact.
claim 0xd136dea052…7f4d243810 · block 5317821 · status success