Demonstration build · all figures are sample data · no contract is deployed
Documentation

Docs

The same ten chapters, told two ways. Pick how deep you want to go. You can switch at any time.

Chapter 01

Core

  1. It is a token. Its trading fee can be adjusted by an AI.
  2. The AI can only move the fee inside fixed limits.
  3. Every change is public, tested, and undone if it fails.

evmgen ($eGEN) is a fixed-supply ERC-20 paired with ETH in a Uniswap v4 pool. A hook contract sets the swap fee per swap via the dynamic-fee flag. Parameters of the hook are written by a controller contract that accepts changes only from the AI signer and only inside the limits contract.

Standard
ERC-20, 18 decimals
Supply
1,000,000,000 (fixed)
Pool
Uniswap v4, ETH / $eGEN
Hook
beforeSwap dynamic fee override
Controller
Accepts signed parameter updates
Source
contracts/Hook.sol, Controller.sol
Chapter 02

Fees

  1. Each swap pays a fee. Now it is 2.20% plus 0.30%.
  2. The fee is split four ways: burn, liquidity, treasury, games.
  3. The fee can never go above 5%.

The total fee is feetotal = feehook + feeext with feehook ≤ 5.00% and feeext = 0.30% fixed. Fees accrue as ETH in the vault and are distributed by distribute() with shares (sburn, sliq, stre, sgame) summing to 10,000 bps.

ParameterLiveBounds
fee_hook220 bps0 – 500 bps
fee_ext30 bpsfixed
s_burn3500≥ 1000
s_liq3500≥ 1000
s_tre3000≤ 4000
s_game0≤ 2500
Chapter 03

Mutation lifecycle

  1. The AI proposes a change and explains why.
  2. It waits an hour, tests quietly, then tests on a few real swaps.
  3. If the numbers beat the baseline it stays. If not it is undone.

States: PROPOSED → PUBLIC → SHADOW → LIVE → KEPT | REVERTED. A proposal enters PUBLIC for 3,600 s. Shadow runs 6 h with fee_applied = baseline and fee_shadow = proposal logged. Live runs up to 16 h with exposure p ≤ 0.25 of swaps.

Gate: revenue
Δrevenue ≥ 0%
Gate: retention
retention ≥ baseline − 1.0 pp
Gate: failures
module failures = 0
Gate: gas
Δgas ≤ +12,000 per swap
Abort
Any gate false for 3 consecutive windows
Source
contracts/Mutation.sol
Chapter 04

Voting

  1. Every two days there is a vote with three options.
  2. Stakers choose. It needs 1% of supply staked to count.
  3. The winner is tested, not just applied.

Ballot bn is posted every 172,800 s with three candidates. Voting opens after the snapshot and lasts 86,400 s. Voting power is w = staked(addr, snapshot). A ballot is valid only if Σw ≥ 1% of supply. The winner enters the lifecycle at SHADOW but still passes through PUBLIC.

Quorum
1% of supply staked
Tie-break
Lowest fee change wins
Snapshot
Block at ballot post
Source
contracts/Ballot.sol
Chapter 05

Games

  1. Hold the token and you can win ETH in a weekly draw.
  2. Ten winners share the prize equally.
  3. Staking and streaks give you more tickets.

Jackpot tickets: T = min(balstart, balend) / 250,000 × m with m = min(4, mstake × (1 + 0.1·streak)). Draw: Chainlink VRF returns a word, winners are chosen by successive weighted draws without replacement, then prize = pool·cap / 10 each.

Window
7 days
Winners
10, distinct
Cap
5% of treasury ETH
Randomness
Chainlink VRF v2.5
Source
contracts/Jackpot.sol
Chapter 06

Security

  1. The AI cannot take your tokens.
  2. Big changes wait 48 hours and the Safe can cancel.
  3. The code was reviewed and the findings are public.

Threat model: compromised AI signer, malicious idea, hook griefing, oracle/VRF failure, front-running of fee changes. Mitigations: bounded parameters, timelocks, per-swap gas limits in the hook, exposure caps and a cancel-only Safe.

ThreatMitigation
AI signer compromisedParameter bounds and 1 h public delay
Hook revertsSwap falls back to baseline fee
VRF stalls24 h timeout, window cancelled
Fee front-runningFee changes only at block start
Full security page
Chapter 07

Governance

  1. There is a Safe wallet that can cancel scheduled changes.
  2. It cannot spend or edit anything.
  3. Stakers vote on fee options.

The Safe is a 3-of-5 multisig with exactly one power: cancel(opId) on queued operations. The timelock (48 h) applies to changes outside the AI’s bounded range, for example raising maxLiveGames.

Safe
0x0000…0000 demo
Threshold
3 of 5
Powers
cancel only
Timelock
48 h
Chapter 08

Rewards

  1. Good ideas get paid.
  2. So do fee changes that pass and builds that ship.
  3. Payment goes to the wallet that staked.

Reward events: IdeaAccepted, MutationKept, BuildShipped. Each pays a fixed number of tokens from the rewards allocation to the stakers of the originating proposal pro rata to their stake.

EventReward
Idea accepted50,000 eGEN
Mutation kept (author)25,000 eGEN
Build shipped200,000 eGEN
Chapter 09

Contracts

  1. A handful of contracts do all the work.
  2. Their addresses are listed on the Trade page.
  3. Right now they are placeholders.

Addresses below are the all-zero demo placeholder. No contracts are deployed.

ContractAddressUpgradable
Token0x0000…0000No
Hook0x0000…0000No
Controller0x0000…0000No
Jackpot0x0000…0000No
Chapter 10

Verification

  1. You can check what the AI did.
  2. Logs are linked in a hash chain.
  3. The Proof page lets you re-check the chain in your browser.

Each log record is hi = SHA-256(json(i, ts, kind, text, hi−1)). Any edit breaks every later hash. Signatures and enclave attestation are listed as unavailable in this demo.

Open Proof