Repository navigation
Expand file tree
/
Copy pathbuild-deck.mjs
More file actions
28 lines (28 loc) · 17.7 KB
/
Copy pathbuild-deck.mjs
File metadata and controls
28 lines (28 loc) · 17.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import{readFileSync,writeFileSync}from'node:fs';
const fonts=readFileSync('site/fonts.css','utf8');
const foot='<div class="foot"><span>ProofSettle · Robert Moore · Creditcoin CC3 testnet</span><span>proofsettle.pages.dev</span><span class="n"></span></div>';
const slide=(eyebrow,title,body,cls='')=>`<section class="slide ${cls}">${cls==='title-slide'?brand:''}<div class="eyebrow">${eyebrow}</div><h2>${title}</h2><div class="body">${body}</div>${foot}</section>`;
const card=(n,title,text)=>`<article class="card"><div class="num">${n}</div><h3>${title}</h3><p>${text}</p></article>`;
const mark=readFileSync('deck/brand-mark.png').toString('base64');
const brand=`<img class="brand-mark" src="data:image/png;base64,${mark}" alt="ProofSettle">`;
const architecture=readFileSync('docs/architecture.svg','utf8');
const slides=[
slide('PRIVATE COMPUTE · VERIFIABLE PAYMENT','ProofSettle',`<div class="cover"><div><h1>Buy the answer.<br>Keep the record private.</h1><p class="lead">A funded order. A private answer.<br>Payment tied to verified delivery.</p><div class="chips"><span>Attestcoin</span><span>Creditcoin</span><span>Confidential Space</span></div></div><div class="cover-diagram"><div>Payment + buyer policy<small>Sepolia · Attestcoin proof</small></div><b>∧</b><div>Exact work + sealed delivery<small>Measured enclave · signed answer</small></div><b>↓</b><div class="green">Settlement on Creditcoin</div><small>Trusted return relayer → original Sepolia ETH</small></div></div>`,'title-slide'),
slide('01 / THE CUSTOMER','A lender needs a decision.<br>The provider must not get the record.',`<div class="cols"><div><p class="lead">Imagine a small lender scoring an applicant with six months of mobile-money history and no conventional credit file.</p><p class="copy">The lender can compute the features. A specialist supplies the model and compute. Neither a payment receipt nor a provider’s promise establishes that the requested private computation was delivered.</p><div class="callout">The buyer controls the acceptable build, model and input in the payment itself.</div></div><div class="sample"><div class="eyebrow">ILLUSTRATIVE SYNTHETIC APPLICANT</div><dl><dt>Transaction history</dt><dd>6 months</dd><dt>Regular inflows</dt><dd>14 / month</dd><dt>Prior loans</dt><dd>None</dd></dl><p>A deterministic logistic model scores eight synthetic financial-behaviour features.</p></div></div>`),
slide('02 / USE THE PRODUCT','One buyer. One order. One workspace.',`<div class="flow">${card('1','Prepare the order','Choose the synthetic applicant and acceptable build. The browser verifies the confidential workload before enabling payment.')}${card('2','Seal and pay','Review the order and approve a real Sepolia transaction. The sealed input and buyer requirements travel with the payment.')}${card('3','Receive and settle','Follow that order through Attestcoin, private delivery and original ETH withdrawal. Open the answer in the same browser.')}</div><div class="callout">Then change the required build and place a second order. A valid payment must still be refused when the execution does not match.</div><p class="caption">0.001 Sepolia ETH per order + gas. Attestation takes several minutes. Refused orders use the 30-day timeout refund.</p>`),
slide('03 / THE ARCHITECTURE','Two proofs meet at Creditcoin',`<div class="architecture">${architecture}</div><p class="caption">The worker submits both proofs in one settlement transaction. The buyer opens the delivered answer locally.</p>`),
slide('04 / WHY ATTESTCOIN IS ESSENTIAL','The proven payment carries executable policy.',`<div class="cols"><div><div class="code">JobCreated<br>├ buyer + provider + amount<br>├ required enclave measurement<br>├ model hash + salted input hash<br>├ encrypted envelope hash<br>└ settlement deadline</div></div><div class="checks"><p><b>Prove inclusion + continuity</b><br>Native verifier at 0x…0FD2; false returns fail closed.</p><p><b>Decode the successful receipt</b><br>EvmV1Decoder; pin the escrow emitter and event signature.</p><p><b>Enforce the buyer’s policy</b><br>Read the required build and request from that proven event.</p><p><b>Consume once</b><br>calculateTxIndex produces the replay key.</p></div></div><p class="caption">RawProofBuilder constructs proofs locally. ChainInfo at 0x…0FD3 reports the attested height. The hosted builder is a fallback, not an authority.</p>`),
slide('05 / THE ENFORCEMENT','A genuine enclave signature is not enough.',`<div class="flow">${card('A','Bind the request','keccak256(model hash, input hash, encrypted-envelope hash). Swapping the return key changes the envelope.')}${card('B','Bind the delivery','The signature commits to the exact payload appended to settlement. Dropping or replacing it fails.')}${card('C','Bind the domain','Job ID, chain ID, settlement address, result, service outcome and split are signed together.')}</div><div class="callout">The contract compares the signed request to the proven payment, and the signed delivery to the actual transaction bytes.</div><p class="caption">RequestMismatch and DeliveryMismatch are tested with real signatures. Reverted checks roll back proof consumption.</p>`),
slide('06 / LIVE EVIDENCE','A completed reference purchase, fully inspectable.',`<div class="evidence-rows"><div><b>01 · Paid on Sepolia</b><a href="https://sepolia.etherscan.io/tx/__PAYMENT_TX__"><code>__PAYMENT_TX__</code></a></div><div><b>02 · Settled on Creditcoin</b><a href="https://creditcoin-testnet.blockscout.com/tx/__SETTLE_TX__"><code>__SETTLE_TX__</code></a></div><div><b>03 · ETH withdrawn on Sepolia</b><a href="https://sepolia.etherscan.io/tx/__PAYOUT_TX__"><code>__PAYOUT_TX__</code></a></div></div><div class="cols shortcols"><div class="callout">Open the reference answer.<br><a href="https://proofsettle.pages.dev/desk.html?demo=1">proofsettle.pages.dev/desk.html?demo=1</a></div><p class="copy">Supporting reference transactions, separate from a new buyer’s purchase. A disposable key makes this synthetic answer public. New buyers keep their answer keys in their own browser.</p></div>`),
slide('07 / A NEGATIVE CASE YOU CAN REPLAY','The wrong build gets a mined refusal.',`<div class="cols"><div><p class="lead">The buyer pays successfully but names a build the serving enclave does not match.</p><p class="copy">Attestcoin proves the payment. The enclave supplies a genuine signature. Creditcoin still refuses it.</p><div class="revert">EnclaveNotAccepted</div><p class="caption">No settlement is recorded. The payment remains in escrow and is reclaimable after the source timeout.</p></div><div class="sample"><div class="eyebrow">MINED CREDITCOIN TRANSACTION · STATUS 0</div><a href="https://creditcoin-testnet.blockscout.com/tx/__REFUSAL_TX__"><code class="hash">__REFUSAL_TX__</code></a><p>The judging appendix reproduces the named error with a historical call. A reverted transaction is evidence of enforcement, not just a red screen.</p><a href="https://proofsettle.pages.dev/evidence.html#evidence">Inspect the reference refusal →</a></div></div>`),
slide('08 / EVIDENCE OF EXECUTION','Test the guarantee. Then remove it.',`<div class="stats"><div><b>65</b><span>contract tests passing</span></div><div><b>15</b><span>security mutations caught</span></div><div><b>10</b><span>enclave integration tests</span></div></div><div class="cols"><div><h3>Adversarial cases</h3><p class="copy">Substitute input, model or return key. Drop the delivered answer. Replay the source proof. Ignore a false oracle return. Upgrade a verdict. Refund an already released payment.</p></div><div><h3>Beyond unit tests</h3><p class="copy">Real enclave process, cryptographic round trip, browser wallet workflow, bad-attestation cases, deployment decisions, live chain readbacks and published source verification.</p></div></div><div class="command">npm run verify</div><p class="caption">Local tests use explicit fixtures where a native precompile or wallet is unavailable. Live readbacks are separate and labelled.</p>`),
slide('09 / THE TRUST BOUNDARIES','Precise claims are part of the product.',`<div class="grid4">${card('1','Public-chain privacy','Addresses, amounts, commitments and ciphertext are public. Plaintext inputs and accepted answers are encrypted.')}${card('2','Hardware enrollment','Google and the hardware root are trusted. A registrar binds the verified image to its key; the evidence is public.')}${card('3','Original ETH payout','A fixed trusted return relayer acts on Creditcoin state. This is not production Attestcoin writability.')}${card('4','Testnet limits','Public testnet prototype; synthetic model. Independent security review and underwriting validation precede production use.')}</div><p class="caption">The destination receipt token is non-transferable accounting history. It is not a second redeemable currency.</p>`),
slide('10 / FOR ATTESTCOIN BUILDERS','Four reusable pieces beyond this application',`<div class="reuse-list"><div><b>Proof consumption</b><p><code>AttestcoinProven.sol</code> verifies once and fails on false. <code>ComputeSettlement.sol</code> demonstrates receipt and emitter checks, with tests and mutations.</p></div><div><b>Public-RPC proof building</b><p><code>worker/block-provider.ts</code> supports nodes without <code>eth_getBlockReceipts</code>. A live comparison checks raw and hosted proofs byte for byte.</p></div><div><b>Payloads inside payments</b><p><code>enclave/envelope.mjs</code> carries sealed or plain bytes alongside ordinary Solidity arguments. Applications can bind those bytes to a proven event.</p></div><div><b>Reproducible measurements</b><p><code>script/measure.ts</code> scans verifier events and reports unread blocks. Its snapshot and the Hello Bridge fee correction are public.</p></div></div><p class="caption">10 Sep: 284 destination contracts and 38,982 transactions across 100,000 blocks. 23 Aug: 142 and 10,035. Source: <a href="https://github.com/iamrobertmoore/proofsettle/blob/main/site/measurement.json">measurement.json</a> and <a href="https://github.com/iamrobertmoore/attestcoin-protocol-examples/commit/378492809bc492a1653fe2f4f12194f8e93e4ced">published tutorial correction</a>.</p>`),
slide('11 / ROUTE TO ADOPTION','Start with one lender and one model provider.',`<div class="flow">${card('30 DAYS','Validate the workflow','Interview lender operations and model providers. Secure a design partner; agree a synthetic evaluation set and delivery requirements.')}${card('60 DAYS','Run a bounded pilot','Integrate one provider. Measure completion rate, proof latency, total cost and buyer recovery. Review the contracts and enrollment process independently.')}${card('90 DAYS','Earn expansion','Proceed only if the pilot demonstrates value. Add model/version lifecycle and recovery before supporting larger workloads or real borrower data.')}</div><div class="callout">Commercial hypothesis: a per-settlement integration/service fee. Pricing and willingness to pay must be validated with the pilot.</div><p class="caption">The next milestone is a design partner and a measured pilot.</p>`),
slide('12 / COMPETITIVE POSITION','A focused settlement primitive for private compute.',`<table><thead><tr><th>Approach</th><th>What it establishes</th><th>What ProofSettle adds</th></tr></thead><tbody><tr><td>Compute-payment marketplace</td><td>Purchase, credits and metering</td><td>Buyer-selected measured execution with sealed input and output</td></tr><tr><td>TEE inference endpoint</td><td>A measured workload and signed answer</td><td>A proven cross-chain payment bound to that exact request and delivery</td></tr><tr><td>Cross-chain payment proof</td><td>An event really happened</td><td>Policy from the event enforced against an independent proof system</td></tr></tbody></table><div class="callout">The differentiation is the composition: payment proof × measured work × exact request × delivered ciphertext.</div>`),
slide('13 / THE CONTRIBUTION','An oracle proves a fact.<br>ProofSettle enforces a policy.',`<div class="closing-proof">${brand}<div><p class="lead">The buyer’s requirements travel inside an Attestcoin-proven payment. Creditcoin checks them against the enclave’s independent signature.</p><p class="copy">A working private-compute purchase, plus reusable proof consumption, raw building, calldata payloads and measurement tools for other builders.</p><p class="copy">Robert Moore, solo builder. MIT open source.</p></div></div><div class="closing-addresses"><a href="https://proofsettle.pages.dev/desk.html">proofsettle.pages.dev</a><a href="https://github.com/iamrobertmoore/proofsettle">github.com/iamrobertmoore/proofsettle</a><code>npm run verify</code></div>`,'closing-slide')
];
const css=`${fonts}
*{box-sizing:border-box}body{margin:0;background:#0c0e10;color:#edf2f5;font:20px/1.55 Inter,Arial,sans-serif}a{color:#72efb7;text-decoration:none}.slide{width:1280px;height:720px;padding:42px 64px 62px;page-break-after:always;position:relative;display:flex;flex-direction:column;background:radial-gradient(ellipse at 95% 0%,#203b4140,transparent 60%),#0c0e10}.slide:last-child{page-break-after:auto}.eyebrow{font:11px monospace;letter-spacing:2px;color:#9eb2bf}h1,h2,h3,p{margin:0}h2{font:500 40px/1.16 Tektur,sans-serif;letter-spacing:-1px;margin:18px 0 24px}h3{font-size:21px;line-height:1.4;margin:14px 0 12px}.body{flex:1;min-height:0;display:flex;flex-direction:column;justify-content:center;gap:22px}.foot{position:absolute;bottom:24px;left:64px;right:64px;border-top:1px solid #314049;padding-top:11px;display:flex;justify-content:space-between;font:10px monospace;color:#94a7b2}.foot .n{color:#72efb7}.cols{display:grid;grid-template-columns:1.05fr 1fr;gap:50px;align-items:center}.lead{font-size:25px;line-height:1.5;color:#d2e1e8}.copy{font-size:18px;line-height:1.65;color:#adbfca;margin-top:20px}.callout{padding:19px 24px;background:#183128;border:1px solid #365c49;border-radius:6px;color:#c9eddb;font-size:20px;line-height:1.5}.caption{font-size:13px;line-height:1.6;color:#91a7b5}.sample{background:#131c22;border:1px solid #384b55;border-radius:8px;padding:28px}.sample p{font-size:17px;color:#9fb7c5;margin:20px 0}.sample dl{display:grid;grid-template-columns:1fr 1fr;font-size:20px;gap:20px}.sample dt{color:#a7bac6}.sample dd{text-align:right;margin:0}.flow{display:grid;grid-template-columns:repeat(3,1fr);gap:20px}.card{padding:23px;border:1px solid #334750;border-radius:7px;background:#121c21}.card .num{font:12px monospace;color:#72efb7}.card p{font-size:17px;line-height:1.65;color:#a4bbc9}.code{font:21px/2 monospace;color:#b7d6c6;background:#15231f;padding:28px;border-radius:7px}.checks p{font-size:17px;color:#a3bac7;line-height:1.5;margin:12px 0}.checks b{font-size:19px;color:#e2ebf0}.evidence-rows{border-top:1px solid #34454e}.evidence-rows>div{padding:18px 0;border-bottom:1px solid #34454e;display:grid;grid-template-columns:255px 1fr;align-items:center;gap:18px}.evidence-rows b{font-size:17px;font-weight:500}.evidence-rows code{font-size:15px;word-break:break-all;color:#b7d6c6}.shortcols{gap:30px}.shortcols .copy{margin:0;font-size:16px}.shortcols .callout{font-size:18px}.revert{font:29px monospace;color:#ffbb90;border:1px solid #795340;padding:22px;margin:22px 0;border-radius:5px}.hash{display:block;font-size:19px;word-break:break-all;margin-top:24px}.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:25px}.stats>div{border-bottom:1px solid #3d555d;padding:0 0 20px}.stats b{font:500 68px Tektur;color:#72efb7;display:block}.stats span{font-size:16px;color:#aac0ce}.stats+.cols .copy{margin:6px 0}.command{font:20px monospace;padding:18px 24px;background:#172229;border:1px solid #354951;border-radius:5px}.grid4{display:grid;grid-template-columns:1fr 1fr;gap:18px}.grid4 .card{padding:17px 23px}.grid4 h3{font-size:19px;margin:8px 0}.grid4 p{font-size:16px;line-height:1.5}table{border-collapse:collapse;font-size:17px;line-height:1.55}th,td{padding:20px 17px;border-bottom:1px solid #354b54;text-align:left}th{color:#72efb7;font-size:14px}td{color:#aec2ce}td:first-child{color:#edf2f5;width:27%}.chips{display:flex;gap:12px;margin-top:26px}.chips span{font:12px monospace;color:#b1c8d5;border:1px solid #3d5058;border-radius:4px;padding:9px 12px}.biglink{display:block;font:500 24px Tektur;margin-top:12px}.title-slide h2{font-size:24px;margin-bottom:4px}.title-slide h1{font:500 60px/1.15 Tektur;letter-spacing:-2px;color:#72efb7;margin:10px 0 23px}.title-slide .lead{font-size:23px}.cover{display:grid;grid-template-columns:1.2fr 1fr;gap:50px;align-items:center}.cover-diagram{border:1px solid #354b54;background:#12201f;padding:25px;text-align:center;border-radius:10px}.cover-diagram>div{padding:15px;border:1px solid #334c54;border-radius:5px;font-size:20px}.cover-diagram small{display:block;font:11px/1.5 monospace;color:#97b2c0;margin-top:7px}.cover-diagram b{display:block;color:#72efb7;font-size:24px;line-height:1.5}.cover-diagram .green{background:#244a36;color:#b6f3d3}.title-slide .body{justify-content:center}.architecture svg{display:block;width:100%;height:auto}.architecture{width:100%}.title-slide>.brand-mark{position:absolute;width:175px;height:auto;right:64px;top:20px}.closing-proof{display:grid;grid-template-columns:270px 1fr;gap:40px;align-items:center}.closing-proof .brand-mark{width:270px;height:auto}.closing-proof .lead{font-size:23px}.closing-proof .copy{font-size:17px;margin-top:15px}.closing-addresses{border-top:1px solid #365346;padding-top:18px;display:flex;flex-wrap:wrap;gap:14px 28px;font-size:16px}.reuse-list>div{display:grid;grid-template-columns:270px 1fr;gap:28px;padding:16px 0;border-bottom:1px solid #34454e}.reuse-list b{color:#72efb7;font-size:20px}.reuse-list p{font-size:17px;color:#adbfca;line-height:1.55}.reuse-list code{color:#d4e7dc;font-size:15px}.reuse-list+.caption{font-size:13px}@page{size:1280px 720px;margin:0}`;
writeFileSync('deck/deck.html',`<!doctype html><html><head><meta charset="utf-8"><title>ProofSettle</title><style>${css}</style></head><body>${slides.join('\n')}</body></html>`);
console.log('Wrote',slides.length,'slides');