freecoding.school100% FREE · NO SIGNUP
The EVM CoreISSUE #5 of 48

the deposit contract · becoming a validator

SoliaVSThe Reentrancy Reaper
Solia saysTo become a validator: lock 32 ETH in the deposit contract, then wait in the activation queue — limited by a churn rate of max(4, active/65536) per epoch.

The deposit contract is an immutable execution-layer contract that takes 32 ETH and a validator public key. Once your deposit is included, you enter the activation queue. The beacon chain caps how fast new validators come online via the churn limit: max(4, active/65536) per epoch — about 8 activations per epoch at the current ~1M active set.

The cap protects consensus stability: an attacker cannot bulk-activate millions of validators in one epoch and overwhelm the existing set. The cost is that during demand spikes the activation queue can stretch to weeks. The demo computes the time to drain a 100,000-deep queue.

Power-ups you unlock

The Reentrancy Reaper attacks — common mistakes

Boss battleFor a 100,000-deep activation queue and a churn of 8/epoch, compute the days needed to drain it.

Example code

<!doctype html><html><head><meta charset="utf-8"></head>
<body style="background:#06040d;color:#e6e0ff;font-family:monospace;padding:20px"><pre id="o"></pre>
<script>
const STAKE = 32;
const activeValidators = 1000000;
const churnLimit = Math.max(4, Math.floor(activeValidators / 65536));
const slotsPerEpoch = 32, slotSec = 12;
const epochSec = slotsPerEpoch * slotSec;
const queueDepth = 100000;
const epochsToActivate = Math.ceil(queueDepth / churnLimit);
const daysToActivate = (epochsToActivate * epochSec) / 86400;
document.getElementById('o').textContent = [
  'stake per validator:        ' + STAKE + ' ETH',
  'active validators:          ' + activeValidators.toLocaleString(),
  'activation churn limit:     ' + churnLimit + ' validators / epoch',
  '  ( max( 4, active/65536 ) )',
  '',
  'queued for activation:      ' + queueDepth.toLocaleString(),
  'epochs to clear queue:      ' + epochsToActivate.toLocaleString(),
  'days to clear queue:        ' + daysToActivate.toFixed(1) + ' days',
  '',
  'queue grows when deposits arrive faster than churn → activation delay'
].join('\n');
</script></body></html>
▶ Open the interactive comic issue
‹ Fork Choice · Lmd-Ghost In PracticeWithdrawals · Partial · Full · The Queue ›