bitcoin++
§ Project file

Statemint: Spark-style statechains run by YOUR federation

The permanent record for this hackathon project: write-up, links, team, tags, and prizes.
Submitted Hackathon
A federated statechain module built on top of Fedimint.
The write-up

Spark is the most popular statechain implementation, but its privacy and trust assumptions aren‘t obvious to most users. Every Spark transfer is co-signed by the Spark Entity, which today is just two operators, Lightspark and Flashnet, and those operators see the metadata of every transfer. Projects likeSparkStalker exploit the lack of default privacy by linking all Spark transactions to a tether.me username.

Statemint brings Spark’s statechain design to Fedimint. Instead of a fixed set of corporate operators, the statechain entity is a Fedimint federation that any community can deploy, run by guardians its users actually know.

Privacy improvements over Spark

  • No public transfer history. Transfers are agreed in the federation‘s consensus, which only its guardians hold. There is no explorer or address index to scrape.
  • No reusable identity. Every receive address is generated with a fresh key, so the coins a wallet receives aren’t tied together by a long-lived account key or username.
  • You choose who sees your metadata. The guardians co-signing your transfers are members of your own community, not two companies serving every user of the network.

Security improvements

  • Trust spread across more signers. The federation‘s half of each coin key is a threshold FROST key split across all guardians (e.g. 3-of-4), not held by two operators.
  • Signing that can’t be stalled. The client runs ROAST, so a guardian that stops responding mid-signature can‘t block a transfer as long as a threshold of guardians are honest.
  • Spark’s self-custody guarantees, kept. Coins never move without the user‘s key. Transfers rotate the guardians’ key shares and delete the old ones, and pre-signed backup transactions with decreasing timelocks let the current owner exit to Bitcoin without the federation.

Contributions

  • A Fedimint statechain module: per-coin key generation, Spark-style send/claim transfers, cooperative peg-out, unilateral exit, and a full CLI.
  • FROST signing on schnorr_fun, with client-side ROAST.
  • An Ecash App integration with a Statecoin tab to deposit, receive, send, peg out, and exit, with live exit progress.

Limitations and future work

  • Guardians can still follow a coin as it changes hands, just as Spark‘s operators can. Blind signing (as in Mercury) would hide this from them too.
  • Coins move whole: there is no splitting yet.
  • Each transfer shortens the exit timelock, so a coin supports a limited number of transfers before it must be pegged out.