1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
|
# OnionCoin 🧅
**Privacy-first cryptocurrency natively built on the Tor network**
## Overview
OnionCoin is a cryptocurrency designed from the ground up to operate entirely within the Tor network, providing unprecedented privacy and censorship resistance. Unlike traditional cryptocurrencies that can optionally use Tor as a proxy, OnionCoin's entire architecture is built around Tor hidden services.
## Key Features
### 🕵️ Native Tor Integration
- Every node runs as a `.onion` hidden service
- P2P communication exclusively via Tor circuits
- Impossible to geolocate or censor nodes
### ⏰ Temporal Obfuscation (Unique!)
OnionCoin leverages Tor's inherent latency variability as a **privacy feature**:
- **Fuzzy timestamps**: Transactions use time ranges (2-6 hours) instead of precise timestamps
- **Zero-knowledge time proofs**: Prove transaction was created within a range without revealing exact time
- **Random delays**: Strategic delays at multiple propagation stages
- **Mixing pools**: Batch and shuffle transactions before broadcast
- Makes timing analysis and transaction correlation extremely difficult
### 🌸 Dandelion++ Propagation
- STEM phase: Forward through 1-4 random hops with delays
- FLUFF phase: Broadcast to network
- Hides transaction origin both temporally and topologically
### 🔒 Privacy by Default
- **Ring signatures**: Hide sender among decoys (Monero-style)
- **Stealth addresses**: Each transaction generates new recipient address
- **Confidential transactions**: Amounts hidden with Bulletproofs
- **No metadata leakage**: Timestamp, IP, location all obfuscated
### ⚡ Proof-of-Contribution Consensus (REVOLUTIONARY!)
OnionCoin's consensus is **unique**: it rewards WORK, not just wealth
- **Stake (40%)**: Still important, but uses logarithmic scale to reduce whale advantage
- **Tor Relay Work (30%)**: Earn by relaying OnionCoin traffic through Tor! 🌐
- **Bandwidth (15%)**: Network contribution matters
- **Uptime (10%)**: Reliability is rewarded
- **Storage (5%)**: Help store the blockchain
**Minimum stake: Only 10 ONC!** Even a Raspberry Pi Zero can validate!
### 💎 Native Blockchain Inheritance (WORLD'S FIRST!)
OnionCoin solves the **$140B+ lost Bitcoin problem** with inheritance built into the protocol
- **Progressive unlock**: Gradual release (10% → 35% → 70% → 100%) gives owner time to dispute if still alive!
- **Heartbeat system**: Send 0.00000001 ONC to yourself every 90 days to prove you're alive
- **Shamir secret sharing**: Split seed among 5 people, any 3 can recover
- **Anti-scam protections**: Dispute system, suspicious activity detection, max 3 disputes
- **Privacy-first**: Tor-only heartbeats, encrypted beneficiary lists
- **Costs $0.14** for 10 years vs $10,000 for lawyers
**NO OTHER CRYPTO HAS THIS!** Read [INHERITANCE.md](INHERITANCE.md) for details.
## Architecture
```
onioncoin/
├── core/ # Blockchain, transactions, blocks
├── crypto/ # Cryptographic primitives
├── timing/ # Temporal obfuscation (unique!)
├── network/ # Dandelion++, P2P over Tor
├── consensus/ # Proof-of-Contribution (UNIQUE!)
├── inheritance/ # Native inheritance system (WORLD'S FIRST!)
└── wallet/ # User wallet interface
```
## How It Works
### Transaction Flow
1. **Create**: Wallet creates transaction with fuzzy timestamp (T ± 2h)
2. **Delay**: Random delay (5-60 min) before broadcast
3. **STEM**: Forward through 1-4 Tor nodes with delays
4. **Mix**: Enter mixing pool, shuffle with other transactions
5. **FLUFF**: Broadcast to network after random batch delay
6. **Confirm**: Included in block by PoS validator
**Result**: Impossible to determine when/where transaction originated
### Timing Obfuscation Example
```rust
use onioncoin_timing::{TimeRange, TimingMetadata, DelayStrategy};
// Create transaction with fuzzy timestamp
let now = Utc::now();
let seed = [42u8; 32];
let timing = TimingMetadata::new(now, &seed)?;
// Timing range: now ± 2-6 hours (random)
// Actual time: provable via ZK proof, but not revealed
// Apply strategic delays
let strategy = DelayStrategy::wallet_broadcast(); // 5-60 min
strategy.sleep().await;
```
## Economic Model
### Genesis Mining (Fair Launch)
- **Phase 1 (6 months)**: 1,000,000 ONC distributed to Tor relay operators
- **NO pre-mine, NO ICO**: Completely fair distribution
- Early participants get 2x bonus (first month), then linear decay to 1x
- Anyone can join by running a Tor relay for OnionCoin traffic
### Regular Emission
- **Emission**: 5 ONC per block (~262,800/year)
- **Max supply**: ~21M ONC (halving every 4 years)
- **Block time**: 10 minutes
- **TPS**: 5-10 tx/s (realistic for Tor bandwidth)
### Validator Tiers
| Tier | Min Stake | Hardware | Monthly Return |
|------|-----------|----------|----------------|
| **Micro** | 10 ONC | Raspberry Pi Zero | ~0.1 ONC |
| **Light** | 100 ONC | Raspberry Pi 4 | ~1 ONC |
| **Standard** | 1000 ONC | Desktop/VPS | ~10 ONC |
| **Power** | 10000 ONC | Server 24/7 | ~100 ONC |
## Running a Node
```bash
# Install Tor
sudo apt install tor
# Run OnionCoin node (becomes a .onion hidden service)
cargo run --bin onioncoin-node
# Your node will have an address like:
# abc123def456.onion:9333
```
## Why OnionCoin?
**Existing cryptocurrencies:**
- Can use Tor as proxy (optional)
- Metadata leakage (timestamps, IP correlation)
- Vulnerable to timing analysis
**OnionCoin:**
- Tor is the **only** network layer
- Timing is deliberately obfuscated as a core feature
- Transaction origin is cryptographically untraceable
- **Rewards Tor relay work** - first crypto to do this!
## Use Cases
✅ **Privacy-preserving payments**
✅ **Censorship-resistant transactions**
✅ **Anonymous donations**
✅ **Darknet markets** (legitimate use)
✅ **Surveillance-free commerce**
## Development Status
🚧 **Prototype/Research Phase**
This is a proof-of-concept implementation demonstrating:
- ✅ Temporal obfuscation protocols
- ✅ Dandelion++ over Tor
- ✅ Privacy-preserving transaction structure
- ✅ **Proof-of-Contribution consensus** (UNIQUE!)
- ✅ **Proof-of-Relay system** (REVOLUTIONARY!)
- ✅ Fair genesis mining
**Not production-ready!** Missing:
- Full cryptographic implementations (ring sigs, bulletproofs)
- Actual Tor integration layer
- Consensus finalization
- Network security hardening
## Technical Specifications
| Parameter | Value |
|-----------|-------|
| Block time | 10 minutes |
| Block size | 2 MB |
| TPS | 5-10 tx/s |
| Consensus | Proof-of-Stake |
| Min stake | 1000 ONC |
| Timestamp range | 2-6 hours |
| STEM hops | 1-4 random |
| Mixing pool delay | 10-30 minutes |
## Building
```bash
cargo build --release
cargo test
```
## Contributing
This is a research/educational project. Contributions welcome:
- Cryptographic implementations
- Tor networking layer
- Performance optimizations
- Security analysis
## License
MIT
## Disclaimer
Educational/research project. Not financial advice. Use at your own risk.
---
**Built with privacy, for privacy. 🧅**
|