Menu

Resisting 51% attacks without a central authority: what I tried in NumFranc
📰

Resisting 51% attacks without a central authority: what I tried in NumFranc

DEV Community: rust·ShadowRook-crypto·1 day ago
#H4ajG4lj
#devtorust#devto#dev#code#chain
Reading 0:00
15s threshold

I’m a young French developer building NumFranc, a cryptocurrency written in Rust (Argon2d proof of work, ML-DSA-87 signatures). I code with the help of an AI, so what I’m really looking for is human code review.

The problem. In a proof-of-work cryptocurrency, someone who controls more than half of the computing power can mine a chain in secret, then reveal it to replace the official one. This is the 51% attack. My network is small, so the risk is real.

What I refuse to do. I don’t want a central authority that signs the “right” chain. That would solve the problem, but it would no longer be a decentralized cryptocurrency.

What I put in place:

A reorganization limit: a node refuses to replace more than 10 recent blocks.

A penalty for hidden chains: a chain mined in secret and revealed late is delayed before being accepted, while honest competition is not.

Adaptive confirmations: a large payment needs 30 confirmations, a small one needs 6.

A few checkpoints in the code, which the node refuses to…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.