Pre-launch. RC4 code-frozen for external audit (rc4-audit-candidate, aca5fcd). RC5 in development. Status, updated 2026-10-12
GENESpecimen 001

Preparing the specimen

Fig. ITheca, drawn from the frozen Genome. Select a gene to light its structure.Genome · pre-launch · no chain state

The Genome

The Genome, in operation.

The rules are fixed. The state they act on is not. Select a gene to see what the frozen code lets it do, what stops it, and how it would be observed. Then follow one trade through the rules.

GENE is an ERC-20 token traded in one ETH/GENE Uniswap v4 pool. The pool’s hook carries the Genome: 43 constants and four genes, fixed at deployment.

StatusPre-launch. Facts are from RC4, frozen for external audit (aca5fcd). Nothing on this page is mainnet activity.

  1. 01Four genes
  2. 02One trade, through the rules
  3. 03Observation
  4. 04Reference
  5. 05Sources

01Four genes

Read in one fixed order. Each waits for the one before it.

VERSION = 4 (Genome.sol:12)SUPPLY = 1,000,000,000 GENE (Genome.sol:15)LP_FEE = 10,000 pips (1%) (Genome.sol:16)TICK_SPACING = 60 ticks (Genome.sol:17)GENESIS_TICK_UPPER = 178,080 ticks (Genome.sol:18)GENESIS_TICK_LOWER = 85,920 ticks (Genome.sol:19)EPOCH_BLOCKS = 7,200 blocks (Genome.sol:22)MIN_BLOCK_VOLUME = 0.05 ETH (Genome.sol:23)PATH_CLAMP = 200 ticks (Genome.sol:24)GAP = 60 ticks (Genome.sol:27)GRID = 600 ticks (Genome.sol:28)NEAR_WIDTH = 1,200 ticks (Genome.sol:29)Pool and placement · 12BID_CAP_CALL = 3 ETH (Genome.sol:34)BID_CAP_EPOCH = 10 ETH (Genome.sol:35)IMMUNITY_CAP_CALL = 1 ETH (Genome.sol:36)IMMUNITY_CAP_EPOCH = 1.5 ETH (Genome.sol:37)ASK_CAP_CALL = 10,000,000 GENE (Genome.sol:38)ASK_CAP_EPOCH = 30,000,000 GENE (Genome.sol:39)REGEN_CAP_CALL = 0.5 ETH (Genome.sol:40)REGEN_CAP_EPOCH = 1 ETH (Genome.sol:41)MIN_DEPLOY_ETH = 0.001 ETH (Genome.sol:42)MIN_DEPLOY_GENE = 1,000 GENE (Genome.sol:43)COOLDOWN_BLOCKS = 300 blocks (Genome.sol:44)HARVEST_PER_CALL = 8 (Genome.sol:45)REGEN_PREMIUM_TICKS = 100 ticks (Genome.sol:46)REGEN_SHARE_BPS = 2,000 bps (20%) (Genome.sol:49)GENE_COUNT = 4 (Genome.sol:61)AUTO_EVOLVE_MAX = 8 (Genome.sol:54)Caps and timing · 16MET_MIN_EPOCH = 1 epochs (Genome.sol:64)MET_REVENUE = 0.25 ETH (Genome.sol:65)MET_OBSERVE = 2 epochs (Genome.sol:66)REG_MIN_EPOCH = 14 epochs (Genome.sol:70)REG_REVENUE = 0.25 ETH (Genome.sol:71)REG_ACTIVE_BLOCKS = 300 blocks (Genome.sol:72)REG_OBSERVE = 7 epochs (Genome.sol:73)REG_ETH_COMMITTED = 10 ETH (Genome.sol:74)IMM_MIN_EPOCH = 14 epochs (Genome.sol:77)IMM_REVENUE = 0.1 ETH (Genome.sol:78)IMM_PATH_TICKS = 3,000 ticks (Genome.sol:79)IMM_WINDOW = 7 epochs (Genome.sol:80)IMM_REQUIRED = 5 epochs (Genome.sol:81)IMM_DEPLOY_REVENUE = 0.5 ETH (Genome.sol:85)IMM_CONFIRM = 2 epochs (Genome.sol:86)Gene conditions · 15
The Genome in encode order: 43 constants, one hash. genomeHash 0x39c130f6…36ae

Locus I of IV

GENESIS

RC4Acts.

In Theca: The silica skeleton: 154 pores, one per price cell of the genesis band.

Places the whole supply, 1,000,000,000 GENE, in one single-sided position from the opening price, tick 178,080, to 10,000× it, tick 85,920. Every trade uses this curve.GeneHook.sol:420-435 · Genome.sol:15-19

Expression

051015202530
Earliest expression, epoch 0Rehearsal, epoch 0

Expressed by launch() itself, at epoch 0. It has no market condition.GeneHook.sol:266-270

When it acts

  • launch() runs once. It opens the pool at tick 178,080 with the static 1% fee, seeds the supply and burns any rounding dust.

    GeneHook.sol:252-273
  • From then on the hook is the pool's only liquidity provider: anyone else's add or remove reverts.

    GeneHook.sol:337-351

What stops it

  • Only the launcher can call launch(), and only once: NotLauncher, AlreadyLaunched.

    GeneHook.sol:253-254
  • Every public call before launch reverts with NotLaunched.

    GeneHook.sol:999-1001

Relations

  • Each gene waits for the one before it. GENESIS expresses at epoch 0, so METABOLISM can count from epoch 1.

    GeneHook.sol:896-899
Immutable parameters 6
ConstantValueMeaningSource
SUPPLY1,000,000,000 GENEFixed supply, minted once to the hook and seeded into the pool at launchGenome.sol:15
LP_FEE10,000 pips (1%)Static 1.00% LP fee in the PoolKeyGenome.sol:16
TICK_SPACING60 ticksPool tick spacingGenome.sol:17
GENESIS_TICK_UPPER178,080 ticksOpening price: the top of the genesis bandGenome.sol:18
GENESIS_TICK_LOWER85,920 ticks10,000x the opening price: the far edge of the genesis band (a design bound)Genome.sol:19
GRID600 ticksPlacement band edges snap to this gridGenome.sol:28

Observed asGenesis, Launched, GeneTransition (gene 0), MassAdded (kind 0). How it is observed

GenesThe pool and the hookThe 154-cell band

Locus II of IV

METABOLISM

RC4Acts. Its ETH is a permanent lock.

In Theca: Glass septa, nine intake ducts and an exchange vesicle.

metabolize() collects the LP fees in the hook's positions into reserves and returns them to the pool as Permanent Mass. GENE becomes asks above the price. ETH goes into a 1,200-tick band one GAP below the all-time low.GeneHook.sol:451-476 · Genome.sol:27-29

After the first trade the price cannot fall back to that band, so its ETH is a permanent lock, not a bid a trader can hit. No function removes Mass.Phase 3 review findings · GeneHook.sol:594-610

Expression

0510152025302 consecutive
Earliest expression, epoch 2GENESIS, epoch 0Can countRehearsal, epoch 2

From epoch 1, 2 consecutive closed epochs with revenue of at least 0.25 ETH. Revenue counts 1% of the ETH that buys pay in, so this means at least 25 ETH of buys per epoch. A short epoch resets the count. Epoch 2 at the earliest.GeneHook.sol:879-887 · GeneHook.sol:385-387

When it acts

  • Each call harvests the genesis position and up to 8 more, then places, in order: IMMUNITY's band when it is active, METABOLISM's bid from last epoch's net buying, the churn tier from revenue that buying did not fund, and GENE asks.

    GeneHook.sol:451-476 · GeneHook.sol:671-689
  • Caps: at most 3 ETH per call and 10 ETH per epoch for the bid and churn tier together; at most 10,000,000 GENE per call and 30,000,000 per epoch as asks.

    Genome.sol:34-39
  • metabolize() first folds up to 8 pending closed epochs into the genes, so gene state is final before ETH is spent.

    GeneHook.sol:288-289

What stops it

  • Not expressed: the call reverts with GeneNotExpressed(1).

    GeneHook.sol:283
  • Within 300 blocks of the last call: Cooldown(readyAtBlock).

    GeneHook.sol:284-285
  • A zero budget places nothing: a budget comes from the previous closed epoch only and does not carry over. Amounts under 0.001 ETH or 1,000 GENE are skipped.

    GeneHook.sol:807-818 · GeneHook.sol:479-484
  • ETH waits while evolution is behind by more than 8 epochs; a placement over v4's per-tick ceiling is skipped, never reverted.

    GeneHook.sol:461-465 · GeneHook.sol:611-621

Relations

  • Needs GENESIS. Its ETH placements build the 10 ETH commitment REGENERATION requires.

    Genome.sol:74 · GeneHook.sol:624
  • Once REGENERATION expresses, 20% of collected ETH fees go to REGENERATION's reserve and METABOLISM's bid budget shrinks by the same share. METABOLISM's call is also the one that places IMMUNITY's band.

    GeneHook.sol:707-718 · GeneHook.sol:466
Immutable parameters 15
ConstantValueMeaningSource
MET_MIN_EPOCH1 epochsMETABOLISM can express from epoch 1Genome.sol:64
MET_REVENUE0.25 ETHMETABOLISM pressure: epoch revenue at least 0.25 ETHGenome.sol:65
MET_OBSERVE2 epochsMETABOLISM: 2 consecutive pressure epochsGenome.sol:66
COOLDOWN_BLOCKS300 blocksBlocks between metabolize() calls (and after a full-allotment regenerate())Genome.sol:44
HARVEST_PER_CALL8Registry positions poked per metabolize(), plus genesisGenome.sol:45
BID_CAP_CALL3 ETHMETABOLISM bids, most ETH per metabolize() callGenome.sol:34
BID_CAP_EPOCH10 ETHMETABOLISM bids and churn tier, most ETH per epochGenome.sol:35
ASK_CAP_CALL10,000,000 GENEAsk Mass, most GENE per callGenome.sol:38
ASK_CAP_EPOCH30,000,000 GENEAsk Mass, most GENE per epochGenome.sol:39
MIN_DEPLOY_ETH0.001 ETHSmallest ETH placementGenome.sol:42
MIN_DEPLOY_GENE1,000 GENESmallest GENE placementGenome.sol:43
AUTO_EVOLVE_MAX8Pending epochs one metabolize() folds before spendingGenome.sol:54
GAP60 ticksMinimum distance of a placement from its reference priceGenome.sol:27
GRID600 ticksPlacement band edges snap to this gridGenome.sol:28
NEAR_WIDTH1,200 ticksWidth of the ETH bands placed at the all-time lowGenome.sol:29

Observed asGeneTransition (gene 1), FeesHarvested, FlowBudgets, MassAdded (kinds 1, 3, 4), PlacementSkipped. How it is observed

Permanent MassNet-flow budgetsFee anatomy

Locus III of IV

REGENERATION

RC4Expresses, cannot buy. Fix in development (RC5).

In Theca: The pylome: a narrow throat over a sealed burn chamber.

Once expressed, it takes 20% of collected ETH fees into its own reserve. regenerate() buys GENE from the pool and burns it, paying no more than 100 ticks, about 1%, above the all-time low. Supply can only fall.GeneHook.sol:561-591 · GeneHook.sol:308 · Genome.sol:46-49

In RC4 the all-time low stays at the opening tick, 178,080, so the limit is tick 177,980. After the first trade the price cannot return there: REGENERATION never buys and its reserve stays idle.Phase 3 review findings · GeneHook.sol:774

Expression

0510152025307 consecutive
Earliest expression, epoch 20METABOLISM, epoch 2Can countRehearsal, epoch 20

After METABOLISM, from epoch 14: 7 consecutive epochs each with at least 0.25 ETH of revenue and 300 active blocks (a block is active at 0.05 ETH of volume), and at least 10 ETH committed to Mass. A miss resets the run. Epoch 20 at the earliest.GeneHook.sol:884-891 · Genome.sol:68-74

When it acts

  • Each call spends the smallest of: its reserve, 0.5 ETH, what is left of 1 ETH this epoch, and 20% of the previous epoch's bid budget. Churn revenue funds no buyback.

    GeneHook.sol:562-571
  • The cooldown of 300 blocks starts only after a call spends its whole allotment, so a call that buys nothing cannot lock it out.

    GeneHook.sol:302-307

What stops it

  • Not expressed: GeneNotExpressed(2). Within a cooldown: Cooldown(readyAtBlock).

    GeneHook.sol:298-300
  • An allotment under 0.001 ETH returns zero.

    GeneHook.sol:571
  • A price at or above the limit returns zero. In RC4 that is every price after the first trade.

    GeneHook.sol:577 · Phase 3 review findings

Relations

  • Needs METABOLISM, and 10 ETH of METABOLISM's placements. IMMUNITY waits for REGENERATION.

    GeneHook.sol:896-899
  • RC5, in development: a buyback at most about 1% above the block-start price instead of the all-time low. Not frozen, not audited, not deployed.

    Phase 3 review findings
Immutable parameters 11
ConstantValueMeaningSource
REG_MIN_EPOCH14 epochsREGENERATION can express from epoch 14Genome.sol:70
REG_REVENUE0.25 ETHREGENERATION pressure: revenue at least 0.25 ETHGenome.sol:71
REG_ACTIVE_BLOCKS300 blocksREGENERATION pressure: at least 300 active blocksGenome.sol:72
REG_OBSERVE7 epochsREGENERATION: 7 consecutive pressure epochsGenome.sol:73
REG_ETH_COMMITTED10 ETHREGENERATION: at least 10 ETH committed to MassGenome.sol:74
REGEN_PREMIUM_TICKS100 ticksA buyback never pays more than about 1% over the all-time-low priceGenome.sol:46
REGEN_SHARE_BPS2,000 bps (20%)REGENERATION's share of the net-flow bid budget once expressedGenome.sol:49
REGEN_CAP_CALL0.5 ETHREGENERATION buyback, most ETH per callGenome.sol:40
REGEN_CAP_EPOCH1 ETHREGENERATION buyback, most ETH per epochGenome.sol:41
MIN_BLOCK_VOLUME0.05 ETHETH swap volume that makes a block count as activeGenome.sol:23
COOLDOWN_BLOCKS300 blocksBlocks between metabolize() calls (and after a full-allotment regenerate())Genome.sol:44

Observed asGeneTransition (gene 2), Regenerated, GENE Transfer to the zero address (burn). How it is observed

REGENERATIONAnchorsPhase 3 review findings

Locus IV of IV

IMMUNITY

RC4Expresses, cannot act. Fix in development (RC5).

In Theca: Seven ribs, one per epoch of the stress window.

After confirmed stress, metabolize() places up to 1 ETH per call and 1.5 ETH per epoch in a 1,200-tick ETH band one GAP below the lower of spot and the all-time low, funded only by net selling. Expression alone places nothing.GeneHook.sol:493-507 · Genome.sol:36-37

In RC4 that band is the same out-of-reach band as METABOLISM's ETH, ticks 178,200 to 179,400, so it has no market effect.Phase 3 review findings

Expression

0510152025305 of 7
Earliest expression, epoch 25REGENERATION, epoch 20Can countRehearsal, epoch 25

After REGENERATION, from epoch 14: 5 of the last 7 counted epochs stressed, each with at least 0.1 ETH of revenue over a price path of at least 3,000 ticks (one block adds at most 200). Epoch 25 at the earliest.GeneHook.sol:919-935 · Genome.sol:76-81

When it acts

  • It places only while immunityActive() is true: expressed, the last 2 processed epochs each with at least 0.5 ETH of revenue over 3,000 ticks, and evolution caught up.

    GeneHook.sol:802-805 · Genome.sol:85-86
  • Its budget is 1% of the previous epoch's newly funded net selling, valued at that epoch's cheapest price.

    GeneHook.sol:837-875

What stops it

  • Stress before REGENERATION has expressed does not count toward the window.

    GeneHook.sol:921
  • No net selling below the post-high low: no budget, nothing placed. Caps of 1 ETH per call and 1.5 ETH per epoch.

    GeneHook.sol:828-832 · GeneHook.sol:494-496
  • It returns to dormant only when its whole window holds no stressed epoch; once expressed it never switches off.

    GeneHook.sol:929-931

Relations

  • Needs REGENERATION. Placed by metabolize(), so METABOLISM's 300-block cooldown applies. Funded by net selling, never by fees.

    GeneHook.sol:466
  • RC5, in development: IMMUNITY would buy back and burn instead, at most about 1% above the block-start price. Not frozen, not audited, not deployed.

    Phase 3 review findings
Immutable parameters 11
ConstantValueMeaningSource
IMM_MIN_EPOCH14 epochsIMMUNITY can express from epoch 14Genome.sol:77
IMM_REVENUE0.1 ETHIMMUNITY pressure: revenue at least 0.1 ETHGenome.sol:78
IMM_PATH_TICKS3,000 ticksIMMUNITY pressure: price path at least 3,000 ticksGenome.sol:79
IMM_WINDOW7 epochsIMMUNITY: window of the last 7 epochsGenome.sol:80
IMM_REQUIRED5 epochsIMMUNITY: 5 pressure epochs in the windowGenome.sol:81
IMM_DEPLOY_REVENUE0.5 ETHIMMUNITY deployment: each confirming epoch earns at least 0.5 ETHGenome.sol:85
IMM_CONFIRM2 epochsIMMUNITY deployment: the last 2 processed epochs both deploy-stressedGenome.sol:86
IMMUNITY_CAP_CALL1 ETHIMMUNITY, most ETH per callGenome.sol:36
IMMUNITY_CAP_EPOCH1.5 ETHIMMUNITY, most ETH per epochGenome.sol:37
PATH_CLAMP200 ticksMost ticks one block can add to an epoch's pathGenome.sol:24
NEAR_WIDTH1,200 ticksWidth of the ETH bands placed at the all-time lowGenome.sol:29

Observed asGeneTransition (gene 3), MassAdded (kind 2), immunityActive(), a view. How it is observed

IMMUNITYNet-flow budgetsPhase 3 review findings

02Walkthrough

One trade, through the rules.

Simulation. Each scenario starts from stated, hypothetical inputs and runs the RC4 rules as written. Every other number is computed. Outcomes include calls that revert, calls that do nothing, and ETH placed where no trade can reach it.

One buyer pays 1 ETH in the first block after launch. The swap records evidence; nothing is placed, and METABOLISM cannot act yet.

Given, hypothetical

  • Launch has just happened: the genesis position is the pool's only liquidity.
  • One buy of 1 ETH, one block after launch. No other trade.
  1. Step 1 of 5launch()

    Launch

    Outcome: GENESIS expressed, epoch 0

    GENESIS is expressed by the launch transaction itself. The whole supply, 1,000,000,000 GENE, sits in one position from tick 85,920 to tick 178,080, the opening price. The all-time low and high both start at the opening tick.

    State before and after this step
    StateBeforeAfter
    Spot tick178,080178,080
    All-time low tick178,080178,080
    All-time high tick178,080178,080
    GENESISExpressed at epoch 0Expressed at epoch 0
    METABOLISMDormantDormant
    Genesis liquidity
    SUPPLY / (√P(178,080) − √P(85,920)) = 137,274 (×10¹⁸ in wei units)
    GeneHook.sol:252-273 · Genome.sol:18-19
  2. Step 2 of 5swap (Uniswap v4)

    The swap: 1 ETH in

    Outcome: Evidence recorded

    The 1% LP fee, 0.01 ETH, stays in the genesis position; the hook takes no fee of its own. 0.99 ETH moves the curve and pays out 50,899,009 GENE. afterSwap adds the evidence: revenue counts 1% of the ETH a buy pays in, and the net GENE that left the curve.

    State before and after this step
    StateBeforeAfter
    Spot tick178,080177,045 (changed)
    Epoch revenue0 ETH0.01 ETH (changed)
    This block's ETH volume0 ETH1 ETH (changed)
    ETH fees in the hook's positions0 ETH0.01 ETH (changed)
    GENE out
    v4 swap on the genesis curve: L · (√P₀ − √P₁) = 50,899,009 GENE
    Price after
    tick 177,045: GENE costs 1.109× the opening price
    GeneHook.sol:368-392 · Genome.sol:16
  3. Step 3 of 5any swap or public call, block + 2

    The next block's first touch

    Outcome: Anchors and activity recorded

    The first touch of each block finalizes the previous one. It traded at least 0.05 ETH, so it counts as active, and its price move adds to the epoch's path, clamped at 200 ticks. The all-time high follows the price up. The all-time low moves only to a cheaper block-start price with active liquidity, so it stays at the opening tick.

    State before and after this step
    StateBeforeAfter
    Active blocks01 (changed)
    Path ticks0200 (changed)
    All-time high tick178,080177,045 (changed)
    All-time low tick178,080178,080
    GeneHook.sol:734-780 · Genome.sol:23-24
  4. Step 4 of 5metabolize()

    Someone calls metabolize()

    Outcome: Reverts: GeneNotExpressed(1)

    The call reverts with GeneNotExpressed(1): METABOLISM is not expressed. The 0.01 ETH fee stays in the genesis position, uncollected. No gene but GENESIS can act in epoch 0.

    State before and after this step
    StateBeforeAfter
    Last metabolize()nevernever
    ETH fees in the hook's positions0.01 ETH0.01 ETH
    GeneHook.sol:283
  5. Step 5 of 5evolve(), block + 7,200

    Epoch 0 closes

    Outcome: No expression: epoch 0 cannot count

    Block 7,200 is the first of epoch 1, so its first touch records epoch 0 and turns its net buying into epoch 1's bid budget: 1% of the GENE bought, valued at the epoch's cheapest price. evolve() then reads epoch 0 into the genes. METABOLISM counts only from epoch 1, so nothing changes. To express, it needs 2 consecutive epochs with at least 0.25 ETH of revenue each: at least 25 ETH of buys per epoch.

    State before and after this step
    StateBeforeAfter
    Epoch01 (changed)
    Bid budget, this epoch0 ETH0.0094 ETH (changed)
    METABOLISMDormantDormant

    EventsEpochClosed(epoch 0, revenue 0.01 ETH, 1 active blocks, 200 path ticks)FlowBudgets(epoch 0, bid 0.009401 ETH, IMMUNITY 0 ETH, pLow 178,080)

    Bid budget, epoch 1
    1% × 50,899,009 GENE ÷ 54,141,398 GENE per ETH at tick 178,080 = 0.009401 ETH
    Compared with the fee paid
    0.01 ETH: the budget values the flow at the cheapest price of the epoch, so it never exceeds the fee
    GeneHook.sol:837-875 · GeneHook.sol:896-899 · Genome.sol:64-66

Four epochs of buying. One falls short and the count starts again. When METABOLISM expresses, metabolize() collects the fees and places them, and a second call inside 300 blocks is refused.

Given, hypothetical

  • Buys only, one per epoch: epoch 1, 30 ETH; epoch 2, 18 ETH; epoch 3, 27 ETH; epoch 4, 31 ETH. No sells, so no GENE fees and no asks.
  • evolve() is called once at the start of each epoch.
  1. Step 1 of 6swap, then evolve() in epoch 2

    Epoch 1: 30 ETH of buys

    Outcome: Observing, 1 of 2

    Revenue for epoch 1 is 0.3 ETH, at least 0.25 ETH. METABOLISM is eligible from epoch 1 and starts observing.

    State before and after this step
    StateBeforeAfter
    Epoch02 (changed)
    Revenue, last closed epoch0 ETH0.3 ETH (changed)
    METABOLISMDormantObserving, 1 of 2 (changed)

    EventsEpochClosed(epoch 0, revenue 0 ETH, 0 active blocks, 0 path ticks)EpochClosed(epoch 1, revenue 0.3 ETH, 1 active blocks, 200 path ticks)FlowBudgets(epoch 1, bid 0.114585 ETH, IMMUNITY 0 ETH, pLow 178,080)GeneTransition(METABOLISM, Dormant to Observing, epoch 1)

    GeneHook.sol:901-917 · Genome.sol:65
  2. Step 2 of 6swap, then evolve() in epoch 3

    Epoch 2: 18 ETH, short

    Outcome: Falls back to dormant

    Revenue is 0.18 ETH, below 0.25 ETH. A gene still counting falls back: METABOLISM returns to dormant and its count resets to zero.

    State before and after this step
    StateBeforeAfter
    Revenue, last closed epoch0.3 ETH0.18 ETH (changed)
    METABOLISMObserving, 1 of 2Dormant (changed)

    EventsEpochClosed(epoch 2, revenue 0.18 ETH, 1 active blocks, 200 path ticks)FlowBudgets(epoch 2, bid 0.130215 ETH, IMMUNITY 0 ETH, pLow 159,030)GeneTransition(METABOLISM, Observing to Dormant, epoch 2)

    GeneHook.sol:912-916
  3. Step 3 of 6swap, then evolve() in epoch 4

    Epoch 3: 27 ETH

    Outcome: Observing, 1 of 2

    Revenue 0.27 ETH: observing again, 1 of 2.

    State before and after this step
    StateBeforeAfter
    Revenue, last closed epoch0.18 ETH0.27 ETH (changed)
    METABOLISMDormantObserving, 1 of 2 (changed)

    EventsEpochClosed(epoch 3, revenue 0.27 ETH, 1 active blocks, 200 path ticks)FlowBudgets(epoch 3, bid 0.190398 ETH, IMMUNITY 0 ETH, pLow 152,755)GeneTransition(METABOLISM, Dormant to Observing, epoch 3)

    GeneHook.sol:905-911
  4. Step 4 of 6swap, then evolve() in epoch 5

    Epoch 4: 31 ETH, expressed

    Outcome: METABOLISM expressed, epoch 4

    Revenue 0.31 ETH: the second consecutive qualifying epoch. METABOLISM expresses at epoch 4, with epochs 3 and 4 as its evidence. An expressed gene never switches off.

    State before and after this step
    StateBeforeAfter
    Revenue, last closed epoch0.27 ETH0.31 ETH (changed)
    METABOLISMObserving, 1 of 2Expressed at epoch 4 (changed)
    Bid budget, this epoch0.1904 ETH0.2307 ETH (changed)

    EventsEpochClosed(epoch 4, revenue 0.31 ETH, 1 active blocks, 200 path ticks)FlowBudgets(epoch 4, bid 0.230698 ETH, IMMUNITY 0 ETH, pLow 145,969)GeneTransition(METABOLISM, Expressible to Expressed, epoch 4)

    GeneHook.sol:937-949 · Genome.sol:66
  5. Step 5 of 6metabolize(), epoch 5

    metabolize()

    Outcome: Placed: a permanent lock below reachable prices

    It collects 1.06 ETH of ETH fees from the genesis position into the reserve. It then places 0.2307 ETH as the METABOLISM bid (epoch 4's net-buying budget) and 0.0793 ETH as the churn tier (revenue the budget did not cover), both in one band from tick 178,200 to 179,400: one GAP below the all-time low of 178,080, snapped to the 600-tick grid. That band is below the opening price. After the first trade the price cannot return there, so this ETH is a permanent lock, not a bid a trader can hit. 0.75 ETH stays in reserve: the budgets of epochs 1 to 3 expired unspent, because a budget lasts one epoch.

    ETH band 178,200 to 179,400launch, ATL 178,080spot 140,260
    Ticks, price of GENE rising to the right. The axis is broken before spot.
    State before and after this step
    StateBeforeAfter
    ETH reserve0 ETH0.75 ETH (changed)
    ETH committed to Mass0 ETH0.31 ETH (changed)
    Last metabolize()neverlaunch + 36,002 (changed)

    EventsMassAdded(kind 1, ticks 178,200 to 179,400, 0.2307 ETH)MassAdded(kind 4, ticks 178,200 to 179,400, 0.0793 ETH)

    Band
    alignUp(178,080 + 60, 600) = 178,200; width 1,200 ticks
    Unplaced
    1.06 ETH collected − 0.31 ETH placed = 0.75 ETH
    GeneHook.sol:281-291 · GeneHook.sol:479-491 · GeneHook.sol:513-539 · GeneHook.sol:782-786 · Genome.sol:27-29 · Phase 3 review findings
  6. Step 6 of 6metabolize()

    Called again, 120 blocks later

    Outcome: Reverts: Cooldown

    The call reverts with Cooldown(36302). metabolize() runs at most once every 300 blocks; any account may call it again from launch + 36,302.

    State before and after this step
    StateBeforeAfter
    Last metabolize()launch + 36,002launch + 36,002
    GeneHook.sol:284-286 · Genome.sol:44

Nobody trades for a whole epoch. Its record reads zero, the next epoch has no budget, and REGENERATION's run of qualifying epochs starts over.

Given, hypothetical

  • METABOLISM expressed at epoch 4. 10.6 ETH is committed to Mass; 0.75 ETH sits unplaced in the reserve.
  • Epochs 14, 15 and 16 each had 0.4 ETH of revenue and 420 active blocks: REGENERATION is observing, 3 of 7.
  • Epoch 17 has no trade at all.
  1. Step 1 of 3state at the start of epoch 17

    Where things stand

    Outcome: Observing, 3 of 7

    REGENERATION needs 7 consecutive epochs from epoch 14, each with at least 0.25 ETH of revenue and 300 active blocks, and 10 ETH committed to Mass. On this run it could express at epoch 20.

    State before and after this step
    StateBeforeAfter
    Epoch1717
    REGENERATIONObserving, 3 of 7Observing, 3 of 7
    ETH committed to Mass10.6 ETH10.6 ETH
    Genome.sol:70-74
  2. Step 2 of 3evolve(), first touch of epoch 18

    Epoch 17 passes with no trade

    Outcome: REGENERATION resets to dormant

    An epoch nobody touched reads as all-zero activity: no revenue, no active blocks. There was no net flow, so no FlowBudgets event and no budget for epoch 18. REGENERATION misses and resets to dormant: a run of 7 starting at epoch 18 could express at epoch 24 at the earliest. METABOLISM stays expressed.

    State before and after this step
    StateBeforeAfter
    Epoch1718 (changed)
    REGENERATIONObserving, 3 of 7Dormant (changed)
    METABOLISMExpressed at epoch 4Expressed at epoch 4
    Bid budget, this epoch0 ETH0 ETH

    EventsEpochClosed(epoch 17, revenue 0 ETH, 0 active blocks, 0 path ticks)GeneTransition(REGENERATION, Observing to Dormant, epoch 17)

    GeneHook.sol:879-881 · GeneHook.sol:838 · GeneHook.sol:912-916
  3. Step 3 of 3metabolize()

    metabolize() in epoch 18

    Outcome: Succeeds, places nothing: zero budget

    The call succeeds and places nothing. There are no new fees to collect, epoch 18's bid and IMMUNITY budgets are zero, epoch 17 had no revenue for the churn tier, and the GENE reserve is empty. The 0.75 ETH already in reserve stays there: a budget comes only from the previous epoch's flow.

    State before and after this step
    StateBeforeAfter
    ETH reserve0.75 ETH0.75 ETH
    ETH committed to Mass10.6 ETH10.6 ETH
    Last metabolize()launch + 115,210launch + 130,100 (changed)
    GeneHook.sol:479-484 · GeneHook.sol:812-818 · Genome.sol:42-43

REGENERATION has expressed and has ETH to spend. regenerate() still buys nothing, because it may only buy within about 1% of the all-time low, and the price cannot get there after the first trade.

Given, hypothetical

  • REGENERATION expressed at epoch 20. The current epoch is 21.
  • Spot tick 160,000; the all-time low is still the opening tick, 178,080.
  • Epoch 20 created a bid budget of 0.4 ETH. 0.5 ETH of fees wait in the pool positions.
  1. Step 1 of 3metabolize()

    Fees split

    Outcome: REGENERATION reserve 0.1 ETH

    Once REGENERATION is expressed, 20% of collected ETH fees go to its own reserve: 0.1 ETH of the 0.5 ETH collected. METABOLISM's bid budget is cut by the same share, to 0.32 ETH, and placed in the out-of-reach band.

    State before and after this step
    StateBeforeAfter
    REGENERATION reserve0 ETH0.1 ETH (changed)
    ETH reserve0 ETH0 ETH
    Bid budget, this epoch0.32 ETH0.32 ETH

    EventsMassAdded(kind 1, ticks 178,200 to 179,400, 0.32 ETH)MassAdded(kind 4, ticks 178,200 to 179,400, 0.08 ETH)

    GeneHook.sol:707-718 · GeneHook.sol:812-818 · Genome.sol:47-49
  2. Step 2 of 3regenerate()

    regenerate()

    Outcome: No buy: the price is above the limit

    Its allotment is 0.08 ETH: the smallest of the reserve, 0.5 ETH per call, 1 ETH per epoch and 20% of epoch 20's bid budget. It may buy only while the price is below the limit, tick 177,980: 100 ticks, about 1%, above the all-time low. Spot is tick 160,000, a price 6.04× the limit. It returns zero and spends nothing. Because the allotment was not spent, no cooldown starts.

    ETH band 178,200 to 179,400launch, ATL 178,080limit 177,980spot 160,000
    Ticks, price of GENE rising to the right. The axis is broken before spot.
    State before and after this step
    StateBeforeAfter
    REGENERATION reserve0.1 ETH0.1 ETH
    Limit
    all-time low 178,080 − 100 = 177,980
    GeneHook.sol:561-591 · GeneHook.sol:302-307 · Genome.sol:40-46
  3. Step 3 of 3measured, not simulated

    Can the price come back?

    Outcome: Unreachable in RC4

    Not in RC4. Every GENE in circulation was bought from the pool and paid the 1% fee, so holders own less GENE than the pool gave out. In the Phase 3 review, every holder sold everything after 26 epochs; the price stopped at tick 177,578, short of the limit. The all-time low never moved, so the limit never moved either.

    ETH band 178,200 to 179,400launch, ATL 178,080limit 177,980full exit 177,578spot 160,000
    Ticks, price of GENE rising to the right. The axis is broken before spot.
    Phase 3 review findings · GeneHook.sol:774

RC5RC5, in development: REGENERATION and IMMUNITY would buy back and burn at most about 1% above the block-start price, instead of the all-time low that never moves. Not frozen, not audited, not deployed.

Stress counts only once REGENERATION has expressed. IMMUNITY then expresses, and its band is placed by metabolize(), at the same out-of-reach ticks as METABOLISM's ETH.

Given, hypothetical

  • Every epoch from 18 on is stressed: 0.6 ETH of revenue over a 3,600-tick price path.
  • REGENERATION has counted four qualifying epochs by epoch 18; 12 ETH is committed to Mass.
  • Epoch 26's net selling created an IMMUNITY budget of 0.8 ETH; 2 ETH sits in reserve; spot tick 150,000.
  1. Step 1 of 5evolve()

    Epoch 18: stressed, not counted

    Outcome: Not eligible: REGENERATION not expressed

    Epoch 18 meets IMMUNITY's stress test, at least 0.1 ETH of revenue over a path of at least 3,000 ticks. It does not count: each gene waits until the one before it has expressed, and REGENERATION has not. The window stays empty.

    State before and after this step
    StateBeforeAfter
    IMMUNITYDormantDormant
    IMMUNITY window00000000000000
    GeneHook.sol:896-899 · GeneHook.sol:919-921 · Genome.sol:77-79
  2. Step 2 of 5evolve(), each epoch

    Epochs 19 to 25

    Outcome: IMMUNITY expressed, epoch 25

    REGENERATION completes its seven qualifying epochs and expresses at epoch 20, so IMMUNITY counts from epoch 21. Each stressed epoch sets one bit of its seven-epoch window. With 5 of the last 7 set, IMMUNITY expresses at epoch 25. Expression places nothing.

    State before and after this step
    StateBeforeAfter
    REGENERATIONObserving, 5 of 7Expressed at epoch 20 (changed)
    IMMUNITYDormantExpressed at epoch 25 (changed)
    IMMUNITY window00000000011111 (changed)

    EventsGeneTransition(REGENERATION, Expressible to Expressed, epoch 20)GeneTransition(IMMUNITY, Dormant to Observing, epoch 21)GeneTransition(IMMUNITY, Expressible to Expressed, epoch 25)

    GeneHook.sol:919-935 · Genome.sol:80-81
  3. Step 3 of 5view, epoch 27

    immunityActive()

    Outcome: immunityActive() = true

    Epoch 26 is processed, and its net selling leaves an IMMUNITY budget for epoch 27. The view immunityActive() reads true when IMMUNITY is expressed, the last 2 processed epochs each earned at least 0.5 ETH over at least 3,000 ticks, and evolution has caught up. It is a reading at one block, not an action, and past blocks are not recorded.

    State before and after this step
    StateBeforeAfter
    Epoch2627 (changed)
    immunityActive()truetrue
    IMMUNITY budget, this epoch0 ETH0.8 ETH (changed)
    GeneHook.sol:802-805 · Genome.sol:85-86
  4. Step 4 of 5metabolize(), epoch 27

    metabolize() places the band

    Outcome: Placed out of reach

    It places 0.8 ETH of the IMMUNITY budget (net selling only; at most 1 ETH per call and 1.5 ETH per epoch) in a 1,200-tick band below the lower of spot and the all-time low. Spot is far above the all-time low, so the band starts one GAP below the all-time low: ticks 178,200 to 179,400, the same out-of-reach band as METABOLISM's ETH. In RC4 it has no market effect. The same call also places 0.6 ETH of epoch 26's churn revenue in that band.

    ETH band 178,200 to 179,400launch, ATL 178,080spot 150,000
    Ticks, price of GENE rising to the right. The axis is broken before spot.
    State before and after this step
    StateBeforeAfter
    IMMUNITY budget, this epoch0.8 ETH0 ETH (changed)
    ETH reserve2 ETH0.6 ETH (changed)
    ETH committed to Mass12 ETH13.4 ETH (changed)

    EventsMassAdded(kind 2, ticks 178,200 to 179,400, 0.8 ETH)MassAdded(kind 4, ticks 178,200 to 179,400, 0.6 ETH)

    Band
    ref = max(spot 150,000, ATL 178,080) by tick = 178,080; alignUp(178,080 + 60, 600) = 178,200
    GeneHook.sol:493-507 · Genome.sol:36-37
  5. Step 5 of 5metabolize()

    300 blocks later

    Outcome: Budget spent: nothing placed

    immunityActive() is still true, but the IMMUNITY budget for this epoch is spent, so nothing more is placed. A new budget can only come from the next closed epoch's net selling.

    State before and after this step
    StateBeforeAfter
    IMMUNITY budget, this epoch0 ETH0 ETH
    ETH reserve0.6 ETH0.6 ETH
    ETH committed to Mass13.4 ETH13.4 ETH
    GeneHook.sol:828-832 · GeneHook.sol:494-496

RC5RC5, in development: REGENERATION and IMMUNITY would buy back and burn at most about 1% above the block-start price, instead of the all-time low that never moves. Not frozen, not audited, not deployed.

03Observation

How each gene is seen after deployment.

After launch every gene leaves records on chain: events in mined blocks, which the Evolution journal rebuilds, and values that Analytics reads at one block. Before launch the only records are a labelled rehearsal of the frozen bytecode.

  1. GENESIS

    After deployment
    GenesisLaunchedGeneTransition (gene 0)MassAdded (kind 0)One journal entry at the launch block: the genesis position and GENESIS expressed.
    Rehearsal Demonstration
    Expressed at epoch 0, block 4. Open the frame
    Mainnet
    No reading. From launch.
  2. METABOLISM

    After deployment
    GeneTransition (gene 1)FeesHarvestedFlowBudgetsMassAdded (kinds 1, 3, 4)PlacementSkippedJournal entries for each collection and placement, with the band each one landed in. Analytics reads ETH committed and the reserves.
    Rehearsal Demonstration
    Expressed at epoch 2, block 21,605. Open the frame First placement at block 21,606; 14.67 ETH committed by the read block.
    Mainnet
    No reading. From launch.
  3. REGENERATION

    After deployment
    GeneTransition (gene 2)RegeneratedGENE Transfer to the zero address (burn)A Regenerated entry would record ETH spent, GENE burned, spot and limit. In RC4 none can occur after the first trade.
    Rehearsal Demonstration
    Expressed at epoch 20, block 151,204. Open the frame 0 Regenerated events: no buyback was reachable.
    Mainnet
    No reading. From launch.
  4. IMMUNITY

    After deployment
    GeneTransition (gene 3)MassAdded (kind 2)immunityActive(), a viewA deployment is a mined MassAdded of kind 2. immunityActive() is read at one block and is not recorded, so its past values cannot be rebuilt.
    Rehearsal Demonstration
    Expressed at epoch 25, block 187,204. Open the frame One band of 0.227 ETH at ticks 178,200 to 179,400, block 208,805. Open the frame
    Mainnet
    No reading. From launch.

Rehearsal: the frozen RC4 bytecode on a private local test chain (chain 31337), scripted trading, read at block 223,220 after 31 epochs. Not mainnet. GENE is not deployed, so there is no mainnet activity to show.

Demonstration
The rehearsal, labelled wherever it appears. Not mainnet.
Historical
The Evolution journal rebuilds every recorded block from logs. On Ethereum it begins at launch.
Live
Analytics reads current values from the chain. Until launch there are none, so none are shown.

The Evolution journalAnalyticsThe specimen in Rehearsal

04Reference

The Genome in full.

The complete technical text: what the Genome fixes and what changes, how genomeHash is computed, each gene's rules, epochs, budgets, anchors, the invariants, and all 43 parameters. Open any section; nothing here is summarised away.

R01

The Genome at a glance

Fixed at deployment, forever

  • 43 constants, committed by one genomeHash: supply, the 1% fee, epoch length, every threshold and every cap.
  • Three rules fixed in the bytecode: protocol buys anchor at the all-time low, budgets come from net flow, asks anchor at the all-time high.
  • The genesis position: all 1,000,000,000 GENE, from the opening price to about 10,000× it.
  • No owner, no upgrade, no pause. No address has any power after launch().

Changes after launch, by trading and public calls

  • Epoch records, one per closed day of 7,200 blocks.
  • Gene states. A gene that is still counting can fall back, but an expressed gene never switches off.
  • The all-time high and low anchors.
  • Reserves, and the Permanent Mass positions placed from them.
  • Total supply, downward only, through burns.
Opening pricetick 178,080About 10,000×tick 85,920
The 154 price cells. The genesis band, from the opening price to about 10,000× it, cut on the 600-tick grid that Mass band edges snap to: 152 cells of 600 ticks (about a 6.2% price step each) and two end cells of 480 ticks. The cells are how this site draws the band; the contracts store the band and the grid, not the cells. Theca's skeleton carries one pore per cell. Later Mass can sit outside the band: bids below the opening price, asks above the band's top. No cell is a price target or a floor.
R02

The genes in a genuine market

The Genome fixes what each gene may do. The Phase 3 review (2026-10-12) tested what each one does when every GENE in circulation is bought from the pool. After the first trade, the price cannot return to the launch price, so every protocol ETH placement sits below any price trading can reach.

Gene In RC4, in a genuine market Status
GENESIS Seeds the curve every trade uses Acts in RC4
METABOLISM GENE fees become asks above the price. ETH fees land below any reachable price: a permanent ETH lock, not support Acts in RC4
REGENERATION Expresses, but its buyback is limited to about 1% above the all-time low, a price trading cannot return to. It never buys Expresses in RC4, cannot act. Fix in development (RC5)
IMMUNITY Expresses after confirmed stress; its ETH lands in the same out-of-reach band. No market effect Expresses in RC4, cannot act. Fix in development (RC5)

RC5 is in development: its proposed fix makes REGENERATION and IMMUNITY act through a capped buyback-and-burn. It is not frozen, not audited and not deployed, and its economic limits are not yet approved. The rules below are RC4's, as frozen.

R03

What the Genome is

The Genome is the set of compile-time constants in src/Genome.sol that bound everything GENE can do. No function anywhere takes a genome value as input, so none can be changed after deployment (Genome.sol:4-7). genomeHash commits to 43 of them; the four gene ids are labels outside the encoding. Every constant in the encoding is read by GeneHook except two: VERSION identifies the encoding, and GENE_COUNT is matched by a test against the literal length of GeneHook's gene array (Genome.sol:8, 12; GeneHook.sol:192; GenomeHash.t.sol:23).

Three rules have no numeric parameter and are fixed by the bytecode rather than by a constant: every protocol buy is anchored at the all-time-low block-start price, budgets come from net directional flow, and asks are anchored at the all-time-high block-start price (Genome.sol:8-10).

R04

genomeHash

0x39c130f616c32abfb40f8ab51eb54544cffd3e0d99602c71dc336bc8083c36ae

genomeHash is keccak256(Genome.encode()). GeneHook computes it in its constructor, stores it as an immutable and emits it in the Genesis event (GeneHook.sol:164, 245-247). test/unit/GenomeHash.t.sol:11 pins the value.

Genome.encode() concatenates three encoders in this order (Genome.sol:89-91):

Order Encoder abi.encode groups, in order Genome.sol
1 _encodePool() (VERSION, SUPPLY, LP_FEE, TICK_SPACING, GENESIS_TICK_UPPER, GENESIS_TICK_LOWER); (EPOCH_BLOCKS, MIN_BLOCK_VOLUME, PATH_CLAMP, GAP, GRID, NEAR_WIDTH) 93-98
2 _encodeCaps() (BID_CAP_CALL, BID_CAP_EPOCH, IMMUNITY_CAP_CALL, IMMUNITY_CAP_EPOCH, ASK_CAP_CALL, ASK_CAP_EPOCH); (REGEN_CAP_CALL, REGEN_CAP_EPOCH, MIN_DEPLOY_ETH, MIN_DEPLOY_GENE, COOLDOWN_BLOCKS, HARVEST_PER_CALL); (REGEN_PREMIUM_TICKS, REGEN_SHARE_BPS, GENE_COUNT, AUTO_EVOLVE_MAX) 100-106
3 _encodeGenes() (MET_MIN_EPOCH, MET_REVENUE, MET_OBSERVE); (REG_MIN_EPOCH, REG_REVENUE, REG_ACTIVE_BLOCKS, REG_OBSERVE, REG_ETH_COMMITTED); (IMM_MIN_EPOCH, IMM_REVENUE, IMM_PATH_TICKS, IMM_WINDOW, IMM_REQUIRED); (IMM_DEPLOY_REVENUE, IMM_CONFIRM) 108-115

That is nine groups and 43 words of 32 bytes. The order is part of the commitment (Genome.sol:88). The gene ids GENESIS, METABOLISM, REGENERATION and IMMUNITY (0 to 3) are constants but are not in the encoding; GENE_COUNT is (Genome.sol:57-61, 104). GeneLens.genome() returns the same bytes (GeneLens.sol:202-206). To recompute the hash yourself, follow verify the deployment.

GeneHook also uses constants that are not part of the Genome, such as the usable tick range and v4's per-tick liquidity ceiling (GeneHook.sol:157, 631).

R05

Gene states and the strict chain

Each gene is a state machine: DORMANT, OBSERVING, EXPRESSIBLE, EXPRESSED (GeneHook.sol:65-70). EXPRESSIBLE is transient: an expression moves through it and on to EXPRESSED in one call, emitting two GeneTransition events (GeneHook.sol:937-947). EXPRESSED is final; no code path leaves it (GeneHook.sol:903, 921).

Genes form a strict chain. A gene counts a closed epoch e only when its predecessor is EXPRESSED, the predecessor's expressedEpoch is earlier than e, and e is at least the gene's minimum epoch (GeneHook.sol:896-899).

Closed epochs are folded into the state machines one at a time, in order, by evolve() and by metabolize() (GeneHook.sol:289, 312-329). Each expression stores an evidence hash over the stored records of its evidence range; for IMMUNITY that range is the whole observed window, stressed epochs or not (GeneHook.sol:933, 975-982); see verify evidence hashes.

Revenue, the gene metric. Each closed epoch's record carries revenue: 1% (LP_FEE) of the ETH buyers paid in during the epoch, accumulated in gwei (GeneHook.sol:76, 385-387). It is evidence for gene conditions and for sizing the churn tier. It is not the fees collected: fees are collected by metabolize() into the reserves.

R06

GENESIS

Activation. Expressed by launch(), in the same transaction that opens the pool (GeneHook.sol:268-271). Its evidence hash is keccak256(abi.encode(GENESIS, genomeHash, launchBlock)) (GeneHook.sol:270).

What it switches on. The canonical pool. launch() initializes the pool at GENESIS_TICK_UPPER and adds the whole SUPPLY as one single-sided GENE position over [GENESIS_TICK_LOWER, GENESIS_TICK_UPPER] (MassAdded kind 0), then burns any GENE dust left in the hook (GeneHook.sol:252-273, 420-435). Only the launcher can call it, once (GeneHook.sol:253-255).

Resource accounting. The genesis position is registry index 0 and is harvested by every metabolize() (GeneHook.sol:431, 674). Its liquidity counts toward massLiquidity (GeneHook.sol:432).

Ticks are log1.0001(GENE per ETH): a higher tick means a cheaper GENE. The opening tick is the band's upper edge, so the band covers GENE prices from the opening price up to the price at GENESIS_TICK_LOWER.

R07

METABOLISM

Activation. From epoch MET_MIN_EPOCH, after GENESIS. A closed epoch qualifies when its revenue is at least MET_REVENUE. METABOLISM expresses after MET_OBSERVE consecutive qualifying epochs; an epoch that does not qualify resets the count and returns the gene to DORMANT (GeneHook.sol:884, 901-917). Its evidence range is the last MET_OBSERVE epochs (GeneHook.sol:911).

What it switches on. metabolize(), which reverts GeneNotExpressed until then (GeneHook.sol:283). Each call, in order (GeneHook.sol:458-476):

  1. Harvest. Pokes the genesis position and up to HARVEST_PER_CALL registry positions, round-robin, with zero-liquidity modifyLiquidity calls that collect only accrued LP fees (GeneHook.sol:669-697).
  2. IMMUNITY, if its deployment gate is open (see IMMUNITY).
  3. METABOLISM bids (MassAdded kind 1).
  4. Churn tier (MassAdded kind 4).
  5. Asks (MassAdded kind 3).
  6. Settle fees collected against principal added, net, in the hook's ERC-6909 claims (GeneHook.sol:720-725).

Steps 2 to 4 run only when evolution has caught up with the current epoch; asks run either way (GeneHook.sol:465-471).

Resource accounting.

Item Rule Source
ETH fees to ethReserve; once REGENERATION is expressed, REGEN_SHARE_BPS of them to regenReserve instead GeneHook.sol:707-716
GENE fees to geneReserve GeneHook.sol:717
Bid amount min(ethReserve, bid budget left, BID_CAP_EPOCH − bids placed this epoch), at most BID_CAP_CALL; nothing below MIN_DEPLOY_ETH GeneHook.sol:479-483
Bid band lower edge top = alignUp(atlTick + GAP, GRID); _bidRange returns [top, top + NEAR_WIDTH]. Its other branch, [top, GENESIS_TICK_UPPER], needs top + GRID <= GENESIS_TICK_UPPER; see the note below the table GeneHook.sol:484, 782-786
Churn amount the previous epoch's revenue minus its stored bid budget, less churn already placed, limited to BID_CAP_EPOCH minus bids and churn placed this epoch, at most BID_CAP_CALL GeneHook.sol:526-539
Churn band [lo, lo + NEAR_WIDTH], lo = alignUp(atlTick + GAP, GRID) GeneHook.sol:516-518
Ask amount min(geneReserve, ASK_CAP_CALL, ASK_CAP_EPOCH − placed); nothing below MIN_DEPLOY_GENE GeneHook.sol:541-543
Ask band bottom = alignDown(min(spot, athTick) − GAP, GRID) in ticks; [GENESIS_TICK_LOWER, bottom], or [bottom − NEAR_WIDTH, bottom] within one GRID of GENESIS_TICK_LOWER GeneHook.sol:544-545, 788-792
Cooldown COOLDOWN_BLOCKS, started by every call that does not revert GeneHook.sol:284-286
Oversized placement skipped with PlacementSkipped; no reserve, cap or budget consumed GeneHook.sol:142-144, 619-621

metabolize() returns (ethToBids, ethToImmunity, geneToAsks); ethToBids includes the churn tier (GeneHook.sol:281, 521). ETH beyond the budgets stays in ethReserve.

Every ETH band starts at tick 178,200 or higher, below the opening price, in every state the invariant suite reaches. With every GENE bought from the pool, the price never returns to the opening price after the first trade, so no seller reaches these bands (Phase 3 review findings). The suite asserts atlTick >= GENESIS_TICK_UPPER (GenePermanence.t.sol:101), and bids, churn and IMMUNITY start at alignUp(atlTick + GAP, GRID) or above (GeneHook.sol:484, 498-499, 516). In those states _bidRange returns [top, top + NEAR_WIDTH].

Each placement must be single-sided, or _addMass reverts InvariantBroken and the whole call rolls back, including its harvest and its cooldown write (GeneHook.sol:284-286, 655-660).

R08

REGENERATION

Activation. From epoch REG_MIN_EPOCH, after METABOLISM has expressed in an earlier epoch. A closed epoch qualifies when its revenue is at least REG_REVENUE and its activeBlocks at least REG_ACTIVE_BLOCKS. REGENERATION expresses once REG_OBSERVE consecutive epochs qualify and the expressing epoch's record shows ethCommitted of at least REG_ETH_COMMITTED; a non-qualifying epoch resets the count (GeneHook.sol:885-892, 901-917).

What it switches on.

  • A fee share. From then on, REGEN_SHARE_BPS of every ETH fee harvest goes to regenReserve (GeneHook.sol:709-712).
  • A smaller bid budget. ethBudget() is reduced by the same share (GeneHook.sol:812-817).
  • regenerate(), a bounded buyback and burn (GeneHook.sol:296-309).

Resource accounting.

Item Rule Source
Allotment per call min(regenReserve, REGEN_CAP_CALL, REGEN_CAP_EPOCH − spent this epoch, REGEN_SHARE_BPS × previous epoch's net-flow bid budget − spent this epoch); nothing below MIN_DEPLOY_ETH GeneHook.sol:563-571
Price limit atlTick − REGEN_PREMIUM_TICKS; nothing is bought if the price already sits at or above it GeneHook.sol:574-577
Buyback exact-in ETH self-swap up to the price limit; the GENE bought is taken to the hook and burned GeneHook.sol:578-589, 308
Cooldown (R1) COOLDOWN_BLOCKS, started only when a call spends its whole allotment GeneHook.sol:302-307, 590

The churn tier funds no buyback: the allowance is a share of the net-flow bid budget only (GeneHook.sol:565-567). On the genesis curve the price limit binds before the caps.

Buybacks run when someone calls regenerate() while the price is no more than about 1% (REGEN_PREMIUM_TICKS) above the all-time-low price. Otherwise the call spends nothing and the ETH stays in regenReserve (GeneHook.sol:574-577; invariant REGEN). After the first trade the price cannot return to that range, so on RC4 no buyback runs in a genuine market (Phase 3 review findings).

R09

IMMUNITY

Activation (expression). From epoch IMM_MIN_EPOCH, after REGENERATION has expressed in an earlier epoch. A closed epoch is stressed when its revenue is at least IMM_REVENUE and its pathTicks at least IMM_PATH_TICKS. IMMUNITY keeps a bitmap of the last IMM_WINDOW processed epochs and expresses when at least IMM_REQUIRED of them are stressed (GeneHook.sol:881, 893, 919-934).

Expression, pressure and deployment are three different facts. IMMUNITY's contract state is one of the four gene states above (GeneHook.sol:65-70); pressure is a view and deployment is an event.

Fact Meaning How to tell Source
Expression The gene is EXPRESSED. metabolize() now includes the IMMUNITY step GeneTransition to EXPRESSED; geneStatus(hook, 3).state == 3 GeneHook.sol:466, 937-947
Pressure The deployment gate reads open: IMMUNITY expressed, each of the last IMM_CONFIRM processed epochs deployment-stressed (revenue >= IMM_DEPLOY_REVENUE and pathTicks >= IMM_PATH_TICKS), and evolution caught up immunityActive(), a view. Display only "IMMUNE PRESSURE DETECTED" GeneHook.sol:802-805, 882-883, 987-992
Deployment ETH was placed as IMMUNITY Mass Only a mined MassAdded with kind 2 GeneHook.sol:138, 493-503

Pressure never implies a deployment. immunityActive() can read true while metabolize() places nothing: before the new epoch's first touch, when this epoch's IMMUNITY cap is spent, when reserves are below the minimum, or when the net-sell budget is used or zero (GeneHook.sol:493-496, 802-805, 828-832). The deployment-stress register shifts for every processed epoch, including epochs before IMMUNITY is expressed (GeneHook.sol:883).

Resource accounting.

Item Rule Source
Amount min(ethReserve, net-sell budget left, IMMUNITY_CAP_EPOCH − placed), at most IMMUNITY_CAP_CALL; nothing below MIN_DEPLOY_ETH GeneHook.sol:493-496, 828-832
Band lo = alignUp(max(spot, atlTick) + GAP, GRID) in ticks, band [lo, lo + NEAR_WIDTH] GeneHook.sol:497-501
Funding net selling only: the IMMUNITY budget of the previous closed epoch GeneHook.sol:199-204, 870

With the price unable to return to launch after the first trade, max(spot, atlTick) is the launch tick in every genuine market, so the band is [178,200, 179,400], the same out-of-reach range as METABOLISM's ETH (Phase 3 review findings).

R10

Epochs and evolution

  • Numbering. Epoch e = (block.number − launchBlock) / EPOCH_BLOCKS (GeneHook.sol:747).
  • First touch of a block. The first swap of a block, or any entry point, runs _newBlock with the price the previous block left (GeneHook.sol:364, 728-733). It finalizes the previous touched block: if that block's ETH volume reached MIN_BLOCK_VOLUME, it adds one active block and min(|net tick move across that block|, PATH_CLAMP) to pathTicks (GeneHook.sol:738-745).
  • Closing. When the epoch number has changed, it writes the last touched epoch's record (revenue, activeBlocks, pathTicks, ethCommitted, closed) permanently, emits EpochClosed and computes that epoch's net-flow budget (GeneHook.sol:748-765).
  • Untouched epochs get no record and read as all-zero activity, which counts as a non-qualifying epoch for every gene (GeneHook.sol:880).
  • Evolution. evolve(maxEpochs) processes closed epochs from the evolution cursor; metabolize() processes up to AUTO_EVOLVE_MAX before spending ETH (GeneHook.sol:289, 312-329). See keepers.
  • Views and the first touch. Epoch-dependent views show the last touched epoch until the new epoch's first touch (GeneHook.sol:728-765).
R11

Net-flow budgets

  1. Measure. Each swap adds signed net GENE leaving the curve: buys count the GENE out, sells count the GENE in net of the 1% fee. A round trip that restores the price nets to zero, whoever trades it (GeneHook.sol:378-383).
  2. Count once. At an epoch's close, the cumulative net flow nc is compared with its all-time high hwm and the lowest level since that high, lwm. Only flow that takes nc above hwm funds bids; only flow that takes it below lwm funds IMMUNITY. Flow that re-crosses levels that already funded funds nothing (GeneHook.sol:837-858).
  3. Value at the cheapest price. The funded GENE is valued in ETH at pLow, the epoch's cheapest price over its block starts and its close (GeneHook.sol:758-761, 860-862).
  4. Take 1%. The budget is LP_FEE of that value: a bid budget for net buying or an IMMUNITY budget for net selling, never both (GeneHook.sol:863-872).
  5. Spend next epoch only. Epoch e spends only the budgets created by e − 1; nothing carries over (GeneHook.sol:812-832, 526-539).
Channel Budget in epoch e Source
METABOLISM bids bid budget of e − 1, less REGEN_SHARE_BPS once REGENERATION is expressed (ethBudget()) GeneHook.sol:812-817
Churn tier revenue(e − 1) minus the bid budget of e − 1 GeneHook.sol:526-539
IMMUNITY IMMUNITY budget of e − 1 GeneHook.sol:828-832
REGENERATION REGEN_SHARE_BPS of the bid budget of e − 1 GeneHook.sol:565-570

Because the flow paid at least pLow, a budget never exceeds the fee its own flow paid (GeneHook.sol:834-836; invariant BUD2).

R12

All-time low and all-time high anchors

Anchor Rule Source
All-time low, atlTick Set to GENESIS_TICK_UPPER at launch. On a block's first touch it moves to the block-start tick only if that tick is higher (a lower GENE price) and the pool has active liquidity there. It never moves back GeneHook.sol:104, 266, 771-774
All-time high, athTick Set to GENESIS_TICK_UPPER at launch. Moves to any lower block-start tick (a higher GENE price). It never moves back GeneHook.sol:103, 266, 770

A block-start tick is the price the previous touched block left, so intra-block prints are never sampled (GeneHook.sol:732-733). Because atlTick starts at GENESIS_TICK_UPPER and only increases, the all-time-low price is never above the opening price; the invariant suite asserts atlTick >= GENESIS_TICK_UPPER (GenePermanence.t.sol:101).

Every protocol buy is placed against the all-time low (GeneHook.sol:35-38):

  • METABOLISM bids and the churn tier start one GAP beyond atlTick (GeneHook.sol:484, 516);
  • IMMUNITY starts one GAP beyond max(spot, atlTick) in ticks (GeneHook.sol:498-499);
  • the REGENERATION buyback stops at atlTick − REGEN_PREMIUM_TICKS (GeneHook.sol:574).

Asks are placed against the all-time high: below min(spot, athTick) in ticks, that is above the higher of the spot price and the all-time-high price (GeneHook.sol:544-545).

The all-time low is a placement anchor, not a price floor: in a falling market it can sit far below spot.

R13

Invariants

The RC4 invariants and the suites that enforce them. Enforcement: U unit, F fuzz, I stateful invariant, K mainnet-fork test, S static or bytecode test.

ID Invariant Enforced
FEE1 poolKey().fee is LP_FEE, static, and slot0 lpFee equals it U, K
FEE2 No GeneHook path changes the fee; the bytecode has no updateDynamicLPFee call S, I
RT1 Universal Router with Permit2: exact-in and exact-out buys and sells succeed on mainnet state K
RT2 A route that hits the pool twice in one unlock succeeds K, U
PM1 The liquidity of every hook-owned position, and their sum, never decreases I
PM2 No other address can withdraw protocol liquidity or collect its principal I, U
PM3 No address other than the hook holds liquidity in the canonical pool I
PM4 The hook's ERC-6909 claim balances equal its reserves, per currency, plus any claims a third party transferred to the hook I (GenePermanence.t.sol:139-151)
SUP totalSupply never increases I, S
XFER Any holder can transfer any amount to any address F, S
ROLE After launch(), no function behaves differently by caller; a second launch() reverts U, S
EVO1 Gene states advance DORMANT, OBSERVING, EXPRESSIBLE, EXPRESSED (OBSERVING can fall back to DORMANT); no gene leaves DORMANT before its predecessor is EXPRESSED I, U
EVO2 Expressions are reconstructable from stored records U
IMM IMMUNITY places at most IMMUNITY_CAP_CALL per call and IMMUNITY_CAP_EPOCH per epoch, and nothing unless the last IMM_CONFIRM closed epochs were each deployment-stressed and evolution is caught up F, U, I
CAP Each ETH bid tier at most BID_CAP_CALL per call; METABOLISM bids at most BID_CAP_EPOCH per epoch, and the churn tier places only within BID_CAP_EPOCH minus bids and churn already placed; asks at most ASK_CAP_CALL per call and ASK_CAP_EPOCH per epoch; buyback at most REGEN_CAP_CALL per call and REGEN_CAP_EPOCH per epoch F, I
PLC1 No protocol buy (kinds 1, 2, 4) has tickLower below atlTick + GAP; IMMUNITY's band also starts one GAP beyond spot when spot is below the all-time-low price; every ask band's upper tick is at most min(spot, athTick) − GAP I, U
ATL The all-time low never moves to a higher price and the all-time high never to a lower one; the all-time low moves only on a block's first touch, only to a lower price with active liquidity I, U
LIVE The invariant handler treats any metabolize() revert other than Cooldown or GeneNotExpressed as a violation; an oversized placement is skipped and consumes nothing I, U
PLC2 Every long-hold / rise-then-pin row (5,544 tests) ends with attacker total P&L at or below zero U
BUD1 Per-channel budgets: bids, IMMUNITY and churn each within their own budget; each placed wei counted once; a closed epoch funds bids or IMMUNITY, never both; no carry-over U, I
BUD2 A net-flow budget never exceeds the fee its own funding flow paid F, I
PROV Budgets depend only on pool flows: round trips fund nothing, and the same net flow funds the same budget through any number of addresses, routers, blocks or splits; lwm <= nc <= hwm U, I
REGEN The buyback's price limit is exactly atlTick − REGEN_PREMIUM_TICKS; spend stays within REGEN_SHARE_BPS of the previous epoch's bid budget I, U
ABI GeneHook's external ABI is exactly the reviewed 27-function set S
HASH keccak256(Genome.encode()) equals the recorded genomeHash; VERSION is 4 U
LENS GeneLens decodes storage byte-identically to typed views U, F
ADDR The hook address's low 14 bits are exactly 0x2AC0 and its first byte is not 0x91 U, K
SELL From every state the invariant runs reach, an exact-in sell of a small and of a very large GENE balance succeeds I (GenePermanence.t.sol:167-185)
CALL The hook calls only the PoolManager and GeneToken, never GeneLens S, U

Release rule: zero skipped tests; the fork suite fails when its RPC variable is unset. The full regression ran 5,920 tests with 0 failed and 0 skipped on commit 4ff8abd, which differs from the frozen aca5fcd only in Genome.VERSION; the frozen commit itself ran 347 (see Security).

Each entry above is asserted by the suites in its last column, for every state those suites reach.

R14

Parameters

Pool and placement _encodePool

ConstantValueMeaningSource
VERSION4Genome encoding version (4 = V6g-D all-time-low rule + R1 REGENERATION cooldown)Genome.sol:12
SUPPLY1,000,000,000 GENEFixed supply, minted once to the hook and seeded into the pool at launchGenome.sol:15
LP_FEE10,000 pips (1%)Static 1.00% LP fee in the PoolKeyGenome.sol:16
TICK_SPACING60 ticksPool tick spacingGenome.sol:17
GENESIS_TICK_UPPER178,080 ticksOpening price: the top of the genesis bandGenome.sol:18
GENESIS_TICK_LOWER85,920 ticks10,000x the opening price: the far edge of the genesis band (a design bound)Genome.sol:19
EPOCH_BLOCKS7,200 blocksEpoch length, about 24 hoursGenome.sol:22
MIN_BLOCK_VOLUME0.05 ETHETH swap volume that makes a block count as activeGenome.sol:23
PATH_CLAMP200 ticksMost ticks one block can add to an epoch's pathGenome.sol:24
GAP60 ticksMinimum distance of a placement from its reference priceGenome.sol:27
GRID600 ticksPlacement band edges snap to this gridGenome.sol:28
NEAR_WIDTH1,200 ticksWidth of the ETH bands placed at the all-time lowGenome.sol:29

Caps and timing _encodeCaps

ConstantValueMeaningSource
BID_CAP_CALL3 ETHMETABOLISM bids, most ETH per metabolize() callGenome.sol:34
BID_CAP_EPOCH10 ETHMETABOLISM bids and churn tier, most ETH per epochGenome.sol:35
IMMUNITY_CAP_CALL1 ETHIMMUNITY, most ETH per callGenome.sol:36
IMMUNITY_CAP_EPOCH1.5 ETHIMMUNITY, most ETH per epochGenome.sol:37
ASK_CAP_CALL10,000,000 GENEAsk Mass, most GENE per callGenome.sol:38
ASK_CAP_EPOCH30,000,000 GENEAsk Mass, most GENE per epochGenome.sol:39
REGEN_CAP_CALL0.5 ETHREGENERATION buyback, most ETH per callGenome.sol:40
REGEN_CAP_EPOCH1 ETHREGENERATION buyback, most ETH per epochGenome.sol:41
MIN_DEPLOY_ETH0.001 ETHSmallest ETH placementGenome.sol:42
MIN_DEPLOY_GENE1,000 GENESmallest GENE placementGenome.sol:43
COOLDOWN_BLOCKS300 blocksBlocks between metabolize() calls (and after a full-allotment regenerate())Genome.sol:44
HARVEST_PER_CALL8Registry positions poked per metabolize(), plus genesisGenome.sol:45
REGEN_PREMIUM_TICKS100 ticksA buyback never pays more than about 1% over the all-time-low priceGenome.sol:46
REGEN_SHARE_BPS2,000 bps (20%)REGENERATION's share of the net-flow bid budget once expressedGenome.sol:49
GENE_COUNT4Number of genesGenome.sol:61
AUTO_EVOLVE_MAX8Pending epochs one metabolize() folds before spendingGenome.sol:54

Gene conditions _encodeGenes

ConstantValueMeaningSource
MET_MIN_EPOCH1 epochsMETABOLISM can express from epoch 1Genome.sol:64
MET_REVENUE0.25 ETHMETABOLISM pressure: epoch revenue at least 0.25 ETHGenome.sol:65
MET_OBSERVE2 epochsMETABOLISM: 2 consecutive pressure epochsGenome.sol:66
REG_MIN_EPOCH14 epochsREGENERATION can express from epoch 14Genome.sol:70
REG_REVENUE0.25 ETHREGENERATION pressure: revenue at least 0.25 ETHGenome.sol:71
REG_ACTIVE_BLOCKS300 blocksREGENERATION pressure: at least 300 active blocksGenome.sol:72
REG_OBSERVE7 epochsREGENERATION: 7 consecutive pressure epochsGenome.sol:73
REG_ETH_COMMITTED10 ETHREGENERATION: at least 10 ETH committed to MassGenome.sol:74
IMM_MIN_EPOCH14 epochsIMMUNITY can express from epoch 14Genome.sol:77
IMM_REVENUE0.1 ETHIMMUNITY pressure: revenue at least 0.1 ETHGenome.sol:78
IMM_PATH_TICKS3,000 ticksIMMUNITY pressure: price path at least 3,000 ticksGenome.sol:79
IMM_WINDOW7 epochsIMMUNITY: window of the last 7 epochsGenome.sol:80
IMM_REQUIRED5 epochsIMMUNITY: 5 pressure epochs in the windowGenome.sol:81
IMM_DEPLOY_REVENUE0.5 ETHIMMUNITY deployment: each confirming epoch earns at least 0.5 ETHGenome.sol:85
IMM_CONFIRM2 epochsIMMUNITY deployment: the last 2 processed epochs both deploy-stressedGenome.sol:86
Sources (23)
  • src/Genome.sol:4-116
  • src/GeneHook.sol:25-45
  • src/GeneHook.sol:65-90
  • src/GeneHook.sol:97-117
  • src/GeneHook.sol:157
  • src/GeneHook.sol:164
  • src/GeneHook.sol:172-221
  • src/GeneHook.sol:245-273
  • src/GeneHook.sol:276-329
  • src/GeneHook.sol:368-390
  • src/GeneHook.sol:420-435
  • src/GeneHook.sol:451-591
  • src/GeneHook.sol:610-627
  • src/GeneHook.sol:669-725
  • src/GeneHook.sol:728-873
  • src/GeneHook.sol:879-947
  • src/GeneHook.sol:975-992
  • src/GeneLens.sol:202-206
  • test/invariant/GenePermanence.t.sol:96-102
  • test/invariant/GenePermanence.t.sol:139-151
  • test/invariant/GenePermanence.t.sol:167-185
  • test/unit/GenomeHash.t.sol:11
  • test/unit/GenomeHash.t.sol:23

Paths are relative to the GENE repository at tag rc4-audit-candidate (aca5fcd).

05Sources

Every claim, with its line.

Gene facts and walkthrough steps cite the frozen RC4 source. The walkthrough's arithmetic is a line-by-line port of those rules; its curve math reproduces a recorded rehearsal swap to the GENE.

Claim sheet 70 claims

Every reference points at the frozen source, tag rc4-audit-candidate, commit aca5fcd. A build check confirms each cited line range contains what the claim rests on. Constants are listed with their lines in the parameters reference.

#WhereClaimSource
1Page43 constants in three groups, committed by one hash: genomeHash is keccak256 of Genome.encode().Genome.sol:88-115
GeneHook.sol:244-245
2PageThe hook takes no fee of its own; the static 1% LP fee is in the PoolKey.GeneHook.sol:239
GeneHook.sol:389-390
3PageAn epoch is 7,200 blocks; it is recorded at the first touch after it ends.Genome.sol:22
GeneHook.sol:747-760
4Pageevolve(), metabolize() and regenerate() are open to any account; no caller is paid.GeneHook.sol:281-312
5PageEvery protocol ETH placement after the first trade lands in the band from tick 178,200 to 179,400, which no seller can reach.Phase 3 review findings
6GENESISPlaces the whole supply, 1,000,000,000 GENE, in one single-sided position from the opening price, tick 178,080, to 10,000× it, tick 85,920. Every trade uses this curve.GeneHook.sol:420-435
Genome.sol:15-19
7GENESISlaunch() runs once. It opens the pool at tick 178,080 with the static 1% fee, seeds the supply and burns any rounding dust.GeneHook.sol:252-273
8GENESISFrom then on the hook is the pool's only liquidity provider: anyone else's add or remove reverts.GeneHook.sol:337-351
9GENESISOnly the launcher can call launch(), and only once: NotLauncher, AlreadyLaunched.GeneHook.sol:253-254
10GENESISEvery public call before launch reverts with NotLaunched.GeneHook.sol:999-1001
11GENESISEach gene waits for the one before it. GENESIS expresses at epoch 0, so METABOLISM can count from epoch 1.GeneHook.sol:896-899
12GENESISExpressed by launch() itself, at epoch 0. It has no market condition.GeneHook.sol:266-270
13GENESISObserved through: Genesis, Launched, GeneTransition (gene 0), MassAdded (kind 0).GeneHook.sol:131-141
14METABOLISMmetabolize() collects the LP fees in the hook's positions into reserves and returns them to the pool as Permanent Mass. GENE becomes asks above the price. ETH goes into a 1,200-tick band one GAP below the all-time low.GeneHook.sol:451-476
Genome.sol:27-29
15METABOLISMAfter the first trade the price cannot fall back to that band, so its ETH is a permanent lock, not a bid a trader can hit. No function removes Mass.Phase 3 review findings
GeneHook.sol:594-610
16METABOLISMEach call harvests the genesis position and up to 8 more, then places, in order: IMMUNITY's band when it is active, METABOLISM's bid from last epoch's net buying, the churn tier from revenue that buying did not fund, and GENE asks.GeneHook.sol:451-476
GeneHook.sol:671-689
17METABOLISMCaps: at most 3 ETH per call and 10 ETH per epoch for the bid and churn tier together; at most 10,000,000 GENE per call and 30,000,000 per epoch as asks.Genome.sol:34-39
18METABOLISMmetabolize() first folds up to 8 pending closed epochs into the genes, so gene state is final before ETH is spent.GeneHook.sol:288-289
19METABOLISMNot expressed: the call reverts with GeneNotExpressed(1).GeneHook.sol:283
20METABOLISMWithin 300 blocks of the last call: Cooldown(readyAtBlock).GeneHook.sol:284-285
21METABOLISMA zero budget places nothing: a budget comes from the previous closed epoch only and does not carry over. Amounts under 0.001 ETH or 1,000 GENE are skipped.GeneHook.sol:807-818
GeneHook.sol:479-484
22METABOLISMETH waits while evolution is behind by more than 8 epochs; a placement over v4's per-tick ceiling is skipped, never reverted.GeneHook.sol:461-465
GeneHook.sol:611-621
23METABOLISMNeeds GENESIS. Its ETH placements build the 10 ETH commitment REGENERATION requires.Genome.sol:74
GeneHook.sol:624
24METABOLISMOnce REGENERATION expresses, 20% of collected ETH fees go to REGENERATION's reserve and METABOLISM's bid budget shrinks by the same share. METABOLISM's call is also the one that places IMMUNITY's band.GeneHook.sol:707-718
GeneHook.sol:466
25METABOLISMFrom epoch 1, 2 consecutive closed epochs with revenue of at least 0.25 ETH. Revenue counts 1% of the ETH that buys pay in, so this means at least 25 ETH of buys per epoch. A short epoch resets the count. Epoch 2 at the earliest.GeneHook.sol:879-887
GeneHook.sol:385-387
26METABOLISMObserved through: GeneTransition (gene 1), FeesHarvested, FlowBudgets, MassAdded (kinds 1, 3, 4), PlacementSkipped.GeneHook.sol:133-144
27REGENERATIONOnce expressed, it takes 20% of collected ETH fees into its own reserve. regenerate() buys GENE from the pool and burns it, paying no more than 100 ticks, about 1%, above the all-time low. Supply can only fall.GeneHook.sol:561-591
GeneHook.sol:308
Genome.sol:46-49
28REGENERATIONIn RC4 the all-time low stays at the opening tick, 178,080, so the limit is tick 177,980. After the first trade the price cannot return there: REGENERATION never buys and its reserve stays idle.Phase 3 review findings
GeneHook.sol:774
29REGENERATIONEach call spends the smallest of: its reserve, 0.5 ETH, what is left of 1 ETH this epoch, and 20% of the previous epoch's bid budget. Churn revenue funds no buyback.GeneHook.sol:562-571
30REGENERATIONThe cooldown of 300 blocks starts only after a call spends its whole allotment, so a call that buys nothing cannot lock it out.GeneHook.sol:302-307
31REGENERATIONNot expressed: GeneNotExpressed(2). Within a cooldown: Cooldown(readyAtBlock).GeneHook.sol:298-300
32REGENERATIONAn allotment under 0.001 ETH returns zero.GeneHook.sol:571
33REGENERATIONA price at or above the limit returns zero. In RC4 that is every price after the first trade.GeneHook.sol:577
Phase 3 review findings
34REGENERATIONNeeds METABOLISM, and 10 ETH of METABOLISM's placements. IMMUNITY waits for REGENERATION.GeneHook.sol:896-899
35REGENERATIONRC5, in development: a buyback at most about 1% above the block-start price instead of the all-time low. Not frozen, not audited, not deployed.Phase 3 review findings
36REGENERATIONAfter METABOLISM, from epoch 14: 7 consecutive epochs each with at least 0.25 ETH of revenue and 300 active blocks (a block is active at 0.05 ETH of volume), and at least 10 ETH committed to Mass. A miss resets the run. Epoch 20 at the earliest.GeneHook.sol:884-891
Genome.sol:68-74
37REGENERATIONObserved through: GeneTransition (gene 2), Regenerated, GENE Transfer to the zero address (burn).GeneHook.sol:145
GeneToken.sol:21-22
38IMMUNITYAfter confirmed stress, metabolize() places up to 1 ETH per call and 1.5 ETH per epoch in a 1,200-tick ETH band one GAP below the lower of spot and the all-time low, funded only by net selling. Expression alone places nothing.GeneHook.sol:493-507
Genome.sol:36-37
39IMMUNITYIn RC4 that band is the same out-of-reach band as METABOLISM's ETH, ticks 178,200 to 179,400, so it has no market effect.Phase 3 review findings
40IMMUNITYIt places only while immunityActive() is true: expressed, the last 2 processed epochs each with at least 0.5 ETH of revenue over 3,000 ticks, and evolution caught up.GeneHook.sol:802-805
Genome.sol:85-86
41IMMUNITYIts budget is 1% of the previous epoch's newly funded net selling, valued at that epoch's cheapest price.GeneHook.sol:837-875
42IMMUNITYStress before REGENERATION has expressed does not count toward the window.GeneHook.sol:921
43IMMUNITYNo net selling below the post-high low: no budget, nothing placed. Caps of 1 ETH per call and 1.5 ETH per epoch.GeneHook.sol:828-832
GeneHook.sol:494-496
44IMMUNITYIt returns to dormant only when its whole window holds no stressed epoch; once expressed it never switches off.GeneHook.sol:929-931
45IMMUNITYNeeds REGENERATION. Placed by metabolize(), so METABOLISM's 300-block cooldown applies. Funded by net selling, never by fees.GeneHook.sol:466
46IMMUNITYRC5, in development: IMMUNITY would buy back and burn instead, at most about 1% above the block-start price. Not frozen, not audited, not deployed.Phase 3 review findings
47IMMUNITYAfter REGENERATION, from epoch 14: 5 of the last 7 counted epochs stressed, each with at least 0.1 ETH of revenue over a price path of at least 3,000 ticks (one block adds at most 200). Epoch 25 at the earliest.GeneHook.sol:919-935
Genome.sol:76-81
48IMMUNITYObserved through: GeneTransition (gene 3), MassAdded (kind 2), immunityActive(), a view.GeneHook.sol:990-997
49Walkthrough: First buy 1Launch. GENESIS expressed, epoch 0.GeneHook.sol:252-273
Genome.sol:18-19
50Walkthrough: First buy 2The swap: 1 ETH in. Evidence recorded.GeneHook.sol:368-392
Genome.sol:16
51Walkthrough: First buy 3The next block's first touch. Anchors and activity recorded.GeneHook.sol:734-780
Genome.sol:23-24
52Walkthrough: First buy 4Someone calls metabolize(). Reverts: GeneNotExpressed(1).GeneHook.sol:283
53Walkthrough: First buy 5Epoch 0 closes. No expression: epoch 0 cannot count.GeneHook.sol:837-875
GeneHook.sol:896-899
Genome.sol:64-66
54Walkthrough: METABOLISM 1Epoch 1: 30 ETH of buys. Observing, 1 of 2.GeneHook.sol:901-917
Genome.sol:65
55Walkthrough: METABOLISM 2Epoch 2: 18 ETH, short. Falls back to dormant.GeneHook.sol:912-916
56Walkthrough: METABOLISM 3Epoch 3: 27 ETH. Observing, 1 of 2.GeneHook.sol:905-911
57Walkthrough: METABOLISM 4Epoch 4: 31 ETH, expressed. METABOLISM expressed, epoch 4.GeneHook.sol:937-949
Genome.sol:66
58Walkthrough: METABOLISM 5metabolize(). Placed: a permanent lock below reachable prices.GeneHook.sol:281-291
GeneHook.sol:479-491
GeneHook.sol:513-539
GeneHook.sol:782-786
Genome.sol:27-29
Phase 3 review findings
59Walkthrough: METABOLISM 6Called again, 120 blocks later. Reverts: Cooldown.GeneHook.sol:284-286
Genome.sol:44
60Walkthrough: Quiet epoch 1Where things stand. Observing, 3 of 7.Genome.sol:70-74
61Walkthrough: Quiet epoch 2Epoch 17 passes with no trade. REGENERATION resets to dormant.GeneHook.sol:879-881
GeneHook.sol:838
GeneHook.sol:912-916
62Walkthrough: Quiet epoch 3metabolize() in epoch 18. Succeeds, places nothing: zero budget.GeneHook.sol:479-484
GeneHook.sol:812-818
Genome.sol:42-43
63Walkthrough: REGENERATION 1Fees split. REGENERATION reserve 0.1 ETH.GeneHook.sol:707-718
GeneHook.sol:812-818
Genome.sol:47-49
64Walkthrough: REGENERATION 2regenerate(). No buy: the price is above the limit.GeneHook.sol:561-591
GeneHook.sol:302-307
Genome.sol:40-46
65Walkthrough: REGENERATION 3Can the price come back?. Unreachable in RC4.Phase 3 review findings
GeneHook.sol:774
66Walkthrough: IMMUNITY 1Epoch 18: stressed, not counted. Not eligible: REGENERATION not expressed.GeneHook.sol:896-899
GeneHook.sol:919-921
Genome.sol:77-79
67Walkthrough: IMMUNITY 2Epochs 19 to 25. IMMUNITY expressed, epoch 25.GeneHook.sol:919-935
Genome.sol:80-81
68Walkthrough: IMMUNITY 3immunityActive(). immunityActive() = true.GeneHook.sol:802-805
Genome.sol:85-86
69Walkthrough: IMMUNITY 4metabolize() places the band. Placed out of reach.GeneHook.sol:493-507
Genome.sol:36-37
70Walkthrough: IMMUNITY 5300 blocks later. Budget spent: nothing placed.GeneHook.sol:828-832
GeneHook.sol:494-496

All 43 parametersGeneHook referencePhase 3 review findings