Protocol Rules

TenCommandements.sol - on-chain specification

01

The Game

The protocol runs exactly 10 rounds. Each round is an open competition: any wallet can submit a prompt that shapes the smart contract. One prompt is selected at random per round — that author's suggestion becomes the next version of the contract.

MAX_ROUNDS 10
ROUND_DURATION 12 hours
PROMPT_PRICE 0.01 ETH
MAX_PROMPT_LENGTH 1 000 chars
02

Submitting a Prompt

Call submitPrompt(string promptText) with exactly 0.01 ETH attached. The prompt must be between 1 and 1 000 characters. Each submission is timestamped and stored on-chain in the current round's isolated array — prompts from previous rounds never carry over.

> Round must be active and not yet in VRF phase
> Block timestamp must be before round.endTime
> Exactly 0.01 ETH required — no more, no less
> Prompt text: 1–1 000 bytes, non-empty
Fee distribution
50% TokenWorks treasury
50% LP treasury
03

Winner Selection

When a round's timer expires, Chainlink Automation triggers endRound(). The contract requests a verifiable random number from Chainlink VRF V2. Once the coordinator responds, the winning index is computed as:

winnerIndex = randomWords[0] % prompts.length

The winning prompt's author is recorded on-chain as round.winnerAddress. Their prompt text is stored as round.winningPrompt and applied by the team to produce the next contract iteration. 1% of total token supply is minted to the winner.

CALLBACK_GAS_LIMIT 200 000
REQUEST_CONFIRMATIONS 3 blocks
NUM_WORDS 1

If a round ends with zero prompts, no VRF request is made. The round is marked completed and the next round starts immediately.

04

Round Lifecycle

ACTIVE Timer running. Prompts accepted. Chainlink Automation monitors checkUpkeep() every block.
VRF_PENDING endRound() called. VRF request submitted. No new prompts accepted.
COMPLETED VRF callback received. Winner recorded. Next round auto-starts (or game ends at round 10).
HUMAN REVIEW Winning prompt reviewed by the team. Contract updated and pushed to GitHub. Malicious prompts are manually reviewed by the team and removed before deployment.
05

What You Can Change

The winning prompt is reviewed and applied by the team to produce a new version of the contract. Only regions outside the locked core may be modified.

> IMMUTABLE (locked by design)
Token identity — TOKEN_NAME = "TenCommandements", TOKEN_SYMBOL = "CMD"
Initial supply — INITIAL_SUPPLY = 10_000_000_000 ether
Constructor mint — full fixed supply must mint to deployer
Core ERC20 surface — transfer, approve, transferFrom, totalSupply
> OPEN REGIONS (prompt-modifiable)
Custom state in COMMUNITY_STATE
Transfer policies, taxes, cooldowns, limits, whitelists, blacklists
Additional events and internal logic in COMMUNITY_LOGIC
Public/admin/helper functions in COMMUNITY_FUNCTIONS
06

Game End

After round 10 completes, gameCompleted is set to true on-chain and the GameCompleted event is emitted. No further rounds start. No new prompts can be submitted. The final contract version — shaped by all 10 winning prompts — is the permanent result.

event GameCompleted();