-
Notifications
You must be signed in to change notification settings - Fork 0
Anti ASIC
ASICs (Application-Specific Integrated Circuits) and FPGAs (Field-Programmable Gate Arrays) are specialized hardware designed for specific computations. In Bitcoin, ASICs caused:
- Centralization: Only wealthy miners can afford ASICs
- Monopoly: A few companies control ASIC production
- Energy waste: ASICs optimize for hashing, not useful work
- Barrier to entry: Regular users can't compete
Voidmap uses GPUs only to keep mining decentralized and accessible.
Every 100 blocks, the pool switches between different ML architectures:
| Architecture | Parameters | Memory | Why It's Hard for ASICs |
|---|---|---|---|
| CNN | ~500K | 50 MB | Fixed pipeline, but weights change |
| Transformer | ~2M | 200 MB | Dynamic attention patterns |
| Mamba | ~1M | 100 MB | Sequential state updates |
| ConvNeXT | ~15M | 500 MB | Large memory footprint |
Why it works: ASICs are built for one architecture. Switching forces miners to use general-purpose GPUs.
Each work unit has a random batch size between 16-128:
batch_size = random.randint(16, 128)Why it works: ASICs optimize pipelines for fixed input sizes. Random sizes break optimization.
Before each inference, model weights are perturbed with small random noise:
for param in model.parameters():
noise = torch.randn_like(param) * 0.01
param.add_(noise)Why it works: Pre-computed ASIC solutions become invalid when weights change.
Each share requires 64MB of random memory access:
memory_data = torch.randn(16 * 1024 * 1024) # 64MB
indices = torch.randperm(len(memory_data))
_ = memory_data[indices] # random access patternWhy it works: ASICs have small SRAM (on-chip memory). 64MB exceeds typical ASIC capacity.
The challenge hash changes every block based on block number and weight seed:
challenge_hash = sha256(f"{block_num}:{data_hash}:{weight_seed}")Why it works: Can't pre-compute solutions when challenges change dynamically.
Different computation paths based on input data:
if data[0] > 0.5:
# Path A: process with CNN
else:
# Path B: process with TransformerWhy it works: ASICs can't handle branching logic efficiently.
We measure ASIC resistance on a 0-1 scale:
Resistance = (
0.3 × Architecture Diversity +
0.4 × Memory Requirement +
0.3 × Computation Variability
)
| Factor | Weight | Description |
|---|---|---|
| Architecture Diversity | 0.3 | Number of supported architectures |
| Memory Requirement | 0.4 | Minimum memory needed (MB) |
| Computation Variability | 0.3 | How much computation changes per block |
With 4 architectures (CNN, Transformer, Mamba, ConvNeXT):
Architecture Diversity: 0.8 (4/5)
Memory Requirement: 0.6 (avg 200MB)
Computation Variability: 0.75
Overall: 0.3 × 0.8 + 0.4 × 0.6 + 0.3 × 0.75 = 0.70
0.70/1.00 = Strong ASIC resistance
Because of anti-ASIC measures, miners need:
| Component | Minimum | Recommended |
|---|---|---|
| GPU VRAM | 4 GB | 8+ GB |
| System RAM | 8 GB | 16 GB |
| Storage | 10 GB | 20 GB |
| Architecture | CUDA 7.0+ | CUDA 8.0+ |
| Vendor | Series | Support |
|---|---|---|
| NVIDIA | GTX 10xx+ | Full (CUDA) |
| NVIDIA | RTX 20xx/30xx/40xx | Full (CUDA) |
| AMD | RX 5000+ | Full (ROCm) |
| Apple | M1/M2/M3 | Full (MPS) |
| Intel | Arc A-series | Partial (OpenCL) |
Attack: Build ASIC for TransitCNN only Defense: Architecture rotation switches to Transformer every 100 blocks Result: ASIC becomes useless 33% of the time
Attack: Build ASIC supporting all 4 architectures Defense: Weight perturbation changes weights every inference Result: Pre-computed solutions invalid, must recompute on GPU
Attack: Use FPGA to dynamically switch architectures Defense: Memory-hard operations require 64MB+ SRAM Result: FPGA too small, must use GPU
Attack: Use FPGA with external DDR memory Defense: Dynamic challenges change every block Result: Can't pre-compute, must process in real-time
- Zero-Knowledge Proofs: Verify computation without revealing inputs
- Homomorphic Encryption: Process encrypted data
- Multi-Party Computation: Distribute work across multiple miners
- Adversarial Models: Models that actively resist ASIC optimization
- Quantum Resistance: Post-quantum cryptography for challenges
from anti_asic import AntiASIC, estimate_asic_resistance
anti_asic = AntiASIC()
challenge = anti_asic.generate_challenge(block_num=100)
print(f"Current architecture: {challenge['architecture']}")
print(f"Batch size: {challenge['batch_size']}")
print(f"Memory hardness: {challenge['data_length']} elements")
resistance = estimate_asic_resistance(list(ARCHITECTURES.keys()))
print(f"ASIC resistance score: {resistance['overall_score']:.2f}")The pool dashboard shows:
- Current model architecture
- Architecture rotation history
- Average batch sizes
- Memory usage per share
| Aspect | Bitcoin | Voidmap |
|---|---|---|
| Hardware | ASIC only | GPU only |
| Centralization | High (ASIC farms) | Low (consumer GPUs) |
| Energy use | Wasted on hashing | Useful ML inference |
| Accessibility | Million-dollar barrier | $500 GPU |
| Innovation | None (fixed algorithm) | New models, new tasks |