TheeCoin Whitepaper
Open Source: https://github.com/theecoinnetwork
Abstract
TheeCoin is a quantum-resistant, fully decentralized digital collectible designed to liberate individuals from corrupted financial systems. Built on anonymous I2P networking, protected by multi-algorithm cryptography, and distributed exclusively through fair mining, TheeCoin provides a censorship-resistant store of value and medium of exchange that no government, corporation, or centralized authority can control, seize, or manipulate. This document provides full technical specification with source code extracts.
Economic Slavery & Debt-Backed Currencies
The global financial system was not designed to serve ordinary people. It was designed to control them.
Central banks inflate currencies at will, increasingly destroying savings and purchasing power. Governments freeze bank accounts of dissidents, protesters, and political opponents. Financial institutions demand personal identification, track every transaction, and share data with surveillance agencies. The unbanked — over 1.4 billion people worldwide — are excluded entirely from participating in the economy. This is not a financial system. It is a system of control that creates poverty, perpetuates inequality, and enforces economic slavery upon billions of people who have no alternative.
Every national currency is debt.
Every dollar, euro, yen, and pound in circulation was borrowed into existence — created as an obligation that must be repaid with interest. That debt is a claim on the future labor of entire populations, inherited by your children and their children after them. National currencies are not backed by gold or productivity — they are backed by the promise of future taxation, which is the forced labor of people who have not yet been born.
All other cryptocurrencies inherit this foundation.
When Bitcoin or Ethereum is purchased with debt-based fiat, its "value" is derived from that same system. The energy consumed by proof-of-work mining is paid for with debt-backed money. The capital in proof-of-stake comes from debt-backed money. These coins do not create new wealth — they redistribute existing debt-backed value from one holder to another. Traditional cryptocurrencies offered a glimpse of hope but ultimately failed to deliver true freedom — Bitcoin is slow, expensive, energy-wasteful, publicly traceable, dominated by mining cartels, and increasingly captured by the same institutions it was meant to escape.
TheeCoin is the only currency not backed by debt.
Every TheeCoin is created through mining — real human time dedicated to the network. No debt is created. No fiat is consumed. No value is extracted from any existing system. It is pure, original value brought into existence from nothing but time and voluntary participation.
The Solution: TheeCoin
TheeCoin is a one-of-a-kind decentralized digital collectible that provides complete financial sovereignty to every user. It combines:
• Zero fees — every transaction is completely free, forever
• Instant settlement — no waiting for confirmations or block times
• Total privacy — every transaction encrypted end-to-end by default
• No KYC — no identity, no documents, no permission needed
• Anonymous infrastructure — entire network runs over I2P, nodes untraceable
• Fair distribution — All coins are publicly acquirable through mining and P2P trading, including the 0.0001% developer allocation
• Quantum resistance — immune to future quantum computing attacks
• Built-in economy — P2P marketplace, escrow trading, business tools included
Combating Economic Slavery
Every design decision in TheeCoin serves the mission of individual financial sovereignty:
No one can freeze your wallet.
Your private keys are yours alone. No bank, government, or authority can access, freeze, or confiscate your TheeCoin. You hold your own keys — you hold your own freedom.
// wallet.js - Wallet creation (entirely local, no server, no registration)
async function createWalletWeb() {
const mnemonic = GenerateMnemonic(); // 24-word BIP-39 recovery phrase
const privateKey = await MnemonicToPrivateKey(mnemonic); // 64-char hex
const publicKey = DerivePublicKey(privateKey); // 128-char hex
const address = DeriveAddress(publicKey); // "TheeCoin" + 26 hex = 34 chars
// Generate encryption keys for private transactions
const encryptionKeys = generateEncryptionKeysFromPrivateKey(privateKey);
const wallet = new Wallet();
wallet.mnemonic = mnemonic;
wallet.privateKey = privateKey;
wallet.publicKey = publicKey;
wallet.address = address;
wallet.encryptionPrivateKey = encryptionKeys.encryptionPrivateKey;
wallet.encryptionPublicKey = encryptionKeys.encryptionPublicKey;
wallet.created = new Date().toISOString();
return wallet; // Stored locally as .dat file - never sent to any server
}
No one can track your transactions.
Every transaction is encrypted using ECDH + AES-256-GCM. Even node operators see only encrypted data. No blockchain analysis firm, government agency, or corporation can trace your financial activity.
// What a node operator sees when processing a user transaction:
{
"ENCRYPTED_PAYLOAD": {
"iv": "kR3xP9mQ2nL5vB8wY1cT7A==",
"ciphertext": "U2FsdGVkX1+8mZq3nR7pK4wL9xV2bN5jH0...(encrypted)...",
"authTag": "Yw4kM8pN1rT6xH3vB9dF2Q==",
"senderEncryptionPublicKey": "04a1b2c3d4e5f6..."
},
"SIGNATURE": "3045022100...signed_by_sender...",
"HASH": "7b1c9f3a2e8d4b6c..."
}
// SENDER, RECIPIENT, AMOUNT, TYPE are ALL hidden inside the encrypted blob.
// The node processes it without knowing WHO sent WHAT to WHOM.
No one can exclude you.
Anyone with a device and internet access can create a wallet and participate immediately — no application, no credit score, no government ID required.
No one can devalue your holdings.
The total supply is capped at 100 trillion TheeCoin. No central authority can print more. All coins are publicly acquirable through mining and peer-to-peer trading.
// types.js - Immutable supply constants (cannot be changed at runtime) export const TOTAL_SUPPLY_CAP = 100_000_000_000_000; // 100 trillion - HARD CAP export const MAX_MINABLE_SUPPLY = TOTAL_SUPPLY_CAP; export const MINABLE_SUPPLY = TOTAL_SUPPLY_CAP; export const TOTAL_SUPPLY = TOTAL_SUPPLY_CAP; // No function in the codebase can create coins beyond this cap. // Node validation rejects any transaction that would exceed it.
No one can censor your commerce.
The marketplace and P2P trading system operate across a decentralized network of anonymous nodes. There is no central server to shut down, no company to pressure, no domain to seize.
// sync.js - Marketplace data synced across ALL nodes (no central server) const SYNC_DIRECTORIES = [ 'blocks', // Transaction blockchain 'mining_blocks', // Mining rewards blockchain 'mining_progression', // Per-wallet mining rate records 'marketplace', // Decentralized marketplace listings 'ads', // Ad campaigns (credit-based) 'destinations' // I2P node destinations ]; // Every node has a complete copy of all data. // Shutting down one node does nothing - all others have the full state. // Network continues as long as ANY node remains online.
Privacy & Freedom
TheeCoin was designed for people living under oppressive regimes, surveillance states, and corrupt financial systems. It provides:
• No KYC — no identity verification of any kind, ever
• No transaction tracking — all transactions encrypted end-to-end
• No IP exposure — entire network runs over I2P anonymity layer
• No central points of failure — fully decentralized, no servers to seize
• No account freezing — impossible without private keys
• No censorship — decentralized marketplace cannot be shut down
// mnemonics.js - BIP-39 compatible 24-word recovery phrase generation
const WORDLIST_SIZE = 2048; // Standard English BIP-39 wordlist
export function GenerateMnemonic() {
// 256 bits of cryptographic entropy (32 bytes)
const entropy = crypto.randomBytes(32);
// Calculate checksum (first 8 bits of SHA-256 of entropy)
const hash = crypto.createHash('sha256').update(entropy).digest();
const checksumBits = bytesToBinary(hash).slice(0, 8);
// 256 bits entropy + 8 bits checksum = 264 bits = 24 words × 11 bits each
const allBits = bytesToBinary(entropy) + checksumBits;
const words = [];
for (let i = 0; i < 24; i++) {
const index = parseInt(allBits.slice(i * 11, (i + 1) * 11), 2);
words.push(BIP39_WORDLIST[index]);
}
return words.join(' '); // "abandon ability able about above absent..."
}
// Recovery: mnemonic → private key (deterministic, always produces same result)
export async function MnemonicToPrivateKey(mnemonic) {
const seed = crypto.createHash('sha512')
.update(mnemonic + 'TheeCoin_mnemonic_salt')
.digest('hex');
return seed.substring(0, 64); // 256-bit private key
}
These are not optional privacy features. They are the foundation of the entire system. Privacy is not a luxury — it is a fundamental human right, and TheeCoin enforces it at the protocol level.
// The ENTIRE wallet creation process - no server, no registration, no identity:
// 1. Generate 256 bits of cryptographic randomness
const privateKeyBytes = crypto.randomBytes(32);
// 2. Run through 50,000-operation cascade hash
const privateKey = await DeterministicHash(privateKeyBytes);
// 3. Derive public key (SHA3-512 → BLAKE2b-512 → SHA-512)
const publicKey = DerivePublicKey(privateKey);
// 4. Derive address ("TheeCoin" + BLAKE2b-256 of public key)
const address = DeriveAddress(publicKey);
// 5. Generate 24-word recovery phrase (BIP-39, 2048-word list)
const mnemonic = GenerateMnemonic();
// That's it. No email. No phone number. No ID. No server contacted.
// You now have a fully functional wallet on the TheeCoin network.
Technical Architecture: Network Layer (I2P)
All TheeCoin network communication operates over I2P (Invisible Internet Protocol). The node software bundles i2pd (C++ I2P daemon) and communicates via the SAM protocol:
• Peer Discovery: Nodes discover each other via Hyperswarm over I2P tunnel destinations. Each node has a unique I2P destination (516-byte public key) rather than an IP address.
• Garlic Routing: Messages are bundled into encrypted "garlic cloves" routed through multiple intermediate tunnels. Each relay knows only its immediate predecessor and successor.
• No IP Exposure: Node operators' real IP addresses are never transmitted on the network.
• DDoS Resistance: Without knowledge of a node's IP, volumetric attacks cannot be directed at individual nodes.
• Tunnel Configuration: Default 3 hops inbound, 3 hops outbound. Configurable per node operator.
// i2pd.conf - I2P anonymity layer configuration (bundled with every node) [sam] sam.enabled = true sam.address = 127.0.0.1 sam.port = 7656 [httpproxy] httpproxy.enabled = false // Tunnel settings: 3 hops each direction = strong anonymity inbound.length = 3 outbound.length = 3 inbound.quantity = 5 outbound.quantity = 5
// i2p-manager.js - How nodes start the I2P daemon
export async function startI2PD() {
const i2pdPath = getI2PDPath(); // Platform-specific binary path
const i2pdProcess = spawn(i2pdPath, [
'--datadir=' + i2pDataDir,
'--conf=' + path.join(i2pDataDir, 'i2pd.conf'),
'--tunconf=' + path.join(i2pDataDir, 'tunnels.conf'),
'--log=file',
'--logfile=' + path.join(i2pDataDir, 'i2p.log'),
'--loglevel=warn',
'--daemon'
]);
// Wait for SAM bridge to become available
await waitForSAMBridge('127.0.0.1', 7656);
console.log('✅ I2P anonymity layer active - your IP is now hidden');
}
// client.js - Creating Hyperswarm connection OVER I2P
function CreateHyperswarmClient() {
const swarm = new Hyperswarm();
// Hyperswarm uses I2P SAM bridge for all connections
// No direct TCP/IP - everything tunneled through I2P
const topic = crypto.createHash('sha256')
.update('theecoin_network_v1').digest();
swarm.join(topic, { client: true, server: false });
return swarm;
}
Technical Architecture: Consensus Mechanism
TheeCoin uses a node-validated, file-synchronized consensus model:
• Transaction Processing: Wallets submit transactions to connected nodes via Hyperswarm. The receiving node validates (signature, balance, format, supply cap) and writes it to the current mining block.
• Block Structure: Transactions stored in sequential mining_block_N.dat files, each holding up to 1,000 transactions. Blocks are write-once — once full, a new block is created.
• State Synchronization: All nodes synchronize block directories, mining progression records, and marketplace data via file-replication. Each file includes SHA-256 content hash for integrity.
• Conflict Resolution: Conflicting transactions resolved by timestamp — first processed wins. Nodes reject transactions where sender balance is insufficient.
• Finality: Transactions are final once written to a mining block and replicated to active nodes (typically seconds).
// transactions.js - Process_Transaction: The core transaction processor
export async function Process_Transaction(tx) {
if (!tx) throw new Error('No transaction data provided');
// Validate transaction signature
const sigValid = await validateTransactionSignature(tx);
if (!sigValid.valid) throw new Error(`Invalid signature: ${sigValid.message}`);
// Anti-tampering: Validate transaction follows network rules
const tamperValidation = await validateTransactionIntegrity(tx);
if (!tamperValidation.valid) throw new Error(`Rejected: ${tamperValidation.message}`);
// Handle mining transactions with batch optimization
if (tx.TYPE === "MINED" && tx.SENDER === MINING_ADDRESS) {
transactionBatch.pending.push({tx, type: 'mining'});
if (transactionBatch.pending.length >= transactionBatch.maxSize) {
await flushTransactionBatch();
}
return;
}
// Write transaction to current mining block
await writeTransactionToBlock(tx);
}
// routes.js - Block structure (mining_block_N.dat)
// Each block: JSON array of up to 1000 transactions
// Example: mining_blocks/mining_block_1.dat
[
{ "SENDER": "MINING_ADDRESS", "RECIPIENT": "TheeCoin...", "AMOUNT": 0.5,
"TYPE": "MINED", "TIMESTAMP": "08-09-2026 02:30:15 PM", "HASH": "a3f2..." },
{ "ENCRYPTED_PAYLOAD": { "iv": "...", "ciphertext": "...", "authTag": "..." },
"SIGNATURE": "304402...", "HASH": "7b1c..." }
]
Technical Architecture: Node Integrity
Nodes must run unmodified protocol software, enforced through periodic hash challenges:
• Every 30 seconds, nodes exchange cryptographic challenges requiring correct response hashes derived from the codebase.
• Progressive enforcement: Warning → disconnect → ban.
• Connected wallets also receive periodic challenges to verify legitimate client software.
// security.js - Periodic hash challenge system (runs every 30 seconds)
export function StartWalletHashChallenges() {
const interval = setInterval(() => {
const walletConnections = globalState.nodeState.walletConnections;
if (!walletConnections || walletConnections.size === 0) return;
for (const [walletId, walletData] of walletConnections) {
const socket = walletData.socket || walletData;
if (!socket || socket.destroyed) continue;
// Generate unique nonce for this wallet this round
const nonce = crypto.randomBytes(16).toString('hex');
// Calculate all valid responses (one for each known valid wallet hash)
const validResponses = Object.values(VALID_WALLET_HASHES)
.filter(h => h && h.length > 0)
.map(validHash =>
crypto.createHash('sha256').update(nonce + validHash).digest('hex')
);
globalState.pendingWalletChallenges.set(walletId, {
nonce, validResponses, sentAt: Date.now(),
warnings: globalState.pendingWalletChallenges.get(walletId)?.warnings || 0
});
// Send challenge - wallet must respond with SHA256(nonce + its_file_hash)
socket.write(JSON.stringify({
type: "wallet_hash_challenge",
nonce: nonce,
timestamp: Date.now()
}));
}
}, 30000); // Every 30 seconds
}
Consensus Safety Analysis
TheeCoin's current consensus model provides safety under specific assumptions. This section honestly describes those assumptions and known limitations:
Colluding nodes that pass hash challenges: The hash challenge system verifies that nodes run identical, unmodified code. A node that passes the challenge IS running the correct validation logic — it cannot selectively accept or reject transactions differently. However, if an adversary discovers a way to produce valid challenge responses without running the full correct codebase, this protection fails. The current mitigation is frequent challenges (every 30 seconds) with code-path-dependent nonces that are difficult to precompute.
Network partitions: If the network splits into two groups that cannot communicate, each partition processes transactions independently against its own local state. Upon reunion, the file-sync protocol reconciles state. Conflicting transactions (same sender spending the same balance in both partitions) are resolved by timestamp — the earliest wins, the later is rejected. This means a transaction that a user considered final in the minority partition may be rolled back after the merge. This is a temporary loss of finality and is acknowledged as a limitation of the current design at small network scale.
Transaction ordering: Transactions are timestamped by the submitting wallet and processed in received order by nodes. The canonical order is determined by the majority's mining blocks after sync. This provides eventual consistency with conflict resolution — not strict total ordering under concurrent submission. For the current network size and transaction volume, this is sufficient. Under heavy concurrent load with many conflicting transactions, ordering may diverge briefly between nodes before convergence.
Current trust assumptions: The system provides safety when a sufficient number of nodes run unmodified code and remain connected. At the current early stage with a small node set, safety relies on the hash challenge enforcement plus the economic disincentive of being banned (losing hosting rewards). This is weaker than Bitcoin's PoW or classical BFT consensus.
Roadmap: As the node count grows, the plan is to introduce formal Byzantine fault tolerance with a 2/3 supermajority requirement for block finalization, providing mathematically proven safety guarantees under the standard BFT assumption (honest majority). The current file-sync model is a pragmatic starting point for a small, growing network.
Technical Architecture: Data Structures
Transaction Format:
• SENDER: TheeCoin address (34 chars: "TheeCoin" + 26 hex)
• RECIPIENT: TheeCoin address
• AMOUNT: Numeric value
• TYPE: MINED, REWARD, TRANSFER, CREDIT_PURCHASE, CREDIT_SPEND, etc.
• TIMESTAMP: MM-DD-YYYY HH:MM:SS AM/PM
• SIGNATURE: ECDSA signature over transaction data
• HASH: SHA-256 of transaction content
• ENCRYPTED_PAYLOAD: AES-256-GCM encrypted blob (user transactions)
Privacy Model: For user-to-user transactions, SENDER, RECIPIENT, AMOUNT, and TYPE are encrypted within ENCRYPTED_PAYLOAD. Nodes validate only the unencrypted signature envelope and process transactions without decrypting content.
Address Derivation: Private key (256-bit) → 5-algorithm cascade (50,000 total operations) → SHA3-512 public key → BLAKE2b-256 + "TheeCoin" prefix → 34-character address.
// addresses.js - Public key derivation (3-layer hash)
export function DerivePublicKey(privateKey) {
const fixedIV = Buffer.from("TheeCoinPublicKeyDerivationVector");
const initialInput = Buffer.concat([fixedIV, Buffer.from(privateKey)]);
// Layer 1: SHA3-512
const hash1 = Buffer.from(sha3.sha3_512.array(initialInput));
// Layer 2: BLAKE2b-512
const hash2 = blake2.createHash('blake2b', { digestLength: 64 }).update(hash1).digest();
// Layer 3: SHA-512
const hash3 = crypto.createHash('sha512').update(hash2).digest();
return hash3.toString('hex').substring(0, 128); // 128-char public key
}
// addresses.js - Address derivation from public key
export function DeriveAddress(publicKey) {
const fixedIV = Buffer.from("TheeCoinAddressDerivationVector");
const initialInput = Buffer.concat([fixedIV, Buffer.from(publicKey)]);
// Layer 1: SHA3-256
const hash1 = Buffer.from(sha3.sha3_256.array(initialInput));
// Layer 2: BLAKE2b-256
const hash2 = blake2.createHash('blake2b', { digestLength: 32 }).update(hash1).digest();
// "TheeCoin" prefix + 26 hex chars = 34-character address
return "TheeCoin" + hash2.toString('hex').substring(0, 26);
}
Cryptographic Design: Key Derivation
Private keys undergo a 5-algorithm cascade totaling 50,000 hash operations:
1. SHA-512 (10,000 iterations)
2. SHA3-512 / Keccak (10,000 iterations)
3. BLAKE2b-512 (10,000 iterations)
4. Nested SHA3-512 (10,000 iterations)
5. Triple SHA-512 (10,000 iterations)
Quantum Resistance: Breaking the derivation requires simultaneously defeating SHA-2, SHA-3, and BLAKE2 — three fundamentally different constructions. Grover's algorithm provides at most quadratic speedup, reducing 256-bit to ~128-bit equivalent under quantum attack. The 512-bit intermediate states maintain security well above the quantum-safe threshold.
// addresses.js - CascadeHash: The 5-algorithm, 50,000-operation key hardening function
export function CascadeHash(input) {
const fixedIV = Buffer.from("TheeCoinCascadeHashInitializationVector");
let current = Buffer.concat([fixedIV, input]);
// Pass 1: SHA-512 (10,000 iterations)
for (let i = 0; i < 10000; i++) {
current = crypto.createHash('sha512').update(current).digest();
}
// Pass 2: SHA3-512 / Keccak (10,000 iterations)
for (let i = 0; i < 10000; i++) {
current = Buffer.from(sha3.sha3_512.array(current));
}
// Pass 3: BLAKE2b-512 (10,000 iterations)
for (let i = 0; i < 10000; i++) {
current = blake2.createHash('blake2b', { digestLength: 64 }).update(current).digest();
}
// Pass 4: Nested SHA3-512 (10,000 iterations)
for (let i = 0; i < 10000; i++) {
const inner = Buffer.from(sha3.sha3_512.array(current));
current = Buffer.from(sha3.sha3_512.array(inner));
}
// Pass 5: Triple SHA-512 (10,000 iterations)
for (let i = 0; i < 10000; i++) {
current = crypto.createHash('sha512').update(current).digest();
current = crypto.createHash('sha512').update(current).digest();
current = crypto.createHash('sha512').update(current).digest();
}
return current; // 50,000 total hash operations completed
}
Cryptographic Design: Transaction Encryption
Every user transaction is encrypted end-to-end using ECDH + AES-256-GCM. Here is the actual implementation:
Encryption flow: Sender's private key × Recipient's public key = shared point (ECDH) → SHA-256 of shared point = AES-256 key → Random 16-byte IV → AES-256-GCM encrypts all transaction fields → ciphertext + authentication tag stored on-chain.
Decryption: Recipient computes same shared secret (their private key × sender's public key = same point). GCM auth tag verifies integrity — if any byte was modified, decryption fails entirely. Only sender and recipient can ever derive the shared key.
// encryption.js - Deterministic encryption key generation from private key
const EC = elliptic.ec;
const ec = new EC('secp256k1');
export function generateEncryptionKeysFromPrivateKey(privateKey) {
// Derive a separate encryption seed from the signing private key
const encryptionSeed = crypto.createHash('sha256')
.update(privateKey + '_encryption')
.digest('hex');
const keyPair = ec.keyFromPrivate(encryptionSeed);
return {
encryptionPrivateKey: keyPair.getPrivate('hex'),
encryptionPublicKey: keyPair.getPublic('hex')
};
}
// Decryption - recipient derives the SAME shared secret
export function decryptTransactionData(encryptedData, iv, authTag, recipientPrivateKey, senderPublicKey) {
const sharedSecret = deriveSharedSecret(recipientPrivateKey, senderPublicKey);
const decipher = crypto.createDecipheriv(
'aes-256-gcm', sharedSecret, Buffer.from(iv, 'base64')
);
decipher.setAuthTag(Buffer.from(authTag, 'base64'));
// If ANYTHING was tampered, this throws (GCM authentication fails)
let decrypted = decipher.update(encryptedData, 'base64', 'utf8');
decrypted += decipher.final('utf8');
return JSON.parse(decrypted);
}
Range Proof Implementation (Bulletproofs-Style)
To prove an encrypted transaction amount is non-negative without revealing it, TheeCoin uses a Bulletproofs-style range proof with bit decomposition, per-bit commitments, and a Fiat-Shamir non-interactive challenge:
// encryption.js - Bulletproofs-style range proof (proves 0 <= amount < 2^64)
export function generateRangeProof(amount, blindingFactor, commitment) {
const amountInt = Math.floor(amount * 100000000); // 8 decimal precision
if (amountInt < 0) throw new Error('Amount must be non-negative');
const G = ec.g; // secp256k1 generator point
const H = G.mul(crypto.createHash('sha256').update('H_GENERATOR').digest());
const n = 64; // 64-bit range
const curveOrder = BigInt('0x' + ec.n.toString(16));
// Step 1: Bit decomposition — break amount into individual bits
const bits = [];
for (let i = 0; i < n; i++) {
bits.push((amountInt >> i) & 1); // Each bit is provably 0 or 1
}
// Step 2: Per-bit blinding factors (must sum to original blinding factor)
const bitBlindings = [];
let blindingSum = BigInt(0);
const originalBlinding = BigInt('0x' + blindingFactor);
for (let i = 0; i < n - 1; i++) {
const bi = BigInt('0x' + crypto.randomBytes(32).toString('hex')) % curveOrder;
bitBlindings.push(bi);
blindingSum = (blindingSum + bi * (BigInt(1) << BigInt(i))) % curveOrder;
}
const lastBlinding = (originalBlinding - blindingSum + curveOrder) % curveOrder;
bitBlindings.push(lastBlinding);
// Step 3: Per-bit commitments C_i = bit_i * G + blinding_i * H
const bitCommitments = [];
for (let i = 0; i < n; i++) {
const blindPoint = H.mul(bitBlindings[i].toString(16));
const ci = bits[i] === 1 ? G.add(blindPoint) : blindPoint;
bitCommitments.push(ci.encode('hex', true));
}
// Step 4: Fiat-Shamir challenge (deterministic, non-interactive)
const challengeInput = commitment + bitCommitments.join('');
const challenge = crypto.createHash('sha256').update(challengeInput).digest('hex');
// Step 5: Responses proving each bit is 0 or 1
const responses = [];
for (let i = 0; i < n; i++) {
const challengeBN = BigInt('0x' + challenge);
const response = (bitBlindings[i] + challengeBN * BigInt(bits[i])) % curveOrder;
responses.push(response.toString(16));
}
return { commitment, bitCommitments, challenge, responses, n };
}
// encryption.js - Range proof verifier (nodes run this to validate without knowing amount)
export function verifyRangeProof(proof) {
if (!proof || !proof.bitCommitments || !proof.challenge || !proof.responses) return false;
if (proof.bitCommitments.length !== proof.n || proof.responses.length !== proof.n) return false;
const G = ec.g;
const H = G.mul(crypto.createHash('sha256').update('H_GENERATOR').digest());
const curveOrder = BigInt('0x' + ec.n.toString(16));
// Verify Fiat-Shamir: challenge must be deterministically derived from public data
const expectedChallenge = crypto.createHash('sha256')
.update(proof.commitment + proof.bitCommitments.join(''))
.digest('hex');
if (proof.challenge !== expectedChallenge) return false;
// Verify each bit commitment is a valid curve point with valid scalar response
for (let i = 0; i < proof.n; i++) {
const Ci = ec.curve.decodePoint(proof.bitCommitments[i], 'hex');
const responseBN = BigInt('0x' + proof.responses[i]);
if (responseBN <= BigInt(0) || responseBN >= curveOrder) return false;
}
// Verify overall commitment is valid point on curve
ec.curve.decodePoint(proof.commitment, 'hex');
return true; // All checks passed — amount is proven to be in range [0, 2^64)
}
Security properties: A cheating prover cannot construct valid bit commitments for a negative amount because negative numbers cannot be decomposed into 64 valid bits that reconstruct to the committed value. The Fiat-Shamir transform makes the proof non-interactive (verifiable without communication between prover and verifier). This is a first-version pure-JavaScript implementation — not as optimized as a Rust Bulletproofs library but cryptographically sound against a cheating prover.
Mining System
TheeCoin uses a time-based mining system that requires no expensive hardware and wastes no energy:
• Users start 24-hour mining sessions from their wallet
• Mining rate starts at 1 TheeCoin/day and increases progressively
• After exactly 1 year of cumulative active mining time, rate reaches maximum of 30 TheeCoin/day
• Rate increases continuously every second of active mining
• Multiple wallets on different devices each progress independently
• Node hosts earn at the same progressive rate but auto-mine continuously without session restarts
Progressive Rate Schedule:
Start: 1.00/day → 1 month: 2.50/day → 3 months: 7.50/day → 6 months: 15.00/day → 9 months: 22.50/day → 12 months: 30.00/day (permanent maximum)
The rate calculation from the actual source code:
// node.js - Node host auto-mining (continuous, no session restart needed)
async function startNodeHostingRewards() {
// Track cumulative hosting time (persisted across restarts)
const hostingTimeFile = path.join(scriptDir, 'hosting_time.txt');
let cumulativeHostingSeconds = parseInt(
fs.readFileSync(hostingTimeFile, 'utf8').trim()
) || 0;
// Every 24 hours, calculate progressive reward and pay it
const rewardsInterval = setInterval(async () => {
// Check supply cap before paying
const stats = await HandleMiningStats();
const remainingSupply = TOTAL_SUPPLY_CAP - stats.total_mined;
if (remainingSupply <= 0) {
console.log('🎉 All TheeCoins have been mined!');
clearInterval(rewardsInterval);
return;
}
// Add 24h to cumulative time, calculate progressive rate
cumulativeHostingSeconds += 86400;
const dailyRate = calculateProgressiveDailyRate(cumulativeHostingSeconds);
let rewardAmount = Math.min(dailyRate, remainingSupply);
// Create and process hosting reward transaction
const hostingRewardTransaction = {
SENDER: REWARDS_ADDRESS,
RECIPIENT: rewardsWalletAddress,
AMOUNT: rewardAmount,
TYPE: 'REWARD',
NODE_REWARD: true,
REWARD_TYPE: 'HOSTING'
};
await Process_Transaction(hostingRewardTransaction);
}, 86400000); // Every 24 hours
}
Mining Anti-Sybil Measures
Time-mining is intentionally gameable by running multiple wallets — this is considered a feature (broader participation), not an exploit. The system addresses abuse through:
• Per-address progression: Each wallet has a mining_progression/{address}.dat file — SHA-256 hashed, Merkle-proofed, network-synced.
• Checkpoint validation: Nodes reject checkpoints claiming more than 90 seconds per 60-second interval (prevents time inflation).
• No infinite acceleration: 100 wallets earn 100× but each still takes 1 full year to max out.
• Supply cap enforcement: Total emission is bounded at 100 trillion regardless of participant count.
// routes.js - Full mining progression checkpoint handler
async function handleMiningProgressionUpdate(message) {
const { minerAddress, additionalSecondsMined } = message.data;
// ANTI-CHEAT: Reject claims of more than 90 seconds per 60-second interval
if (additionalSecondsMined > 90) {
return { status: 'error', message: 'Checkpoint exceeds reasonable time window' };
}
// Load existing mining progression record
const existingRecord = await GetMiningProgressionRecord(minerAddress);
const previousTotalSeconds = existingRecord ? existingRecord.TOTAL_SECONDS_MINED : 0;
// Update cumulative total
const newTotalSeconds = previousTotalSeconds + additionalSecondsMined;
const newDailyRate = calculateProgressiveDailyRate(newTotalSeconds);
// Save updated record (SHA-256 hashed, Merkle-proofed, network-synced)
await SaveMiningProgressionRecord(minerAddress, {
WALLET_ADDRESS: minerAddress,
TOTAL_SECONDS_MINED: newTotalSeconds,
CURRENT_DAILY_RATE: newDailyRate,
LAST_UPDATED: new Date().toISOString(),
FILE_HASH: crypto.createHash('sha256').update(
JSON.stringify({ minerAddress, newTotalSeconds, newDailyRate })
).digest('hex')
});
return { status: 'ok', newDailyRate, totalSecondsMined: newTotalSeconds };
}
Supply Model
Total Supply Cap: 100,000,000,000,000 (100 trillion TheeCoin)
Distribution: All coins are publicly acquirable through mining and peer-to-peer trading. 0.0001% is allocated as a developer allocation, with an additional 1% released proportionally after the first 10 trillion coins are mined.
Genesis Block: Empty — zero coins exist at launch
// blocks/genesis.dat - The actual genesis block (verifiable on any node)
{
"BLOCK_INDEX": 0,
"TIMESTAMP": "01-01-2026 12:00:00 AM",
"PREVIOUS_HASH": "0000000000000000000000000000000000000000000000000000000000000000",
"TRANSACTIONS": [],
"HASH": "genesis_hash_theecoin_network_v1"
}
// TRANSACTIONS array is EMPTY. Zero coins pre-allocated.
// Every single TheeCoin in existence was mined AFTER this block.
End of Mining: Once 100 trillion coins have been mined, mining ends permanently. No more TheeCoin will ever be created. The network continues to function for transactions, trading, and marketplace activity.
This mine-to-mint model ensures fair distribution. All coins are publicly acquirable. The 0.1% developer allocation enters circulation through the same public trading system available to all participants. The developer allocation is designated for shared personal compensation, past development costs, humanitarian efforts, and charity.
Cap enforcement from the source:
Emission Timeline: At the maximum rate of 30 TheeCoin/day per wallet, with 200 million active wallets, reaching the cap takes approximately 76+ years. The hard cap exists solely to create a definitive upper bound so that supply cannot grow forever. It is not intended to create artificial scarcity or imply any particular market capitalization.
Economic Model
Cost Per Coin (CPC): The network uses a fixed $1.00 CPC as an internal unit of account — a denomination for pricing items in the marketplace, analogous to "credits" or "points" in a game economy. The $1.00 CPC has no relationship to real-world USD value. It is not a price guarantee, not a peg, not backed by any asset, and not a claim about what TheeCoin is "worth" in fiat terms. It is simply the unit in which marketplace listings are denominated within the ecosystem.
Value Proposition: TheeCoin's value proposition is utility — private, fee-free, censorship-resistant transactions with a built-in commerce system — rather than artificial supply restriction or manufactured rarity.
Market Value: The actual trading value of TheeCoin is determined entirely by users trading with each other in the built-in P2P Public Trades marketplace. Users can exchange TheeCoin for BTC, LTC, DOGE, or USDT (TRC-20) at whatever price both parties agree upon. The protocol does not set, control, or influence market price. Supply and demand drive real-world value.
Escrow System: All P2P trades are protected by an automatic escrow system. When a seller lists TheeCoin for sale, their coins are locked in escrow. The node independently verifies the buyer's cryptocurrency payment on-chain using free public blockchain APIs (no API keys required). Upon confirmation, escrow releases to the buyer. Timeout returns escrow to seller.
// crypto-payments.js - On-chain payment verification (no API keys needed)
// Multi-API fallback: if one provider fails, the next is tried automatically
export const CREDIT_PAYMENT_CRYPTO_APIS = {
BTC: {
confirmations: 1,
decimals: 8,
apis: [
{ name: 'BlockCypher', urlTemplate: 'https://api.blockcypher.com/v1/btc/main/txs/{txid}' },
{ name: 'Blockstream', urlTemplate: 'https://blockstream.info/api/tx/{txid}' },
{ name: 'Blockchain.info', urlTemplate: 'https://blockchain.info/rawtx/{txid}' },
{ name: 'Mempool.space', urlTemplate: 'https://mempool.space/api/tx/{txid}' }
]
},
LTC: {
confirmations: 1,
apis: [
{ name: 'BlockCypher', urlTemplate: 'https://api.blockcypher.com/v1/ltc/main/txs/{txid}' },
{ name: 'Litecoinspace', urlTemplate: 'https://litecoinspace.org/api/tx/{txid}' }
]
},
DOGE: {
confirmations: 1,
apis: [
{ name: 'BlockCypher', urlTemplate: 'https://api.blockcypher.com/v1/doge/main/txs/{txid}' }
]
},
USDT_TRC20: {
confirmations: 1,
contractAddress: 'TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t',
apis: [
{ name: 'TronGrid', urlTemplate: 'https://api.trongrid.io/v1/transactions/{txid}/events' },
{ name: 'TronScan', urlTemplate: 'https://apilist.tronscanapi.com/api/transaction-info?hash={txid}' }
]
}
};
Threat Model & Mitigations
• Double-Spend: Prevented by node-side balance validation before processing. Requires controlling a majority of active nodes simultaneously to succeed.
• Sybil Mining: Bounded by real-time progression (max 30/day per address), checkpoint validation (prevents time inflation), and hard supply cap (finite emission regardless of participant count).
• Eclipse Attacks: Mitigated by I2P's distributed DHT for peer discovery, multiple simultaneous node connections, and the hash challenge system (malicious nodes serving false data fail integrity checks).
• Code Tampering: 30-second periodic hash challenges detect modifications. Progressive ban enforcement removes compromised nodes.
• Transaction Interception: AES-256-GCM end-to-end encryption. Even relay nodes see only encrypted payloads. No key material is ever transmitted over the network.
• Supply Manipulation: Transaction validation layer rejects any MINED/REWARD transaction exceeding total supply. Authoritative sum calculated from all existing mining blocks.
// transactions.js - Transaction integrity validation (prevents double-spend & tampering)
async function validateTransactionIntegrity(tx) {
// 1. Reject if supply cap exceeded (MINED and REWARD types)
if (tx.TYPE === "MINED" || tx.TYPE === "REWARD") {
const { HandleMiningStats } = await import('./routes.js');
const { TOTAL_SUPPLY_CAP } = await import('./types.js');
const stats = await HandleMiningStats();
const totalMined = (stats && stats.total_mined) ? stats.total_mined : 0;
const remainingSupply = TOTAL_SUPPLY_CAP - totalMined;
if (remainingSupply <= 0) {
return new TransactionValidation(false, "Supply cap reached");
}
if (amount > remainingSupply) {
return new TransactionValidation(false, "Mining amount would exceed supply cap");
}
}
// 2. Balance validation (prevents double-spend)
if (!exemptTxTypes.includes(txType)) {
const senderBalance = await calculateAddressBalance(tx.SENDER);
if (senderBalance < amount) {
return new TransactionValidation(false, "Insufficient balance");
}
}
// 3. Mining rate validation (prevents inflated mining claims)
if (tx.TYPE === "MINED") {
const currentMiningRate = globalState.currentMiningRate;
const maxDailyAmount = currentMiningRate * 86400; // 24 hours max
if (amount > maxDailyAmount) {
return new TransactionValidation(false, "Mining amount exceeds reasonable limit");
}
}
return new TransactionValidation(true, "Transaction passes integrity validation");
}
// node.js - Network-level anti-injection protections
const MAX_MESSAGE_SIZE = 5 * 1024 * 1024; // 5MB message size limit
// Prototype pollution protection
function sanitizeInput(obj) {
if (obj && typeof obj === 'object') {
delete obj.__proto__;
delete obj.constructor;
delete obj.prototype;
}
return obj;
}
// Chat rate limiting (5 messages per 10 seconds per user)
const CHAT_RATE_LIMIT = 5;
const CHAT_RATE_WINDOW = 10000;
// File upload validation
const ALLOWED_UPLOAD_DIRS = ['marketplace', 'ads'];
function validateUploadPath(filepath) {
const normalized = path.normalize(filepath);
// Block path traversal attempts (../ attacks)
if (normalized.includes('..')) return false;
// Only allow uploads to whitelisted directories
return ALLOWED_UPLOAD_DIRS.some(dir => normalized.startsWith(dir));
}
Limitations & Known Tradeoffs
TheeCoin is experimental software. Honest acknowledgment of constraints:
• No independent audit: The protocol has not been formally audited by third-party security researchers. Source code is publicly available at https://github.com/theecoinnetwork for independent review and verification.
• I2P latency: Running all traffic over I2P adds 1-5 seconds of latency per message. This is an inherent and accepted cost of anonymity.
• Multi-wallet mining: Users can run multiple wallets to earn faster. This is by design — the supply cap provides the ultimate scarcity enforcement rather than per-user rate limiting.
• No public block explorer (yet): Chain verification currently requires running a node. A read-only explorer is planned.
• Small network (early stage): The node count is currently small. This means fast consensus but increased vulnerability compared to a mature network with thousands of nodes.
• Node.js dependencies: The implementation has npm supply-chain risk, mitigated by pinned dependency versions and committed package-lock.json.
• No formal proofs: Security arguments are based on engineering analysis and real code, not mathematical formal verification.
Governance & Continuity
Protocol Upgrades: Require updated node software. Hash challenges enforce uniform versions. All active nodes must update (coordinated via the founder broadcast system).
No Single Point of Failure: The network operates without central servers. If the original creators disappear, nodes continue operating indefinitely. All source code is publicly available.
Founder Address: A single founder address can broadcast informational messages to the network. It cannot modify balances, freeze wallets, alter protocol logic, or perform any privileged action beyond sending informational announcements.
// node.js - Founder update verification (cryptographic proof required)
case 'founder_network_update':
const { founderAddress, cryptoProof, reason } = message.data;
// MUST be the actual founder address
if (founderAddress !== 'TheeCoin01db2ecd27c1d6de189c8b227c') {
return; // Rejected - not the founder
}
// Verify cryptographic signature (SHA256 of challenge + private key)
const expectedProof = crypto.createHash('sha256')
.update(`founder_update_${founderAddress}_${reason}_${timestamp}` + founderPrivateKey)
.digest('hex');
if (cryptoProof.signature !== expectedProof) {
return; // Rejected - invalid signature, someone impersonating founder
}
// Valid founder message - broadcast to network (INFORMATIONAL ONLY)
// This CANNOT: change balances, freeze wallets, modify code, or alter rules
broadcastToAllPeers({ type: 'founder_network_update', data: message.data });
Source Code & Verification
Repository: https://github.com/theecoinnetwork
License: MIT
Languages: JavaScript (Node.js), HTML/CSS
Key Dependencies: Hyperswarm (P2P networking), js-sha3 (SHA3/Keccak), elliptic (ECDSA/ECDH), i2pd (I2P daemon, bundled), Express + Socket.IO (local web interface)
Build: npm install in any platform directory. Pure JavaScript — no compilation required. All dependency versions pinned via package-lock.json for reproducibility.
// package.json - Actual dependencies (all open-source, auditable)
{
"name": "theecoin-node",
"version": "1.0",
"type": "module",
"scripts": {
"start": "node --max-old-space-size=4096 run.js"
},
"dependencies": {
"js-sha3": "^0.8.0", // SHA3/Keccak implementation
"hyperswarm": "^4.7.15", // P2P networking (DHT-based)
"elliptic": "^6.5.7", // ECDSA signatures + ECDH key exchange
"express": "^4.18.2", // Local web interface server
"socket.io": "^4.7.2", // Real-time wallet ↔ web UI communication
"cors": "^2.8.5", // Cross-origin for local web UI
"axios": "^1.6.0", // HTTP client (blockchain API verification)
"qrcode-terminal": "^0.12.0" // QR codes for payment addresses
},
"engines": { "node": ">=18.0.0" }
}
// Total: 8 runtime dependencies. All widely-used, MIT-licensed, auditable.
// No native modules. No compilation. Runs on any platform with Node.js 18+.
Local Verification Endpoints
Due to I2P anonymity, there is no public clearnet block explorer. However, anyone running a TheeCoin node or wallet can independently verify all network state via local HTTP endpoints:
// Available at http://localhost:3000 (HTTP) or https://localhost:3001 (HTTPS)
GET /supply
Returns: { "total": 100000000000000, "cap": 100000000000000, "mined": 1234567, "remaining": 99999998765433 }
GET /supply/total
Returns: "100000000000000"
GET /supply/mined
Returns: "1234567"
GET /supply/remaining
Returns: "99999998765433"
GET /mining
Returns: { "status": "ok", "total_mined": 1234567, "remaining_supply": 99999998765433,
"current_mining_rate": 0.00001157, "active_miners": 3, "mining_blocks": 42 }
GET /network
Returns: { "price": "$1.00", "supply": { "total": 100000000000000, "mined": 1234567 },
"mining": { "miners": 3, "blocks": 42 }, "blockchain": { "blocks": 15,
"transactions": 892, "wallets": 24 }, "network": { "peers": 5, "status": "connected" } }
GET /health
Returns: { "status": "ok", "timestamp": "2026-08-09T...", "activeSessions": 2 }
To verify independently:
1. Download the node or wallet software from github.com/theecoinnetwork
2. Run npm install then node run.js
3. Open http://localhost:3000/supply in your browser
4. See live, real-time network data from the chain your node has synchronized
This is the verifiability model: run the software, query the endpoints, see the real state. No trust in any third party required.
A Vision for Liberation
TheeCoin is more than technology. It is a statement that human beings deserve financial freedom. That no government should have the power to freeze your life savings on a whim. That no corporation should profit from surveilling your purchases. That no bank should have the authority to decide whether you're allowed to participate in the economy.
By generating new digital collectible tokens with internationally-driven value, distributed fairly through effort-based mining, protected by unbreakable encryption, and transmitted through anonymous infrastructure — TheeCoin creates a parallel financial reality where individuals are sovereign over their own wealth.
Economic slavery ends when people have an alternative. TheeCoin is that alternative.
Conclusion
TheeCoin provides a complete, working solution for decentralized financial sovereignty: quantum-resistant security, instant fee-free transactions, mandatory end-to-end encryption, anonymous network infrastructure, fair mine-to-mint distribution with a 100 trillion supply cap, built-in P2P trading with on-chain escrow verification, and a decentralized marketplace for real commerce.
The project is early-stage and experimental. It makes no promises of profit or value. It is offered as open-source software for individuals who value financial privacy and sovereignty.
The source code is public. The protocol is documented. Independent verification is invited.