Ultra-lightweight DAG blockchain optimized for IoT devices and micropayments
Project description
🚀 MicroDAG
Ultra-lightweight DAG blockchain optimized for IoT devices and micropayments.
MicroDAG is a revolutionary blockchain implementation that uses a Directed Acyclic Graph (DAG) structure to achieve unprecedented efficiency and speed, making it perfect for IoT devices, micropayments, and resource-constrained environments.
✨ Key Features
- 🏃♂️ Ultra-fast: <100ms transaction confirmations
- 🪶 Lightweight: <50MB memory usage, 59KB codebase
- 💰 No fees: Only minimal PoW for spam protection
- 🔗 DAG structure: Parallel transaction processing
- 🤖 IoT optimized: Perfect for Raspberry Pi, ESP32, Arduino
- ⚡ High throughput: 16,800 TPS regionally, 4,200 TPS globally
- 🔒 Secure: Cryptographically secure with spam resistance
📦 Installation
pip install microdag
That's it! MicroDAG is now ready to use.
🚀 Quick Start
1. Create Account
microdag account create
Output:
✅ Account created successfully!
Address: micro_a1b2c3d4e5f6789...
Private key: 0d3d9339a986e381f611d384f10ab039...
⚠️ IMPORTANT: Save your private key securely!
2. Start Node
microdag node start
3. Send Transaction
microdag send micro_recipient123... 10.5
4. Check Balance
microdag balance micro_your_address...
🐍 Python SDK
from microdag import MicroDAG
# Connect to local node
dag = MicroDAG("microdag.db")
# Send transaction
tx_hash = dag.send("micro_recipient", 10.5)
print(f"Transaction: {tx_hash}")
# Check balance
balance = dag.balance("micro_your_address")
print(f"Balance: {balance} MICRO")
🤖 IoT Integration
Perfect for IoT devices and micropayments:
import microdag
# Connect (convenience function for IoT)
dag = microdag.connect()
# Micropayment for sensor data (0.1 cent)
dag.send("micro_sensor_device", 0.001)
Raspberry Pi Example
# Lightweight mode for Pi Zero
microdag node start --lightweight --max-memory 50MB
🏗️ Architecture
MicroDAG uses a Directed Acyclic Graph (DAG) structure instead of traditional blockchain:
- Parallel Processing: Multiple transactions processed simultaneously
- No Mining: Transactions confirm each other through references
- Scalable: Performance improves with network activity
- Efficient: Minimal computational and storage requirements
💡 Use Cases
🏭 Industrial IoT
- Pay for sensor data in real-time
- Machine-to-machine micropayments
- Supply chain tracking with micro-fees
🏠 Smart Home
- Device-to-device payments
- Energy trading between smart meters
- Automated service payments
🌐 Edge Computing
- Lightweight blockchain for edge devices
- Decentralized data marketplaces
- API call micropayments
💳 Micropayments
- Sub-cent transactions with minimal overhead
- Content monetization
- Gaming and virtual economies
📊 Performance
| Metric | Value |
|---|---|
| Transaction Speed | <100ms confirmations |
| Throughput | 16,800 TPS (regional) |
| Memory Usage | <50MB (IoT mode) |
| Codebase Size | 59KB total |
| Network Overhead | 7-byte message headers |
| Transaction Size | 208 bytes fixed |
🔧 Advanced Usage
CLI Commands
microdag account create # Create new account
microdag node start [port] # Start node (default: 7076)
microdag send <to> <amount> # Send transaction
microdag balance [address] # Check balance
microdag add-peer <ip:port> # Add network peer
microdag stats # Show statistics
Python API
from microdag import MicroDAG, connect
from microdag.core import DAG, Transaction
from microdag.crypto.keys import generate_keypair
# Generate keypair
private_key, public_key = generate_keypair()
# Create transaction
tx = Transaction.create("micro_recipient", 10.5)
# Advanced DAG operations
dag = DAG()
dag.add_transaction(tx.hash)
stats = dag.get_stats()
🛡️ Security
- Cryptographic Security: Ed25519 signatures, Blake2b hashing
- Spam Resistance: Multi-layer defense with minimal PoW
- Network Security: P2P with Byzantine fault tolerance
- Data Integrity: Cryptographic validation of all transactions
🌟 Why MicroDAG?
| Traditional Blockchain | MicroDAG |
|---|---|
| Sequential blocks | Parallel DAG |
| High energy usage | Minimal energy |
| Slow confirmations | <100ms confirmations |
| Large resource needs | IoT-optimized |
| Transaction fees | Fee-free |
| Limited throughput | High throughput |
📚 Documentation
- Quick Start: microdag.org/docs/quick-start
- API Reference: microdag.org/docs/api
- Architecture: microdag.org/docs/architecture
- IoT Guide: microdag.org/docs/iot
🤝 Contributing
We welcome contributions! Please see our Contributing Guide for details.
📄 License
MIT License - see LICENSE file for details.
🔗 Links
- Website: microdag.org
- GitHub: github.com/microdag/microdag
- Documentation: microdag.org/docs
- PyPI: pypi.org/project/microdag
Built with ❤️ for the IoT and micropayments revolution.
MicroDAG: Making blockchain accessible to every device, everywhere.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file microdag-1.0.4.tar.gz.
File metadata
- Download URL: microdag-1.0.4.tar.gz
- Upload date:
- Size: 143.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9bf492d20a7ce23e6de2fd28142659a94f0ccc57f3ee1fcf8d16f8891a579c4a
|
|
| MD5 |
cd2f955719c2f750b70222aa5dc1bbf0
|
|
| BLAKE2b-256 |
53dc6438a6af9250e6d86bf4eb14e5e6d183db32e43acb439727fa4826970a0a
|
File details
Details for the file microdag-1.0.4-py3-none-any.whl.
File metadata
- Download URL: microdag-1.0.4-py3-none-any.whl
- Upload date:
- Size: 177.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d738779da4829bfdb676e18347b09fdcafd325595bbf15a3d3c5560c836f954a
|
|
| MD5 |
a9d762ecf984cdfb80d2013b58a3cbfa
|
|
| BLAKE2b-256 |
eb2161d8f7ae1e861e7a51ce3ed0faef0a5e11a4c5e5a46f12b6a4bf38b80672
|