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

Documentation · Learn

Anchors

The two price references GENE places liquidity against, how they move, and why every protocol buy is anchored at the all-time low.

GENE has no external oracle. It places liquidity against two references taken from its own pool, both sampled only at block starts (GeneHook.sol:97-105).

Remember the orientation: ticks measure GENE per ETH, so a higher tick is a cheaper GENE (GeneHook.sol:103-104).

#The all-time low (ATL)

atlTick is the lowest price at which a block started while the pool had active liquidity there. It starts at the opening price at launch (GeneHook.sol:266). On each block's first touch the hook reads the current tick and the pool's active liquidity, and moves the ATL only if the tick is cheaper than the stored ATL and the active liquidity is not zero (GeneHook.sol:771-774). It never moves back up in price.

Three properties follow:

  • No wicks. Prices inside a block are never sampled, so a dump and buy-back within one block cannot set it (GeneHook.sol:97-105).
  • No empty-tick prints. A price parked where the pool has no active liquidity is not a price at which anyone could obtain GENE, so it does not count (GeneHook.sol:771-773).
  • Not frozen. A genuine low reached through real liquidity and held across a block start sets a new ATL (GeneHook.sol:771-774).

#The all-time high (ATH)

athTick is the highest block-start price ever seen. It moves on every block start that is more expensive than the stored value (GeneHook.sol:770). It anchors asks.

#How placements use them

Per the rule stated in the source (GeneHook.sol:35-38), every protocol bid (METABOLISM, churn and IMMUNITY) is placed at or below the all-time low; REGENERATION's buyback is the exception, paying at most about 1% above it (GeneHook.sol:574-577):

  • METABOLISM bids and the churn tier are positioned from the ATL alone, one gap or more beyond it (parameters) (GeneHook.sol:484, :516).
  • IMMUNITY is positioned from the ATL, or from spot if spot is cheaper (GeneHook.sol:498-501).
  • REGENERATION buys only while the price is within a small premium, about 1%, of the ATL price (parameters) (GeneHook.sol:574-577).
  • Asks are positioned from the lower tick of spot and the ATH, which is the more expensive of the two prices, one gap or more above it (GeneHook.sol:544-546).

The ATL is never above the opening price (GenePermanence.t.sol:101), so every ETH band starts at tick 178,200 or higher, below the opening price, in every state the tests reach.

Audit scope note: band clamping near the end of the tick range, reachability of a wider bid-band branch, and metabolize() reverting InvariantBroken when spot sits at or beyond a band positioned from the ATL (GeneHook.sol:655-660) (see Security).

The MassAdded event carries the reference used, per kind as the code passes it: the ATL for kinds 1 and 4, the cheaper of spot and the ATL for kind 2, the more expensive of spot and the ATH for kind 3, and the opening tick for kind 0 (GeneHook.sol:433, :485, :501, :518, :546). The event's inline comment describes kinds 1 and 4 differently; rely on the code (GeneHook.sol:139-140).

#Why the all-time low

Anyone holding GENE bought below a protocol bid can sell into that bid at a profit. Placing every protocol bid at or below the lowest price that actually traded removes that path (GeneHook.sol:35-38).

The trade-off is distance. In a falling market the ATL sits below spot, and protocol bids sit with it. Because the ATL is a truthful observation, genuine trades move it down. A trader who sells through every protocol position and holds a block start there moves it, at real cost and with no profit in the tests; in a thin market that cost is small, and later protocol buying then sits further below spot. See limitations explained.

The ATL is a placement reference. Read both anchors with GeneLens.anchors (GeneLens.sol:149-156).

Sources (14)
  • src/GeneHook.sol:35-38
  • src/GeneHook.sol:97-105
  • src/GeneHook.sol:138-141
  • src/GeneHook.sol:266
  • src/GeneHook.sol:433
  • src/GeneHook.sol:484-485
  • src/GeneHook.sol:498-501
  • src/GeneHook.sol:516-518
  • src/GeneHook.sol:544-546
  • src/GeneHook.sol:574-577
  • src/GeneHook.sol:655-660
  • test/invariant/GenePermanence.t.sol:101
  • src/GeneHook.sol:728-780
  • src/GeneLens.sol:149-156

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