Skip to content

Repository files navigation

QuantCoin

QuantCoin is a quantum-resistant blockchain implementation that combines traditional cryptocurrency features with distributed computing capabilities. It uses post-quantum cryptography to ensure security against potential quantum computer attacks.

Features

  • Quantum-resistant cryptography
  • Proof of Stake (PoS) consensus mechanism
  • Distributed computing task management
  • Wallet management system
  • Staking and rewards system

Prerequisites

  • Docker
  • Docker Compose
  • cURL (for API testing)

Quick Start

  1. Clone the repository:
git clone https://github.com/yourusername/quantcoin.git
cd quantcoin
  1. Build and start the containers:
docker-compose build
docker-compose up

The API will be available at http://localhost:8080.

API Documentation

Wallet Operations

Create Wallet

curl -X POST http://localhost:8080/wallet/create

Send Funds

curl -X POST http://localhost:8080/wallet/send \
  -H "Content-Type: application/json" \
  -d '{
    "sender": "SenderPublicKey",
    "to": "ReceiverPublicKey",
    "amount": 50
  }'

Staking Operations

Stake Funds

curl -X POST http://localhost:8080/stake \
  -H "Content-Type: application/json" \
  -d '{
    "wallet": "WalletPublicKey",
    "amount": 100
  }'

Unstake Funds

curl -X POST http://localhost:8080/unstake \
  -H "Content-Type: application/json" \
  -d '{
    "wallet": "WalletPublicKey",
    "amount": 50
  }'

Check Staking Rewards

curl -X GET "http://localhost:8080/staking/rewards?wallet=WalletPublicKey"

Distributed Computing Tasks

Add New Task

curl -X POST http://localhost:8080/tasks/add \
  -H "Content-Type: application/json" \
  -d '{
    "id": "task1",
    "description": "Perform a simple sum task",
    "data": "ewogICAgImRhdGEiOiBbMSwgMiwgMywgNCwgNV0sCiAgICAidGFzayI6ICJTdW0gdGhlc2UgbnVtYmVycyIKfQ==",
    "reward": 50
  }'

Complete Task

curl -X POST http://localhost:8080/tasks/complete \
  -H "Content-Type: application/json" \
  -d '{
    "id": "task1"
  }'

View Tasks

# Check pending tasks
curl -X GET http://localhost:8080/tasks/pending

# Check completed tasks
curl -X GET http://localhost:8080/tasks/completed

Blockchain Information

View Blocks

curl -X GET http://localhost:8080/blocks

View Wallets

curl -X GET http://localhost:8080/wallets

Technical Details

Quantum Resistance

QuantCoin employs post-quantum cryptographic algorithms to secure transactions and wallet addresses. This makes the blockchain resistant to potential attacks from quantum computers. The implementation uses:

  • Lattice-based cryptography for key generation
  • Hash-based signatures for transaction signing
  • Post-quantum secure key encapsulation mechanisms

Proof of Stake (PoS) Implementation

The PoS consensus mechanism in QuantCoin:

  • Requires validators to stake QTC tokens
  • Uses a deterministic validator selection process
  • Implements slashing conditions for malicious behavior
  • Provides staking rewards based on participation and stake amount

Distributed Computing

QuantCoin integrates a distributed computing platform that allows:

  • Users to submit computational tasks to the network
  • Validators to process tasks and earn additional rewards
  • Verification of task completion through consensus
  • Fair distribution of computing resources

Security Considerations

  • All API endpoints run on HTTP for development. In production, ensure HTTPS is configured.
  • Protect private keys and never share them.
  • Monitor staking activities and rewards for any anomalies.
  • Regularly check for software updates and security patches.

Contributing

We welcome contributions! Please read our contributing guidelines before submitting pull requests.

License

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

Disclaimer

QuantCoin is an experimental project. Use at your own risk. Always perform thorough testing before using in production environments.

About

Quantum Resistant Blockchain / Coin

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages