Skip to content

Repository files navigation

MobiChain: The First Truly Censorship-Resistant, Mobile-First Blockchain

"A network that lives in pockets, not data centers."

MobiChain is a next-generation blockchain designed from the ground up to run natively on smartphones, enabling anyone to operate a full, censorship-resistant node — without servers, stakes, or constant internet. Built on Elixir/BEAM, it combines Avalanche-style consensus, asynchronous DAG, and dynamic sharding to deliver >100,000 TPS with zero reliance on centralized infrastructure.


🚀 Key Features

✅ Mobile-First Architecture

  • Full node runs directly on Android (via embedded BEAM VM)
  • Optimized for resource constraints: <100 MB RAM, minimal battery usage
  • Works over mesh networks: Bluetooth, Wi-Fi Direct, Tor
  • Operates during intermittent connectivity or complete internet shutdown

✅ True Censorship Resistance

  • No fixed IPs or domains to block — p2p discovery via DHT
  • Traffic masquerading: looks like HTTPS to yandex.ru (instead of YouTube/VK)
  • Survives 100% server takedown — network lives in mobile devices
  • Designed for adversarial environments: Iran, Russia, China, etc.

✅ High Performance

  • >100,000 on-chain TPS (theoretical)
  • <1 second finality with Avalanche-style consensus
  • Unlimited off-chain TPS via state channels
  • Linear scaling with number of participants

✅ Novel Architecture

  • No validators, no staking — consensus by participation
  • Asynchronous DAG instead of blocks — no global ordering
  • Dynamic sharding with cross-shard messaging
  • Proof-of-Use instead of Proof-of-Stake

🏗️ Architecture Overview

1. Asynchronous DAG (Directed Acyclic Graph)

  • Events form a DAG structure instead of linear blocks
  • Each event references 1-3 parent events
  • Enables unlimited parallelism and high throughput
  • No global ordering required — only partial order

2. Avalanche-Style Consensus

  • Probabilistic consensus via random peer sampling
  • Query k random nodes about an event's validity
  • Confidence grows with consistent responses
  • Finality achieved in <1 second with 99.9% safety

3. Gossip Protocol

  • P2P event propagation with deduplication
  • Mesh networking support (Bluetooth, Wi-Fi Direct)
  • Traffic obfuscation to evade DPI (now appears as yandex.ru traffic)
  • Self-healing network topology

4. Dynamic Sharding

  • Auto-partitioning based on user ID or geography
  • Each shard processes independent state transitions
  • Cross-shard operations supported via async messaging
  • Shards can be ephemeral (nodes can change shards)

🛠️ Tech Stack

Component Technology Purpose
Core Elixir/OTP, BEAM VM Fault-tolerance, actor model, distribution
Crypto Ed25519, SHA256, AES-256-GCM Signatures, hashes, encryption
Network libp2p, Noise Protocol, WebRTC Secure p2p communication
Storage CRDT, Merkle DAG Distributed state, consistency
Mobile Flutter, embedded BEAM UI, native node execution
Smart Contracts Custom DSL → BEAM bytecode Safe, deterministic execution

🚀 Quick Start

Prerequisites

  • Erlang/OTP 26+
  • Elixir 1.20+
  • Rust 1.70+ (for libp2p bindings)
  • Android SDK + NDK (for mobile builds)

Installation

# Clone the repository
git clone https://github.com/Tabintaban/MobiChain.git
cd MobiChain

# Install dependencies
mix deps.get

# Run tests
mix test

# Start the node
iex -S mix

Basic Usage

# Create a new event
parents = []
payload = "Hello from MobiChain!"
timestamp = :os.system_time(:second)
node_id = MobiChain.Node.get_node_id()

event = MobiChain.Event.new(parents, payload, timestamp, "", node_id)
signed_event = MobiChain.Crypto.sign_event(event, private_key)

# Add to DAG and start consensus
MobiChain.DAG.Node.add_event(signed_event)
MobiChain.Consensus.start_consensus(signed_event)

# Check if event reached finality
MobiChain.Consensus.is_final?(event.id)

📱 Mobile Integration

Android Setup

  1. Install Android Studio with NDK and CMake
  2. Create Flutter project with embedded BEAM
  3. Link to compiled MobiChain libraries
  4. Use MobiChain.Mobile module for power/conn management

Power Management

  • Node only runs when device is on Wi-Fi and/or charging
  • Background sync via Android WorkManager
  • Mesh mode for operation without internet

🧪 Testing Results (Alpha)

Metric Result Target
On-chain TPS >50,000 >100,000
Finality Time <1 sec <1 sec
Mobile RAM Usage <100 MB <100 MB
Node Startup Time <2 sec
Sybil Resistance Passed Passed
Censorship Evasion Passed Passed

See TESTING_RESULTS.md for full details.


📋 Roadmap

Alpha (Completed) ✅

  • Asynchronous DAG implementation
  • Avalanche-style consensus
  • Gossip protocol with mesh support
  • Mobile node prototype
  • Traffic obfuscation (Noise + HTTPS masking to yandex.ru)
  • Basic smart contracts (DSL)
  • Native token standard (MRC-1)
  • Two-node simulation

Beta (Next) 🚧

  • Full libp2p integration
  • Android APK with embedded node
  • Mobile wallet with UI
  • 1000+ node testnet
  • Advanced sharding mechanisms
  • ZK-rollup support

Mainnet (Future) 🌐

  • Global censorship-resistant network
  • Full mobile dApp ecosystem
  • Interoperability bridges
  • DAO governance system

🤝 Contributing

We welcome contributions to MobiChain! Please read our CONTRIBUTING.md for details on our code of conduct and the process for submitting pull requests.

Areas needing help:

  • Android/Flutter integration
  • libp2p_ex library development
  • Cryptographic optimizations
  • Mobile energy efficiency
  • Network penetration testing

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.


🌐 Community


🙏 Acknowledgments

  • The Erlang/OTP team for the robust runtime system
  • The Avalanche team for the consensus research
  • The IOTA team for DAG innovations
  • All open-source contributors whose work made this possible

MobiChain: Freedom in your pocket.

In a world of increasing digital control, MobiChain ensures that freedom fits in your pocket.

About

MobiChain — The First Truly Censorship-Resistant, Mobile-First Blockchain. A network that lives in pockets, not data centers

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages