Can Sassafras make Polkadot faster and safer?


I’ve been going through the Web3 Foundation’s blog series on Sassafras, along with the research paper, to dig into how this protocol really works under the hood.
As someone with little experience in blockchain engineering already familiar with smart contracts, PoS mechanics, and validator dynamics i find Sassafras fascinating because it tackles one of the trickiest parts of consensus: leader election.
It is set to replace Polkadot’s BABE+Aura hybrid, shifting from probabilistic randomness to secret, deterministic selections, which should make block production both more predictable and more secure.
What really caught my attention is how it balances cryptography, probability, and efficiency in a way that feels practical for real-world chain operations.
In this write-up, I’ll break down the protocol, the math behind it, and the key mechanics plus analogies where they help so you can follow the logic without needing a full cryptography background.
This is my synthesis feel free to check against the originals.

At its core, a blockchain is a decentralized, immutable ledger, batching transactions into blocks linked cryptographically.


The Case for Sassafras: Why Current Block Production Struggles

Polkadot uses a Proof-of-Stake (PoS) system, specifically a Nominated Proof-of-Stake (NPoS) variant. Validators stake DOT tokens to secure the network and participate in block creation. DOT holders who don’t run nodes can also nominate trusted validators, helping decide who gets to produce blocks.

The current block production setup combines two components:

  • BABE — adds randomness to determine who can propose blocks.
  • Aura — organizes turn-taking among validators to keep blocks coming regularly.

While this hybrid approach works, it still has fundamental issues in leader selection, leading to inefficiencies, unpredictable block timing, and potential security risks. This is exactly what Sassafras aims to address.


Probabilistic Leader Election (PLE) Explained

BABE uses Probabilistic Leader Election (PLE). In simple terms:

  • Leaders are picked randomly, with probabilities based on how much stake they have.
  • Imagine buying lottery tickets: the more tickets you have (or the more stake you hold), the higher your chance of winning.

While fair in theory, this approach has key inefficiencies:

1. Multiple or Zero Winners

  • Each slot may produce more than one leader or none at all.
  • The math behind this is called Poisson distribution:
  • Expected number of leaders per slot: ( \lambda \approx 1 )
  • But variance exists: sometimes ( P(>1) ) (more than one winner) or ( P(0) ) (no winner) happens.

Consequences:

  • Forks multiple competing chains appear, resolved by the longest-chain rule.
  • Empty slots no block is produced, slowing down chain growth.

Analogy: Imagine a highway where cars arrive randomly. Sometimes too many cars bunch up (forks), sometimes no cars arrive at all (empty slots).

2. Unpredictable Timing

  • Block intervals follow an exponential distribution (average ~6 seconds in Polkadot).
  • This randomness reduces throughput (transactions per second, TPS).
  • Gaps between blocks mean the network isn’t processing transactions as efficiently as it could.

3. Scalability Trade-Offs

  • You might try to reduce slot time to process more transactions faster.
  • Problem: Faster slots increase the chance of forks, because the network may not have seen the previous block yet.
  • This can allow double-spending attacks, where someone spends the same DOT twice.

Real-World Analogy

Think of PoS with PLE like cars arriving on a highway randomly:

  • Sometimes too many cars at once → traffic jams (forks).
  • Sometimes no cars → wasted time (empty slots).
  • Trying to make cars go faster → increases risk of collisions (double-spending).

What the Math Says

  • Research shows PLE’s block finality is ~25% slower than SSLE.
  • PLE tolerates up to 49% adversarial stake (( f < 0.49 )).
  • Weakness: If adversaries secretly create chains at rate ( f ), they can sometimes outpace honest validators (( 1-f )), reducing chain quality (the fraction of honest blocks).

The Vision: Constant-Time Block Production

The main idea here is to produce exactly one block per slot, consistently. That’s called constant-time block generation.

  • Polkadot’s current Aura system does this with a round-robin schedule, meaning each validator gets a predictable turn.
  • The problem with predictability is that it opens the door to attacks:
  • Forking attacks happen if an attacker targets the known next leader and tries to make competing chains.
  • Denial-of-Service (DoS) attacks occur if someone floods the leader’s network to prevent them from broadcasting their block.

To solve this, Single Secret Leader Election (SSLE) is used:

  • Only one leader is selected per slot, and their identity is hidden until they actually produce the block.
  • This keeps attackers from knowing whom to target.
  • Sassafras implements SSLE and works together with Grandpa, Polkadot’s finality gadget. Grandpa ensures that once blocks reach a certain depth ( k ), they are final meaning they cannot be reversed in the honest validators’ view.

The trade-off is mostly mathematical:

  • SSLE assumes a Byzantine fault tolerance threshold of ( f < 1/3 ) (the network can tolerate up to 1/3 malicious validators).
  • PLE (probabilistic leader election, like in BABE) can tolerate up to ( f < 0.49 ), but Sassafras gains faster finality (about 25% faster) and more predictable block timing.

Diving Deep: Sassafras’s Core Mechanics

Sassafras uses advanced cryptography to elect leaders for multiple slots in one go. This is called a batch election, which reduces the overhead per slot to ( O(1) ). At the same time, it keeps the leaders’ identities mostly hidden.

The main cryptographic tool is the ring verifiable random function (VRF):

  • VRF (Verifiable Random Function): A VRF takes an input ( x ) and a secret key ( sk ), and produces an output ( y ) that looks random, plus a proof ( \pi ). Anyone with the public key can verify ( \pi ) to confirm the output is correct, but without ( sk ), the output is unpredictable.
  • Ring VRF: This extends the VRF to a group of ( n ) participants. The output proves that someone in the group created it, but doesn’t reveal which participant. This gives anonymity.

Sassafras runs in epochs, which are fixed periods (for example, 2400 slots in Polkadot). At the start of each epoch, the set of validators is updated.


The Five Phases in Detail

Phase A: Ticket Generation

  1. The system provides a shared random seed ( r ) from the randomness beacon (think of it like a lottery number that everyone trusts).
  2. Each validator ( i ) computes a ticket using the ring VRF: Ring VRF(r, i) → value v, proof π.
  3. If ( v ) is below a threshold ( τ ) (set so that the expected number of winners equals the number of slots ( m )), the validator has a winning ticket.
  4. The winning ticket is signed anonymously with the ring VRF.

Math explanation: Each validator has a probability of winning ( p ≈ m/n ). This is tuned so that winners are roughly evenly distributed across the epoch, but still random.

Analogy: Imagine a private raffle where each person draws a number and checks if it’s below a winning cutoff. Only the winner knows they won, and they prepare a sealed ticket.

Phase B: Anonymous Publication (via Repeaters)

  1. Each winning ticket is encrypted using a symmetric key (fast encryption like AES) that is derived non-interactively (Diffie-Hellman style).
  2. A random repeater ( j ) is selected to broadcast the ticket. The ticket is sent to all validators, but only the repeater can decrypt and post it onchain.
  3. To prevent outsiders from guessing how many winners there are, dummy tickets (fake or non-winning tickets) are included.

Analogy : You put your raffle ticket in a locked box and send it to a friend (the repeater). They open the box and announce the result, without revealing that it was you who sent it.

Phase C: Sorting

  1. All tickets are collected and verified on-chain.
  2. Tickets are sorted by value to determine the top-ranked winners for each slot.

Analogy : Like arranging numbers in ascending order to decide who goes first.

Phase D: Leader Claim (Handling Attacks)

  1. When the election epoch arrives, the top ticket owner claims the slot using the ring VRF proof.
  2. If a repeater is malicious (probability ≤ ( f )), the leader’s identity might leak, which could cause a DoS attack and make that slot empty.
  3. Sassafras skips compromised slots, allowing the next honest winner to step in, ensuring the chain keeps moving.

Analogy : If some winners are exposed and attacked, backup winners automatically take over.

Phase E: Block Production

  1. The claimed leader produces and broadcasts their block.
  2. Sassafras supports arbitrary batch sizes ( m ), making it more efficient than systems that fix the batch size.

Math and Security: Breaking Down the Jargon

  • Threat model: Assumes an adaptive adversary (can corrupt validators dynamically) with ( f < 1/3 ) of stake and full network access.
  • Anonymity probability: Probability that both the ticket owner and repeater are honest: ( ≥ h² = (1-f)² ≈ 4/9 ).
  • Probability a repeater leaks information: ( ≤ f ≈ 1/3 ).
  • Relaxed anonymity: Not all leaders are hidden, but enough are to maintain liveness (the chain keeps producing blocks).
  • Block production: Honest blocks ≥ 4/9, adversarial blocks ≤ 1/3, ensuring chain growth favors honest blocks.

Chernoff bounds: A statistical method to limit deviations in random events. For binomial variables ( X_i ) (honest block indicators):

[
P(S < (1-δ)μ) ≤ e^{-δ² μ / 3}, \quad μ = E[S]
]

This ensures adversaries cannot dominate a sequence of slots.

  • Finality: Adapts proofs from Ouroboros Praos. After depth ( k ), chains converge with high probability. Honest growth rate ≥ 4/9 outpaces adversarial ≤ 1/3.

Sassafras is proven in the Universal Composability (UC) model and resists timing/size attacks by using uniform ticket sizes and synchronized publishing. Large anonymity sets (e.g., 999k/1M) make DoS attacks ineffective compared to rivals (e.g., 31/32).


Sassafras vs Competitors

Non-SSLE systems (PLE like BABE)

Can handle slightly higher malicious stake ( f ), but slower finality (~25%) and more prone to gaps/forks.

SSLE approaches:

  • Shuffling: Commit list → shuffle → select via beacon. Proofs costly ( O(n) ), efficient only for small sublists.
  • WHISK: Batch for Ethereum, small sets → vulnerable to DoS.
  • PEKS-based: Heavy public-key crypto, O(n) comms.
  • Other advanced crypto (iO, TFHE): Impractical due to overhead.

Key Terms Simplified From My Reading

  • Epoch: Fixed session with stable validators/rules.
  • Throughput: TPS; higher for scalable networks.
  • Finality: Irreversibility point.
  • Byzantine Fault Tolerance: Resists 1/3 malicious nodes.
  • DoS Attack: Overload to disrupt.
  • On-Chain: Public blockchain data; off-chain private.

Final Reflections: Sassafras’s Path Forward

Sassafras elects single, secret leaders for constant-time consensus, blocks DoS attacks, and keeps overhead minimal ideal for Polkadot’s relay chain and the Safrole variant in JAM architecture. It’s like moving from PLE’s erratic lottery to SSLE’s hidden order: scalability improves without sacrificing security this could solidify Polkadot’s edge you can check out the sources or paper for deeper proofs.
I simplified some proofs, but this captures my in-depth read. Thoughts?

9 Likes

What is the difference between Sassafras and Safrole?

1 Like

Hi that’s a great question quite tricky also lol but from what I understand :

Sassafras was originally proposed as a replacement for BABE on the current Relay Chain. The main goal was secret single leader election with near constant-time, fork-resistant block production.

Safrole isn’t a completely different idea it’s more like the evolved version of Sassafras like an upgrade i guess. The docs even note that SAFROLE was formerly called SASSAFRAS. The core concept (secret leader election using RingVRFs) remains the same, but Safrole integrates zkSNARKs and is aligned with the JAM architecture.

So the way I understand it:

Sassafras was the original design direction for upgrading block production on Polkadot, and Safrole is the refined, SNARK-based version that fits into the newer JAM model.

Happy to be corrected if I’m wrong.

Thanks, @Kanasjnr, for this very nice summary of Sassafras! :smiley:

Safrole is just a specification of Sassafras. The zkSNARKs come from the implementation of the underlying ring VRF.

Minor point: note that broadcast here is really multicast (simply sending to all parties), rather than cryptographic broadcast.

4 Likes

Thanks for the clarification :smiley: @elizabeth-crites that makes sense so Safrole is basically the JAM-specific implementation of Sassafras, with zkSNARKs coming from the RingVRF. Also good to note about multicast vs. broadcast.

1 Like

We implemented Safrole as part of our JAM node. From what I read from the Sassafras explanation, and based on this post, doesn’t seem to have any difference besides the name.

Hi @danicuki,thanks for sharing your experience with Safrole in JAM! :grinning_face:

You’re right that the core ideas are the same.
To clarify: Safrole isn’t a completely separate protocol it’s really a specification or formalization of Sassafras, adapted for JAM. The zkSNARKs come from the RingVRF implementation, which helps preserve anonymity during leader election.

So essentially, Sassafras is the original design, and Safrole is the JAM-specific version that implements the same concepts in a structured way. The name change mostly reflects that adaptation, not a change in the fundamental mechanics. I’m i right @elizabeth-crites

1 Like