Pre-launch. RC4 code-frozen for external audit (rc4-audit-candidate, aca5fcd). Report pending. Status, updated 2026-10-08
GENESpecimen 001

Documentation · Reference

Parameters

The 43 Genome constants committed by genomeHash, and what each one governs in GeneHook.

Every bound GENE operates under is a compile-time constant in the Genome library. No function takes a genome value as input, so none can be changed after compilation (Genome.sol:4-10). GeneHook.genomeHash() is keccak256(Genome.encode()) (GeneHook.sol:245-246), and test/unit/GenomeHash.t.sol pins the RC4 value 0x39c130f616c32abfb40f8ab51eb54544cffd3e0d99602c71dc336bc8083c36ae (GenomeHash.t.sol:11). GeneLens.genome() returns the exact encoded bytes.

The encoding is the concatenation of nine abi.encode groups, 43 words, in the order written; the order is part of the commitment (Genome.sol:88-115). Units: ETH amounts are in wei (written with the ether suffix in the source), GENE amounts in 18-decimal units, ticks are Uniswap ticks, epochs are numbered from the launch block. Values are rendered from the source below.

#All 43 constants

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

#Rules with no constant

Three rules have no numeric parameter and are fixed by the verified bytecode instead (Genome.sol:8-10): every protocol buy is anchored at the all-time-low block-start price, asks are anchored at the all-time-high block-start price, and ETH budgets come from net curve flow counted once against cumulative water marks. See Anchors and Net-flow budgets.

The gene ids GENESIS, METABOLISM, REGENERATION and IMMUNITY (Genome.sol:57-60) are labels used by the code and in events. They are not in the encoding; GENE_COUNT is.

#Token and pool

#VERSION

Identifies the encoding (Genome.sol:12). It is hashed but not otherwise read. Each change to the RC4 rules raised it; the history is on the Changelog.

#SUPPLY

The total GENE supply in 18-decimal units (Genome.sol:15). launch() places this amount single-sided in the genesis band (GeneHook.sol:423). GeneToken mints its own constant INITIAL_SUPPLY, which has the same value (GeneToken.sol:12).

#LP_FEE

The pool's LP fee in pips (hundredths of a basis point), static, written into the PoolKey (GeneHook.sol:239). beforeSwap rejects any other fee (GeneHook.sol:362). GeneHook also uses it for two calculations: the buy-side revenue evidence metric (GeneHook.sol:386) and the rate applied to newly funded net flow when budgets are created (GeneHook.sol:863). Sells count net GENE in net of this fee (GeneHook.sol:382).

#TICK_SPACING

The pool's tick spacing, in the PoolKey (GeneHook.sol:240) and checked in beforeSwap (GeneHook.sol:362). It also sets the largest usable tick, MAX_USABLE_TICK (GeneHook.sol:157).

#GENESIS_TICK_UPPER

The opening tick: launch() initializes the pool at it and seeds every BlockState tick with it, including atlTick (GeneHook.sol:257, GeneHook.sol:266). It is the upper edge of the genesis band (GeneHook.sol:422).

#GENESIS_TICK_LOWER

The lower edge of the genesis band (GeneHook.sol:421, GeneHook.sol:272), the highest GENE price the genesis liquidity covers. The source describes it as a design bound, not a claim (Genome.sol:19). Ask bands use it as their lower edge while there is room (GeneHook.sol:788-792).

#Epochs and references

#EPOCH_BLOCKS

Blocks per epoch. The epoch number is (block.number - launchBlock) / EPOCH_BLOCKS (GeneHook.sol:747; GeneLens.sol:104).

#MIN_BLOCK_VOLUME

ETH volume (wei) at which a touched block counts as active: it then adds one to activeBlocks and its clamped start-to-start move to pathTicks (GeneHook.sol:739-745).

#PATH_CLAMP

The most ticks one active block can add to pathTicks (GeneHook.sol:742).

#Mass placement

#GAP

Minimum distance, in ticks, between a band and its reference price. Bids, churn and IMMUNITY start one GAP beyond their anchor; asks end one GAP beyond theirs (GeneHook.sol:484, GeneHook.sol:499, GeneHook.sol:516, GeneHook.sol:545).

#GRID

Placement band edges snap to multiples of this tick count, which bounds the number of distinct positions (GeneHook.sol:484, GeneHook.sol:499, GeneHook.sol:516, GeneHook.sol:545, GeneHook.sol:782-792). Two edges do not: a wide ask band starts at GENESIS_TICK_LOWER (85,920, not a multiple of 600), and neither edge of the genesis band is a multiple (GeneHook.sol:790; Genome.sol:18-19).

#NEAR_WIDTH

Width, in ticks, of every ETH band (METABOLISM bids, churn tier, IMMUNITY) and of an ask band near the genesis lower edge; also the clamp distance from the usable tick limits (GeneHook.sol:500-501, GeneHook.sol:517-518, GeneHook.sol:783-791).

#Caps and timing

#BID_CAP_CALL

Most ETH (wei) each bid tier can place per metabolize() call, applied separately to METABOLISM bids and to the churn tier (GeneHook.sol:482, GeneHook.sol:538; Genome.sol:31-33).

#BID_CAP_EPOCH

Most ETH (wei) METABOLISM bids can place in one epoch (GeneHook.sol:481). The churn tier places only within this cap minus the bids and churn already placed (GeneHook.sol:535-536). Audit scope note: the bids check does not count churn; whether the two together can exceed this cap (see Security).

#IMMUNITY_CAP_CALL

Most ETH (wei) IMMUNITY can place per call (GeneHook.sol:495).

#IMMUNITY_CAP_EPOCH

Most ETH (wei) IMMUNITY can place per epoch (GeneHook.sol:494).

#ASK_CAP_CALL

Most GENE an ask placement can use per call (GeneHook.sol:542).

#ASK_CAP_EPOCH

Most GENE ask placements can use per epoch (GeneHook.sol:542).

#REGEN_CAP_CALL

Most ETH (wei) one REGENERATION buyback can spend (GeneHook.sol:563).

#REGEN_CAP_EPOCH

Most ETH (wei) REGENERATION can spend per epoch (GeneHook.sol:563).

#MIN_DEPLOY_ETH

Smallest ETH amount (wei) for an IMMUNITY, METABOLISM bid or churn placement, or for a REGENERATION buyback; smaller amounts are skipped (GeneHook.sol:483, GeneHook.sol:496, GeneHook.sol:515, GeneHook.sol:571).

#MIN_DEPLOY_GENE

Smallest GENE amount for an ask placement (GeneHook.sol:543).

#COOLDOWN_BLOCKS

Blocks between keeper calls. metabolize() starts it on every call that does not revert; regenerate() starts it only after a full-allotment buyback (GeneHook.sol:285-286, GeneHook.sol:300-307).

#HARVEST_PER_CALL

Registry positions poked round-robin per harvest, in addition to the genesis position (GeneHook.sol:678).

#REGEN_PREMIUM_TICKS

Ticks subtracted from atlTick to form REGENERATION's price limit, so the buyback pays at most about 1% over the all-time-low block-start price (GeneHook.sol:574; Genome.sol:46). Audit scope note: reachability of this window with supply-faithful balances (see Security).

#REGEN_SHARE_BPS

Basis points used three ways. Once REGENERATION is EXPRESSED, it is the share of harvested ETH fees credited to regenReserve instead of ethReserve (GeneHook.sol:709-712) and the reduction applied to ethBudget() (GeneHook.sol:816). It also caps each epoch's REGENERATION spend as a share of epoch e-1's bid budget (GeneHook.sol:567).

#GENE_COUNT

Number of genes. GeneHook's GeneStatus array uses a literal length, and the test suite asserts the two match (GeneHook.sol:192; GenomeHash.t.sol:23).

#AUTO_EVOLVE_MAX

Most pending closed epochs metabolize() processes before spending. ETH placements run only if that catches evolveCursor up to the current epoch (GeneHook.sol:289, GeneHook.sol:465).

#Genes

A gene counts a processed epoch only if its predecessor is EXPRESSED in an earlier epoch and the epoch is at least the gene's minimum (GeneHook.sol:896-899). Revenue below is the closed epoch's EpochRecord.revenue, the buy-side evidence metric, not the fees collected. See Genes.

#METABOLISM

#MET_MIN_EPOCH

First epoch METABOLISM can count (GeneHook.sol:884).

#MET_REVENUE

Revenue (wei) a closed epoch needs to count as METABOLISM pressure (GeneHook.sol:884).

#MET_OBSERVE

Consecutive pressure epochs needed to express METABOLISM; a miss resets the count (GeneHook.sol:884, GeneHook.sol:901-917).

#REGENERATION

#REG_MIN_EPOCH

First epoch REGENERATION can count (GeneHook.sol:889).

#REG_REVENUE

Revenue (wei) a closed epoch needs, together with REG_ACTIVE_BLOCKS, to count as REGENERATION pressure (GeneHook.sol:888).

#REG_ACTIVE_BLOCKS

Active blocks a closed epoch needs, together with REG_REVENUE (GeneHook.sol:888).

#REG_OBSERVE

Consecutive pressure epochs needed to express REGENERATION (GeneHook.sol:890).

#REG_ETH_COMMITTED

Cumulative ETH (wei) committed to bid Mass, read from the expressing epoch's record, required for REGENERATION to express (GeneHook.sol:891, GeneHook.sol:911).

#IMMUNITY expression

#IMM_MIN_EPOCH

First epoch IMMUNITY can count (GeneHook.sol:921).

#IMM_REVENUE

Revenue (wei) a closed epoch needs, together with IMM_PATH_TICKS, to count as stressed for expression (GeneHook.sol:881).

#IMM_PATH_TICKS

pathTicks a closed epoch needs for both expression stress and deployment stress (GeneHook.sol:881-882).

#IMM_WINDOW

Length, in processed epochs, of IMMUNITY's stress history (GeneHook.sol:922-924).

#IMM_REQUIRED

Stressed epochs within the window needed to express IMMUNITY (GeneHook.sol:933).

#IMMUNITY deployment

#IMM_DEPLOY_REVENUE

Revenue (wei) a processed epoch needs, together with IMM_PATH_TICKS, to set a bit in the deployment-stress register immuneStressBits (GeneHook.sol:882-883).

#IMM_CONFIRM

Number of most recent processed epochs that must all be deployment-stressed for immunityActive() to be true; the source notes it can be at most 8 (GeneHook.sol:803-804; Genome.sol:86).

Sources (28)
  • src/Genome.sol:4-10
  • src/Genome.sol:12-86
  • src/Genome.sol:88-115
  • src/GeneHook.sol:157
  • src/GeneHook.sol:192
  • src/GeneHook.sol:239-246
  • src/GeneHook.sol:257
  • src/GeneHook.sol:272
  • src/GeneHook.sol:285
  • src/GeneHook.sol:289
  • src/GeneHook.sol:300
  • src/GeneHook.sol:362
  • src/GeneHook.sol:382-386
  • src/GeneHook.sol:421-423
  • src/GeneHook.sol:479-552
  • src/GeneHook.sol:563-575
  • src/GeneHook.sol:574-577
  • src/GeneHook.sol:678
  • src/GeneHook.sol:707-718
  • src/GeneHook.sol:739-747
  • src/GeneHook.sol:782-792
  • src/GeneHook.sol:802-817
  • src/GeneHook.sol:863
  • src/GeneHook.sol:879-934
  • src/GeneLens.sol:104
  • src/GeneToken.sol:12
  • 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).