Sscalascript.dev

Crypto / finance roadmap — what we could build, and why

This is the single grouped home for the forward-looking crypto / blockchain / identity / payments work that used to live as a loose brainstorm in capabilities.md §7. It explains what each initiative is, why it matters, where it would be applied, and what we gain — in plain terms, item by item.

spec: specs/crypto-finance-roadmap.md.

both under the "Crypto/finance roadmap" headings.

Everything here follows one repeating shape, the same one FROST-Ed25519 already demonstrates end-to-end.


The one method behind all of it: reference → seam → gate → native

Every item below — a new chain, a threshold-signing protocol, a 2FA code generator, an identity format — is built the same way, because the codebase already proves this shape works:

  1. Reference — write a small, pure-ScalaScript / BigInteger / JDK implementation that avoids

platform-only APIs, so it compiles to every backend (JVM, JS, Rust, WASM) for free.

  1. Seam — define a trait for its primitives plus a register / current / reset registry, with the

reference as the always-available default.

  1. Gate — prove the reference correct by testing it against an existing, trusted implementation

(BouncyCastle, @noble/*, or published RFC test vectors).

  1. Native — optionally register(...) a per-platform native fast path (BouncyCastle on JVM, @noble on

JS, a Rust crate) that is then used transparently. Where none exists, the reference still runs.

FROST-Ed25519 is the textbook instance (see capabilities.md §6): a from-scratch Ed25519Group + Sha512 + protocol over BigInteger, behind a pluggable Ed25519Ops seam, gated against BouncyCastle, with an optional native backend — and it runs identically on JVM and JS. Every roadmap item is "do that again" for a new primitive. That's why this is cheap: new work is implement a trait, not design an architecture.


Where we stand today (honest snapshot)

AreaStatusNote
EVM (addresses, ABI v2, RLP, EIP-712/3009, sign, broadcast)✅ donepure-Scala encoders; has a JSON-RPC client (clientEvm)
Solana (message build, Base58, PDA, sign, broadcast)✅ donepure-Scala; broadcasts via the generic RPC seam — but no turnkey client module like EVM's
Crypto SPI (sign/verify/recover, hashes, HD, KDF, AEAD, X25519)✅ donecurves secp256k1 / Ed25519 / P-256; BouncyCastle (JVM) + @noble (JS)
FROST-Ed25519 threshold signing✅ doneour own, end-to-end to a wallet vault; runs on JVM and JS
Cardano / Bitcoin / Cosmos (CBOR, Bech32, PSBT, Amino)🟡 halfown encoders, but call BouncyCastle directly → JVM-only, not yet JS
BIP-32 HD on JS🟡 gap@noble backend deriveMaster/deriveChild currently throw
Blake2b in the crypto SPI🟡 gapKeccak-256 and RIPEMD-160 are already in HashAlgo; Blake2b is the one missing hash
Distributed transport between FROST signers🔴 not yetFrostQuorum holds shares in-process; no network layer yet

The takeaways that shape priority: the biggest single dependency we still carry is direct-BouncyCastle in three chains, and removing it is the same move we already did for SHA-512 in FROST. The smallest gap that finishes a whole network is a Solana client. And the most natural product we're ~90% toward is a distributed threshold-custody wallet.


Track 1 — Chains & currencies

The offline surface of most chains — addresses, transaction building, signing payloads — is just encoding + a signature. We already prove this is pure-Scala-doable (EVM and Solana). The heavy parts are only (a) a few curve/hash primitives and (b) RPC nodes.

1.1 Blake2b in the crypto SPI (foundation, highest leverage)

reference for the SPI to fall back on. (Keccak-256 and RIPEMD-160 already exist in the SPI.)

missing before three chains can drop their hard dependency.

(the impls), and consumed by Cardano addressing.

1.2 BIP-32 HD key derivation on JS (foundation)

(deriveMaster / deriveChild currently throw "not yet implemented on Scala.js").

and chain adapters can sign on the JVM but not in the browser.

1.3–1.5 Make Cardano / Bitcoin / Cosmos backend-agnostic (highest architectural leverage)

org.bouncycastle.* directly: Cardano's Blake2b-224 (→ item 1.1), Bitcoin's secp256k1-DER signing + RIPEMD-160, Cosmos's secp256k1 + RIPEMD-160 + Ed25519. Then declare each module a cross-project so it builds on JS too.

is the single reason they're JVM-only and carry a heavy dependency.

CosmosCrypto, CosmosSignDoc).

last heavy vendor dependency from the crypto path. Architecturally the most valuable item on the board.

1.6 Solana RPC client (smallest gap, finishes a network)

(payments/client/solana), the counterpart of the existing clientEvm.

to talk to, and today the caller has to supply one by hand. EVM ships a turnkey client; Solana doesn't.

1.7 Own missing primitives behind the SPI (the FROST move, repeated)

secp256k1 scalar/point math, sitting behind the SPI as the always-available fallback (native backends stay the fast path).

any platform even with no native provider, exactly like FROST's Sha512.

platform; collectively they make the crypto core self-contained.

1.8 Newer chains: Aptos / Sui / Stellar / XRPL / Polkadot (cheap tail)

tidy encoding.

the architecture is already there.

(Polkadot additionally needs sr25519 — enumerated in Curve but unimplemented — so it depends on a Schnorrkel reference.)


Track 2 — Threshold & MPC signing (our own, like FROST)

FROST-Ed25519 is done. Its scaffolding — Shamir secret sharing over a scalar field, Lagrange interpolation, the *Ops seam, the in-house RemoteSigningClient integration — is reusable for a family of related protocols. "Threshold" means t-of-n parties jointly produce one signature without any single party ever holding the whole key; "MPC" (multi-party computation) is the general term for that.

2.1 FROST-secp256k1 (high reach, reuses the most)

Ed25519, this ports it to secp256k1).

serves Ethereum.

next to cryptoFrost.

2.2 MuSig2 (Bitcoin multisig as one key)

like an ordinary single-key signature on-chain.

private than script-based multisig.

2.3 Threshold ECDSA (GG / Lindell) (harder, broad legacy reach)

Gennaro-Goldfeld or Lindell protocols.

thresholdize than Schnorr (it needs multi-round MPC with Paillier/OT machinery).

the heaviest item in this track.

2.4 VRFs and BLS signatures (validator / aggregate infrastructure)

publicly verifiable, used for leader election and lotteries. BLS: a signature scheme whose signatures aggregate — many signatures over many messages compress into one.

backbone of Ethereum consensus and any "thousands of validators, one aggregated signature" design.

Curve, unimplemented).

chains.

2.5 Distributed FROST transport (the missing 10% — most "productizing")

commitments and round-2 partials are exchanged over a transport. This is the production counterpart of the in-process FrostQuorum we have today.

transport is what turns it into an actual distributed threshold wallet — the whole point of threshold custody is that the shares are not co-located.

MPC vaults plug into); naturally built on our actors/cluster + HTTP/WS substrate.

highest-value single step toward a real custody offering.


Track 3 — Identity & token services (not only currencies)

The same "own reference behind a seam" approach applies well beyond chains. These are small, pure, and gateable against published RFC test vectors — most are a day or two each.

3.1 TOTP / HOTP (2FA codes — quick win)

(RFC 6238, time-based), the 6-digit codes in Google Authenticator / Authy.

3.2 WebAuthn / passkey server-side verification

during registration and authentication.

closes the loop so an app can actually accept passkey logins.

3.3 PASETO / JWT / COSE token signing + verify

security-hardened successor; COSE is the CBOR-based equivalent used by WebAuthn, FIDO, and IoT.

it's serialization + a verify path.

3.4 Noise protocol framework

AEAD + hash); it's what WireGuard, WhatsApp, and Lightning use under the hood.

framework is a short hop and gives us a clean, modern, mutually-authenticated encrypted channel.

3.5 Shamir secret backup (quick win — generalize what we have)

that any t reconstruct it and fewer reveal nothing — Shamir's Secret Sharing, à la SLIP-0039.

arbitrary byte secrets is mostly lifting that code over a prime field.

low cost.

3.6 DIDs / Verifiable Credentials

by any central authority. VC (verifiable credential): a tamper-evident, cryptographically-signed claim ("X attests Y about Z").

membership) — a genuinely larger bet that builds a whole identity stack on our signature primitives.

signing).

3.7 age / PGP-style encryption

PGP is the legacy interop target.

already have.


Track 4 — "Invent our own" (products that exploit our unique position)

Our differentiator is that one source compiles to JVM / JS / Rust / WASM and we have effects, actors, and channels. These ideas lean on that.

4.1 Vendor-optional threshold-custody wallet (the natural product)

product. No external custody vendor required.

service; walletVaultMpcFrost already proves we can be the in-house provider. Add a transport and it's a real distributed-deploy custody offering.

4.2 Our own micropayment / settlement scheme

and Cardano Hydra providers; inventing a new scheme is "another ChannelProvider."

4.3 Dependency-free infrastructure: oracle / attestation, content-addressed storage, gossip / CRDT

storage (hash-keyed blobs), and a gossip/CRDT layer (eventually-consistent replication).

build the distributed parts on.


The endgame

The thread through all of it: a self-contained, vendor-optional financial / crypto runtime that runs identically on JVM, JS, Rust, and WASM, with native acceleration wherever it exists. Three things make this realistic and cheap here, and they're worth restating because they're why this roadmap is mostly "implement a trait," not "build an architecture":

  1. The SPIs already existCryptoBackend, ChainAdapter, Vault/RawSigner, RemoteSigningClient,

ChannelProvider, PaymentProvider. New work plugs into them.

  1. Cross-compilation is free once code avoids platform-only APIs — the SHA-512/RNG lesson from FROST.
  2. Every reference is gateable against an existing implementation for correctness, then shipped with native

backends as an opt-in fast path.

For the concrete slice-by-slice plan and acceptance criteria, see specs/crypto-finance-roadmap.md.