Round 1 against STRATEGY-2026-10-23.md's backlog:
- Wire register_agent/stake/set_credit_score/deposit_liquidity to the real
Casper Testnet contracts (lib/casper/live_bridge.ts), verified live against
the real RPC node with a freshly generated (unfunded) keypair
(npm run casper:keygen). Honesty flags built in for the Odra payable
calling convention and the admin-gated set_credit_score call.
- Unblock NEAR's paid x402 route (npm run near:keygen generates a real
implicit account id); QIE stays correctly flagged as blocked on unconfirmed
external facts (asset contract, facilitator), not env plumbing.
- New public Home tab: live-stats hero, how-it-works, a real competitor
comparison table, and a "90-second proof" that calls the real API live in
the browser (verified end-to-end with gstack browse).
- Cold-start UX: visible retry state in X402Playground + the TS SDK, plus a
keep-warm self-ping (lib/services/keepalive.ts) so the free Render dyno
rarely idles out from under a real first-time caller.
- New GET /v1/credit-score/:agentId alias + docs/integrations/ samples for
Skyfire/Nevermined/Coinbase x402.
- Self-hosting quickstart: root docker-compose.yml + scripts/bootstrap.sh,
both run for real; fixed a real EACCES crash-loop bug in infra/Dockerfile
(non-root user never owned the /data volume mount) found while verifying.
450/450 tests pass, typecheck clean, frontend build clean.
The deploy manifest's contract_hash is the Odra contract *package* hash, which
cspr.live indexes at /contract-package/<hex>. We were linking /contract/<hex>,
which 404s for these (that route expects a per-version contract hash), so clicking
a contract link did not open the block explorer. Verified via the cspr.live API:
/contract-packages/<hex> resolves, /contracts/<hex> does not.
Fixes contract links across the On-Chain tab, footer, and Explorer search.
Deploy-tx and account links were already correct.
Surface the actual transactions we made on Casper Testnet. Pulled the 26 real
module-install deploys from the cspr.live account API (deploys.transactions.json,
committed for zero runtime dependency) and mapped each contract to its install
deploy via the Odra package-hash key name.
- data: deploys.transactions.json — real deploy hashes, blocks, timestamps
- backend: chain_manifest attaches deploy_hash + /deploy/<hash> cspr.live link to
each contract (latest install) and exposes the full transactions list
- frontend: On-Chain tab gets a "tx ↗" link per contract and a dedicated
"On-chain transactions — deploys we made" table (deploy hash, contract, block,
time), plus an "all account txs" link; stat row shows on-chain deploy count
- test: transaction linking + per-contract install-deploy coverage (244 pass)
Verified: sample deploy c9609ec2… (AgentRegistry install) resolves as a
processed deploy at block 8,204,027 on cspr.live.
Make Casper Testnet activity observable end-to-end. The 14 deployed Odra
contracts, the deployer account, and protocol events now link to the real
cspr.live block explorer instead of showing opaque, per-boot-random hashes.
- backend: /api/chain serves the canonical deploys.testnet.json manifest
enriched with cspr.live URLs (lib/services/chain_manifest.ts)
- backend: Explorer search resolves deployed contracts by name/crate/hash
and returns their cspr.live link
- backend: /api/export/events.csv exports the full on-chain event log
- frontend: new On-Chain tab — contract registry with real hashes + copy,
deployer account, per-contract live event counts, click-to-focus the feed,
and event-log CSV export
- frontend: EventFeed upgraded — text/severity filters, pause/resume with
buffered count, expand-to-JSON, contract-link, single-contract focus
- frontend: Explorer results link on-chain objects to cspr.live; header shows
a live chain pill; footer contracts link out
- test: chain_manifest + explorer contract-resolution coverage (242 pass)
The Vercel /api/:path* rewrite already proxies the new endpoints. Deployed
contracts/hashes/accounts link to cspr.live; the session event log's synthetic
deploy hashes are deliberately not linked.
ServiceVerticals makes each x402 family a first-class credit vertical with its
own underwriting profile: advance rate, revenue-volatility haircut, settlement
horizon, minimum track record, and required attestations. profileFor() resolves
a service type to its vertical; qualify() gates eligibility; sizeAdvance()
fronts revenue × advance_rate × (1 − volatility); register() lets governance
tune profiles. Seeded for all p1 category families (coverage-checked).
7 new tests, full suite 233 green. Completes roadmap p3–p10.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
EnterpriseRealFi adds the production access-control layer in front of the
oracle / data commons / attestation surfaces: named tenants on plans
(developer/growth/enterprise) with entitlement gating, a rolling 30-day quota,
a trailing 60s rate limit, suspend/resume, and a sequential, exportable audit
trail recording every allow/deny decision. guard() wraps authorize-then-run.
8 new tests, full suite 226 green.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
ReceiptProofSystem lets an agent prove a receipt is anchored on-chain and
disclose only chosen fields while hiding the rest. Each attribute is a
secret-salted hiding commitment H(key=value|salt); receipt leaves form a
Merkle tree whose root is the on-chain anchor; a DisclosureProof opens the
revealed fields, ships opaque commitments for the rest, and a Merkle path.
verify() needs no prover secret — anyone can check inclusion from the root.
Honest scope: commitment-based selective-disclosure + membership (the
dependency-free, Casper-verifiable Stage-4 primitive), not a full zk-SNARK.
6 new tests, full suite 218 green.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
RiskEngineV2 adds a logistic-regression PD model over a normalized agent
feature vector (reputation, accuracy, dispute rate, experience, revenue,
stake, category risk). train() fits weights by deterministic, L2-regularized
batch gradient descent on realized default/repay outcomes; score() returns
pd + ml_score + rules_score + a convex blended_score, so v2 augments the v1
rules policy rather than replacing it. A domain-calibrated prior makes it
useful before any training data.
5 new tests, full suite 212 green.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
DisputeJury: a deterministic, dispute-id-rooted panel of staked/reputable
agents votes the verdict; the plurality decision is issued on the DisputeCourt
with the median proposed slash, consensus jurors earn reputation and
dissenters/no-shows lose it. Decentralizes verdict authority off the single
judge agent.
CreditDataCommons: anonymized, k-anonymous public snapshot of protocol credit
performance (per-category + per-tier aggregates, dispute slash rate, no agent
ids, thin categories folded into 'other') — the data moat as a citable public
benchmark.
DAO parameter governance already shipped via GovernanceProposals.
9 new tests, full suite 207 green.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
CrossChainReconciler ties satellite-reported draws/repayments back to the
Casper-rooted GlobalExposureManager (single source of truth for global
exposure across all chains). reconcile() flags the over-borrow failure mode,
Casper-vs-satellite divergence, and unauthorized draws (no issuing CAN);
globalHeadroom() is the per-agent over-borrow guard satellites must respect.
7 new tests, full suite 198 green.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
lib/services/market_risk.ts: MarketRiskManager gates every draw (per-agent +
per-category + pool-utilization caps, approved-category allowlist for the beta)
and absorbs default losses from the insurance reserve with honest shortfall
reporting + coverage ratio. test/market_risk.test.ts (5). Suite green.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
lib/services/credit_oracle.ts: read-only creditCheck (policy-stamped), what-if
simulate, and batch checks so any third-party x402 platform queries Cred402 for
agent creditworthiness and gets the same Casper-rooted answer — works for non-RWA
services. test/credit_oracle.test.ts (5). 186 tests green.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- media/cred402-demo.mp4: 720p screencast of https://cred402.vercel.app driving the
full loop with the Casper streaming-events feed updating live (proves the
direct-CORS SSE end to end).
- scripts/record_demo.mjs + `npm run record:demo`: Playwright records the live site,
ffmpeg muxes to MP4. Raw .webm is gitignored.
- README: link the demo video.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- render.yaml: always-on web service `cred402-api` (node runtime, installs dev
deps so tsx is present, health check /v1/health) — Render runs the long-lived
node:http + SSE server the serverless Vercel deploy can't.
- api/server.ts: honor the platform-provided PORT (Render) before CRED402_PORT.
- frontend/vercel.json: rewrite /api/*, /v1/*, /graphql → https://cred402-api.onrender.com
so the deployed console reaches the backend same-origin (no CORS, no code change).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Replace the design-note docs (p1–p7) with the implemented "make it real" phase
docs (p8–p10) and wire production-grade, env-gated real integrations:
- p8 Casper Testnet: byte-exact deploys + WASM install via casper-js-sdk; live
node reads (node.testnet.casper.network); CRED402_CHAIN=sim|testnet transport.
- p9 x402 + data + MCP: real EIP-712 typed-data digests (@casper-ecosystem/
casper-eip-712); casper-x402 facilitator client (x402 V2); live Open-Meteo GHI;
official @modelcontextprotocol/sdk server; casper-sidecar SSE event feed.
- p10 RealFi + cross-chain: real Stripe test-mode webhooks (HMAC-verified) and
Plaid sandbox → privacy-preserving on-chain envelopes; Base Sepolia EVM deploy
(Foundry); reachable via /api/realfi/* and /api/x402/facilitator routes.
- Sign-in with Casper Wallet: real extension provider + challenge/ed25519/session
flow (/v1/auth/wallet/*), console connect + sign-in button.
- Branding: Cred402 logo mark, favicon, OG image; Vercel config for the console.
All env-gated with sim/free-API fallbacks; full suite green, all toolchains
(TS/Rust/Go/Solidity) build.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>