# CoinCoin (CCOIN)
## Official Whitepaper — Version 1.0
### *A Pure Proof-of-Work Store-of-Value on EVM Layer-2: "One Coin for Every Person on Earth"*

**Date:** October 2026  
**Author:** CoinCoin Foundation & Founder  
**Official Ticker:** `CCOIN`  
**Technical Standard:** ERC-20 + ERC-918 (Mineable Token Standard with On-Chain Pool Extension)  
**Production Network:** Base Mainnet (Chain ID: `8453`)  
**Official Contract Address:** `0xED05cF6faB5E728C8Ff191b8e03B7B135160C0e3`  
**License:** Open Source (MIT)

---

## Table of Contents
1. [Abstract](#1-abstract)
2. [Philosophical Vision & Symbolism](#2-philosophical-vision--symbolism)
3. [The Core Problems of Contemporary Web3](#3-the-core-problems-of-contemporary-web3)
4. [The CoinCoin Solution: Fair Layer-2 Pooled Mining](#4-the-coincoin-solution-fair-layer-2-pooled-mining)
5. [Technical Architecture & Mining Engine (ERC-918 Extended)](#5-technical-architecture--mining-engine-erc-918-extended)
6. [Tokenomics & Mathematical Emission Model](#6-tokenomics--mathematical-emission-model)
7. [Cryptographic Security & Front-Running Immunity](#7-cryptographic-security--front-running-immunity)
8. [Regulatory Compliance, Legal Standing & Safe Harbor (MiCA)](#8-regulatory-compliance-legal-standing--safe-harbor-mica)
9. [Development Roadmap](#9-development-roadmap)
10. [Protocol Technical Specifications](#10-protocol-technical-specifications)

---

## 1. Abstract

**CoinCoin (CCOIN)** is a decentralized store-of-value protocol deployed on an energy-efficient, ultra-low-fee EVM Layer-2 rollup. Unlike the vast majority of modern tokens distributed via speculative sales (ICO/IDO) or passive bot-exploited airdrops (*helicopter money*), CoinCoin implements an issuance mechanism **strictly powered by computational Proof-of-Work (PoW)** governed on-chain via the **ERC-918** standard.

Total supply is permanently capped at **9,999,999,999 CCOIN**, a symbolic figure anchored to the United Nations' projected 21st-century global human population peak: *"one ideal coin for every human being that may ever walk the Earth"*.

**3%** (300,000,000 CCOIN) is allocated to the founder for protocol development, ongoing infrastructure maintenance, and initial DEX liquidity. The remaining **97%** (9,699,999,999 CCOIN) can be generated solely through community computing power, with target blocks every **9 minutes**, a constant reward of **9,999 CCOIN per block**, and an innovative **On-Chain Mining Pool** (10% Finder Bonus = 999 CCOIN + 90% Shared Pool = 9,000 CCOIN distributed proportionally to active time and shares) across **970,097 blocks** (~16.6 years of continuous, predictable linear emission).

---

## 2. Philosophical Vision & Symbolism

Bitcoin's genesis in 2009 introduced absolute digital scarcity to mankind for the first time. Over the following decade, however, cryptocurrency deviated from its philosophical ethos, degenerating largely into a speculative casino dominated by venture capital pre-mines, insider allocations, and predatory dumpings.

CoinCoin is engineered with the opposite premise:
* **One Coin for Every Person:** The hard cap of `9,999,999,999` represents an incorruptible mathematical and ethical ceiling toward which the network converges over the decades.
* **The Symmetry of 9:**
  * Cap: $9,999,999,999$
  * Block Reward: $9,999\text{ CCOIN}$ ($999\text{ Finder Bonus} + 9,000\text{ On-Chain Pool}$)
  * Block Target: $9\text{ minutes}$
  * Founder Allocation: $3\%$ (the perfect divisor: $3 \times 3 = 9$)
  * Community Share: $97\%$
  * The number 9 embodies completion, fairness, and maturity: every 9 minutes releases 9,999 CCOIN, rewarding both the solver of the block (999 CCOIN) and all active miners contributing their computational time (9,000 CCOIN).
* **Value Born from Effort:** No asset holds enduring respect when gifted arbitrarily. Digital currency derives intrinsic credibility when each unit demands genuine computational time, electricity, and human attention.

---

## 3. The Core Problems of Contemporary Web3

The modern Web3 ecosystem is crippled by three structural pathologies:

1. **The Failure of Helicopter Money (Airdrops & Faucets):**  
   Passive token giveaways are instantly conquered by automated Sybil farms. The consequence is immediate post-launch dumping and zero authentic community loyalty.
2. **The Pitfall of ICOs & Private Token Presales:**  
   Capital raising via token sales introduces investment contracts, classifying tokens as securities under the US Howey Test and international regulatory frameworks (ESMA, SEC).
3. **The Industrial Centralization of Layer-1 Mining:**  
   Bitcoin mining today necessitates multi-million-dollar ASIC warehouses and specialized cooling facilities, totally disenfranchising everyday citizens and standard personal computers.

---

## 4. The CoinCoin Solution: Fair Layer-2 Pooled Mining

CoinCoin marries the pristine distribution ethics of Proof-of-Work with the modern scalability and micro-fees of Ethereum Layer-2s:

```mermaid
graph LR
    subgraph "Consensus & Base Security (Inherited)"
        ETH[Ethereum L1] --- L2[Base / Arbitrum L2]
    end

    subgraph "Shared Distribution (CoinCoin On-Chain Mining Pool)"
        L2 --> SC[Smart Contract CoinCoin]
        Miners[Active Miners Web/PC] -->|Submit Time/Work Shares| SC
        Finder[Block Solver Miner] -->|Solves Block Nonce| SC
        SC -->|999 CCOIN (10%) Finder Bonus| Finder
        SC -->|9,000 CCOIN (90%) On-Chain Pool| Miners
    end
```

* **Zero Node Overhead:** Block consensus is validated by Ethereum L1 and Layer-2 sequencer infrastructure.
* **Negligible Gas Fees (< $0.01):** Submitting shares and claiming rewards costs fractions of a cent on Layer-2.
* **Democratic CPU Mining:** The challenge is tailored for standard desktop, laptop, or mobile browser execution without specialized ASIC hardware.
* **Account Abstraction & Smart Wallets:** Users can secure and custody their CCOIN using FaceID or biometric smartphone passkeys (ERC-4337) without the friction of 12-word seed phrases.

---

## 5. Technical Architecture & Mining Engine (ERC-918 Extended)

The `CoinCoin.sol` Smart Contract implements the standard **ERC-20** and **ERC-20Permit** interfaces enriched with the **ERC-918 (Mineable Token Standard)** and a native on-chain pool.

### 5.1 The Cryptographic Challenge
The contract exposes a public 32-byte variable `challengeNumber`.  
To mine a block, a client searches for an unsigned 256-bit integer (`nonce`) satisfying:

$$\text{uint256}\Big(\text{keccak256}\big(\text{challengeNumber}, \text{msg.sender}, \text{nonce}\big)\Big) \le \text{miningTarget}$$

Where:
* `challengeNumber`: The current epoch seed, updated upon block completion via:  
  $\text{keccak256}(\text{digest}, \text{blockhash}(\text{block.number} - 1), \text{block.timestamp})$.
* `msg.sender`: The miner's address, enforcing strict immunity to front-running.
* `miningTarget`: The mathematical ceiling determining block difficulty.

### 5.2 Dynamic Retargeting Algorithm
Difficulty adjusts every **160 blocks** (~24 hours at 9 minutes per block):

$$\text{TARGET\_INTERVAL\_TIME} = 160 \times 540\text{ seconds} = 86,400\text{ seconds (1 day)}$$

Let $\Delta t$ be the actual elapsed time. A damping constraint restricts adjustment between $\frac{1}{4}\times$ and $4\times$:

$$\Delta t_{\text{effective}} = \min\Big(\max\Big(\Delta t, \frac{\text{TARGET\_INTERVAL\_TIME}}{4}\Big), \text{TARGET\_INTERVAL\_TIME} \times 4\Big)$$

$$\text{miningTarget}_{\text{new}} = \frac{\text{miningTarget}_{\text{old}} \times \Delta t_{\text{effective}}}{\text{TARGET\_INTERVAL\_TIME}}$$

### 5.3 On-Chain Mining Pool & Shared Rewards
To prevent "winner-takes-all" monopolies and reward everyone who invests uptime, CoinCoin embeds an incorruptible on-chain pool:
1. **Share Submission (`submitShare`):** The contract evaluates a lighter threshold: `shareTarget = miningTarget * 16`. Finding an hash below `shareTarget` logs an on-chain share proving time and effort in the current round (`epochCount`).
2. **Block Resolution (`mint`):** When a miner discovers an hash meeting the strict `miningTarget`, `mint(nonce)` executes:
   - Instantly grants **999 CCOIN (10%)** to the finder as discovery bonus.
   - Calculates the pool reward per share:
     $$\text{roundRewardPerShare} = \frac{9,000\text{ CCOIN}}{\text{roundTotalShares}}$$
     *(If no other miners submitted shares during the round, the entire 9,000 CCOIN pool goes to the Finder, totaling 9,999 CCOIN).*
   - Refreshes `challengeNumber` and increments `epochCount`.
3. **Pull-Based Asynchronous Claiming (`claimRoundReward` / `claimMultipleRounds`):**
   To avoid unbounded loops and gas exhaustion, rewards are claimed asynchronously by miners with single $O(1)$ low-cost transactions.

---

## 6. Tokenomics & Mathematical Emission Model

### 6.1 Core Parameters

| Parameter | Value | Details |
| :--- | :--- | :--- |
| **Absolute Hard Cap** | $9,999,999,999$ CCOIN | Bytecode-enforced immutable ceiling |
| **Founder Allocation (3%)** | $300,000,000$ CCOIN | Minted once at contract deployment |
| **Community Mining Pool (97%)** | $9,699,999,999$ CCOIN | Sealed in contract, releaseable only via PoW |
| **Target Block Interval** | $9\text{ minutes}$ | 160 blocks/day — 58,440 blocks/year |
| **Constant Block Reward** | $9,999\text{ CCOIN}$ | $999$ Finder Bonus (10%) + $9,000$ Shared Pool (90%) |
| **Total Blocks** | $970,097\text{ blocks}$ | Exactly $9,699,999,999 / 9,999$ |
| **Emission Horizon** | $\sim 16.6\text{ years}$ | Predictable, linear emission schedule |
| **Retargeting Cycle** | Every $160\text{ blocks}$ | Dynamic hashrate difficulty adaptation |

### 6.2 Sustainable Linear Emission
Unlike aggressive halving cycles that trigger miner revenue shocks, CoinCoin implements **predictable linear emission at 9,999 CCOIN per block**:

$$E(b) = b \times 9,999\text{ CCOIN} \quad \forall b \in [1, 970,097]$$

Total circulating supply at block $b$:

$$S(b) = 300,000,000 + (b \times 9,999)\text{ CCOIN}$$

At block $b = 970,097$:

$$S(970,097) = 300,000,000 + (970,097 \times 9,999) \approx \mathbf{9,999,999,999}\text{ CCOIN}$$

```mermaid
xychart-beta
    title "Total Supply Growth Over Time (Billions of CCOIN)"
    x-axis ["Launch", "Year 3.3", "Year 6.6", "Year 10", "Year 13.3", "Year 16.6 (Cap)"]
    y-axis "Billions of CCOIN" 0 --> 10
    line [0.30, 2.24, 4.18, 6.12, 8.06, 10.00]
```

---

## 7. Cryptographic Security & Front-Running Immunity

In public mempools, bots can inspect pending transactions and replicate winning nonces with higher priority gas.  
CoinCoin neutralizes front-running by binding the miner's address directly inside the hash preimage:

$$\text{digest} = \text{keccak256}\big(\text{challengeNumber}, \mathbf{msg.sender}, \text{nonce}\big)$$

Because `msg.sender` is immutable in the EVM execution frame, an attacker attempting to copy a solution automatically causes the digest check to evaluate against their own address, instantly invalidating the submission.

---

## 8. Regulatory Compliance, Legal Standing & Safe Harbor (MiCA)

CoinCoin is architected in accordance with leading international digital asset regulations, specifically the European Union's **MiCA (Markets in Crypto-Assets - Regulation EU 2023/1114)** and US securities jurisprudence:

1. **No Capital Raising / Zero Pre-Sale:** No funds, fiat currencies, or third-party digital assets were collected from the public or private investors.
2. **Absence of Profit Guarantees:** Official communications and contracts expressly disclaim any promises of dividend yields, appreciation, or token buybacks.
3. **Pure Proof-of-Work Utility:** Tokens enter circulation exclusively as consideration for verifiable computational work. Under MiCA, CCOIN qualifies as a generic decentralized crypto-asset, exempt from the onerous regimes governing Asset-Referenced Tokens (ARTs) or E-Money Tokens (EMTs).
4. **No Centralized Censorship / Admin Keys:** The contract possesses no blacklists, administrative pause capabilities, or post-deploy minting privileges.

---

## 9. Development Roadmap

```mermaid
flowchart TD
    F1["Phase 1: Genesis & Architecture (Completed)"] --> F2["Phase 2: Public Testnet & Web App (In Progress)"]
    F2 --> F3["Phase 3: Base Mainnet Launch & Community Mining"]
    F3 --> F4["Phase 4: Sovereign AppChain Expansion (Future)"]

    F1 -.->|Q3 2026| F1A["Smart contract, 100% test suite, Whitepaper v1.0"]
    F2 -.->|Q4 2026| F2A["Base Sepolia deployment, browser Web Miner, Basescan verification"]
    F3 -.->|Q1 2027| F3A["Genesis block activation, initial DEX pool, community governance"]
    F4 -.->|Long Horizon| F4A["If >100,000 miners: sovereign L3 rollup migration"]
```

---

## 10. Protocol Technical Specifications

| Item | Specification |
| :--- | :--- |
| **Token Name** | `CoinCoin` |
| **Ticker** | `CCOIN` |
| **Decimals** | 18 |
| **Base Standard** | OpenZeppelin ERC20, ERC20Permit (v5.0.2) |
| **Mining Interface** | ERC-918 Mineable Token Standard with On-Chain Pool Extension |
| **EVM Target** | Cancun (Solidity `0.8.24`, optimizer enabled 200 runs) |
| **Total Hard Cap** | $9,999,999,999 \times 10^{18}$ |
| **Founder Allocation (3%)** | $300,000,000 \times 10^{18}$ |
| **Community Mining Pool (97%)** | $9,699,999,999 \times 10^{18}$ |
| **Target Block Interval** | 540 seconds (9 minutes) |
| **Total Blocks** | 970,097 blocks (~16.6 years) |
| **Constant Block Reward** | $9,999 \times 10^{18}$ CCOIN |
| **Finder Bonus (10%)** | $999 \times 10^{18}$ CCOIN (awarded to block solver) |
| **Shared Pool (90%)** | $9,000 \times 10^{18}$ CCOIN (split proportionally by shares/time) |
| **Difficulty Retargeting** | Every 160 blocks (~24 hours) |
| **Hashing Algorithm** | `keccak256(challenge, minerAddress, nonce)` |
| **Pool Claiming Mechanism** | Asynchronous $O(1)$ pull payment (`claimRoundReward`) |
