chain[CRYPT]
The Pact
v0.1 pre-mainnet draft. Numbers may shift before deploy; deployed bytecode is the truth.
I. Summary
chainCRYPT is a Diablo-style action RPG that lives entirely on Ethereum. Combat resolves on-chain via pure deterministic functions; items and heroes are ERC-721; the only off-chain code is a browser viewer that calls public RPC.
Hard constraints: no backend server, no signed admin payloads, no proxy upgrades, and no multisig with privileged powers. Ownership is renounced at deploy, and once mainnet is live the contracts are immutable.
II. $CRYPT Token
- Cap: 100,000,000
- Initial mint: 66,660,000 (50M deployer + 16.66M Treasury seed)
- Emission reserve: 33,340,000 - never minted unless drained via Run/Arena rewards
- ERC-20 + Permit with cap enforced in
_update - Pre-trade lock: deployer-only transfers until
enableTrading()is called once - Ownership renounced immediately after wiring
III. Heroes
Four classes, distinct base stats and per-level growth. Class is permanent. Skill bar (3 of 6 skills) is mutable. Three equipment slots: weapon, armor, jewel.
| Class | HP | ATK | MAG | SPD | Style |
|---|---|---|---|---|---|
| Warrior | 140 | 14 | 6 | 14 | tank |
| Rogue | 100 | 16 | 4 | 22 | burst |
| Mage | 90 | 6 | 18 | 16 | aoe |
| Hunter | 110 | 15 | 8 | 20 | range |
IV. Items & Affixes
3 slots × 8 bases = 24 base items. 4 rarities: Normal, Magic, Rare, Unique. 24 affixes split across flat-stat, percent-stat, and binary flag effects. Unique items have hand-tabulated names from a 192-entry table.
V. Combat
Combat is a pure function:
function resolveRun(hero, biome, mlvl, entropy) internal pure returns (RunResult); function resolveArena(a, d, entropy) internal pure returns (ArenaResult);
Damage formula: (max(0, ATK - DEF) + max(0, MAG - RES)) * variance(90..110%). Crit applies 175% multiplier. Damage capped at 80% of target maxHP per swing.
VI. Dungeons
commitRun(heroId, mlvl, biome)- pays entry fee, records commit block- Wait 50 blocks (no action needed)
claimRun(runId)- fetches blockhash, derives entropy, resolves combat, mints up to 3 items, awards XP/gold
The 50-block wait makes seed-grinding pointless - the player commits before knowing the outcome. The 200-block claim window prevents stuck Runs.
VII. Arena
One-shot deterministic PvP. Both heroes' stats are reconstructed from chain state at fight time. 32-round cap. Tie goes to defender. 50-block cooldown per hero across both attack and defend slots.
VIII. v4 Hook
The hook reads $CRYPT swap volume to set a "mood":
- CALM - default
- BOSS_EVENT - >1% supply traded in 256 blocks; +50% gold, +affix weight on Rare
- DROUGHT - <0.05% supply traded in 1024 blocks; -25% gold
- SURGE - net buys > 2× sells in 256 blocks; recycles 25% drought reserve to rewards
The hook deploys at an address mined for v4 permission bits (0x00C0 in low 14 bits).
IX. Economy
Sinks: Run entry fee (5 + mlvl × 0.25 CRYPT), Arena entry fee (10 CRYPT), affix reroll (mlvl × 2 CRYPT, burned).
Sources: Run rewards (50 + mlvl × 4, mood-adjusted), Arena rewards (50 attacker / 25 defender), boss bonus (1000 at mlvl 99).
X. Verification
After mainnet deploy, every contract is verified on Etherscan. Footer of every page lists addresses. Below: live wax-seal stamps.