index41
Creditcoin CC3 · liveAttestcoin native query verifierDeFi

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
The signature moment

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.

live chain readeth_getTransactionReceipt against rpc.cc3-testnet.creditcoin.network at 2026-08-16 12:00:59 UTC — the indices below are decoded from the Attestcoin precompile's own logs in that receipt.0xd136dea0…4d243810
Ethereum mainnet #25764741240 txs · merkle depth 8· swipe the ledger →
PositionTransactionpath → index
14 transactions above — index41 never touches them
··searcher buyfront-run0xec3777f9d0e5…79af618436········
··the victimvictim0x7b054188f739…cbb44485a0········
··searcher sellback-run0xb0cae362c6a6…10b65be23a········
223 transactions below — index41 never touches them
14 < 15 < 16order not asserted yet
Laterality decodefront-run

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.

depthsiblingsidebit·2^dΣ
00x3d20…51a2·
10x39a6…f4d4·
20x0229…cb91·
30xe81e…8e7b·
40xb168…9605·
50xefc8…a978·
60x7af3…83c0·
70xef11…6518·
path········
= index (off-chain)·
precompile emitted·

off-chain decode and on-chain emission agree

The ruling — logs of one Creditcoin transaction0xd136dea052…4d243810 on Blockscout

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)

bond → victim219,708wei of the numeraire, = the searcher's realized profitgas 1,092,1001.456% of the 75,000,000 MAX_GAS_CAP
The leap

Path laterality is the index, in binary.

why nothing else can see this

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.

worked example — front-run
path leaf → rootRLLLRRRR
L → 1, R → 001110000
least-significant first+2 +4 +8
= block position14

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

Provenance

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 screenwhat it iswhere it came from
14 / 15 / 16the three block positionsthree TransactionVerified logs emitted by the Attestcoin verifier precompile 0x0000000000000000000000000000000000000fd2 inside CC3 transaction 0xd136dea0…4d243810
RLLLRRRR / LLLLRRRR / RRRRLRRRthe merkle path lateralityone 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 rulinggasUsed from the same receipt, over the Attestcoin verifier gas cap of 75,000,000
219708 weithe harm, and the payoutSandwichProven.harm and HarmPaid.amount — the searcher's realized profit, computed on-chain from the proven swap logs, not estimated
240 txsthe source blockEthereum mainnet block 25764741 header, read from a public mainnet RPC at capture time; block hash 0x2cf1cf66d6…859e8762
3 sources agreethe cross-checkfor 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
Attestations

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 → verifiedLogs

front-run RLLLRRRR → 14 merkle ok · leaf matches mainnet · 3520 bytes

the audit step, refusing to take the prover at its word

docs/pipeline-output.txt

HTTP 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 reads

In 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.md

This 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.txt

blocks 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.md
Questions

The ones a judge should ask.

Including the uncomfortable ones about the name, the surface count and what the protocol cannot do.

Verify it yourself

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.

or reproduce the read on your own machine
# 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 artifact

no .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