Skip to content

bitcoin-apps-suite/bitcoin-contracts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Bitcoin Contracts

Smart Contract Infrastructure for the Bitcoin Corporation Multi-Token Ecosystem

License: Open BSV Token: $bContracts Company: Bitcoin Corporation Ltd

πŸ“œ Legal Notice

Copyright (c) 2025 The Bitcoin Corporation Ltd
UK Company Number: 16735102
Registered in England and Wales

This repository contains smart contracts that form the economic backbone of the Bitcoin OS ecosystem. By contributing to this repository, you agree to the terms outlined in our Contributor Agreement.

πŸͺ™ Earn $bContracts Tokens

Contributors to this repository earn $bContracts tokens - representing ownership in the smart contract infrastructure that powers the entire Bitcoin Corporation ecosystem.

Token Rewards

Contribution Type $bContracts Reward Description
New Contract Template 500-2000 Create reusable contract templates
Security Audit 1000-5000 Find and fix security vulnerabilities
Gas Optimization 100-500 Optimize contract efficiency
Bug Fix 50-200 Fix contract bugs
Documentation 20-100 Improve contract documentation
Test Coverage 50-200 Add comprehensive tests

πŸ—οΈ Repository Structure (BSV/sCrypt)

bitcoin-contracts/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ contracts/                # BSV/sCrypt smart contracts
β”‚   β”‚   β”œβ”€β”€ TokenFactory.ts      # Creates new app tokens
β”‚   β”‚   β”œβ”€β”€ AtomicSwap.ts        # Token exchange mechanism
β”‚   β”‚   β”œβ”€β”€ DeveloperReward.ts   # Auto-rewards for contributors
β”‚   β”‚   β”œβ”€β”€ Treasury.ts          # Treasury management
β”‚   β”‚   └── AppToken.ts          # Template for app tokens
β”‚   β”œβ”€β”€ oracles/                  # External data providers
β”‚   β”‚   └── GitHubOracle.ts      # Verifies PR merges
β”‚   └── utils/                    # Helper functions
β”‚       └── TokenUtils.ts        # Token manipulation helpers
β”œβ”€β”€ scripts/                      # Deployment and integration
β”œβ”€β”€ test/                         # Contract tests
β”œβ”€β”€ dist/                         # Compiled contracts
└── docs/                         # Documentation

🎯 Purpose

These BSV smart contracts enable:

  1. Automated Token Distribution - Contributors get tokens instantly upon PR merge
  2. Multi-Token Economy - Each app has its own token ($bMusic, $bWriter, etc.)
  3. Atomic Swaps - Trustless exchange between any tokens in the ecosystem
  4. Revenue Sharing - Automatic distribution of profits to token holders
  5. Decentralized Governance - Token holders control the ecosystem
  6. Unlimited Scaling - Leveraging BSV's unbounded block size
  7. Minimal Transaction Costs - BSV's ultra-low fees enable micro-transactions

πŸ’» Quick Start

Prerequisites

  • Node.js >= 18
  • Git
  • BSV wallet (for receiving tokens)
  • sCrypt CLI tools

Installation

git clone https://github.com/bitcoin-corp/bitcoin-contracts.git
cd bitcoin-contracts
npm install

Development

# Install dependencies
npm install

# Compile sCrypt contracts
npm run compile

# Run tests
npm test

# Generate private key for deployment
npm run genprivkey

# Deploy to BSV testnet
npm run deploy

πŸ“Š Token Economics

$bContracts Token

  • Purpose: Governance and revenue share from all contracts
  • Total Supply: 1,000,000,000 (1 billion) tokens
  • Distribution: Automated via GitHub Actions from treasury
  • Revenue: 5% of all token swaps go to $bContracts holders
  • Scarcity: Fixed supply ensures value appreciation

Exchange Hierarchy

$bCorp (Master) 
    ↓
$bOS (Platform)
    ↓
$bContracts (Infrastructure)
    ↓
App Tokens ($bMusic, $bWriter, etc.)

🀝 Contributing

We welcome contributions! Here's how to earn $bContracts:

  1. Fork this repository
  2. Create your feature branch (git checkout -b feature/AmazingContract)
  3. Commit your changes (git commit -m 'Add AmazingContract')
  4. Push to the branch (git push origin feature/AmazingContract)
  5. Open a Pull Request
  6. Receive $bContracts tokens upon merge!

See CONTRIBUTING.md for detailed guidelines.

πŸ” Security

  • All contracts are open source for transparency
  • Security audits rewarded with bonus tokens
  • Bug bounty program: Up to 5000 $bContracts
  • Multi-sig deployment process
  • Upgradeable proxy pattern for fixes

πŸ“ˆ Roadmap

Phase 1: Foundation (Q1 2025)

  • Repository setup
  • Core contracts implementation
  • $bContracts token deployment
  • GitHub Actions integration

Phase 2: Integration (Q2 2025)

  • Deploy all app tokens
  • Atomic swap implementation
  • Revenue sharing contracts
  • DAO governance launch

Phase 3: Ecosystem (Q3-Q4 2025)

  • Cross-chain bridges
  • Advanced DeFi features
  • Staking mechanisms
  • Yield generation

πŸ“œ License

This project is licensed under the Open BSV License Version 4 - see the LICENSE file for details.

Key License Terms

  • βœ… Open Source: All contracts must remain open source
  • βœ… Attribution: Credit The Bitcoin Corporation Ltd
  • βœ… Token Rights: Contributors earn $bContracts tokens
  • βœ… Commercial Use: Allowed with attribution
  • ❌ Closed Forks: Cannot make proprietary versions

πŸ”— Links

πŸ‘₯ Team

  • The Bitcoin Corporation Ltd - Project Owner
  • Contributors - $bContracts token holders
  • You - Future contributor and token holder!

βš–οΈ Legal Disclaimer

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND. The Bitcoin Corporation Ltd shall not be liable for any damages arising from the use of these contracts. Users are responsible for their own security audits and due diligence.

By using these contracts, you acknowledge that:

  1. Tokens have no guaranteed value
  2. Smart contracts may contain bugs
  3. You use at your own risk
  4. Regulatory compliance is your responsibility

πŸš€ Join the Revolution

Every line of code = $bContracts tokens
Every contribution = Ownership
Every developer = Shareholder

This is not just open source.
This is Open Source 2.0 - where developers are owners.


Β© 2025 The Bitcoin Corporation Ltd - Building the future of Bitcoin
Company No. 16735102 | England and Wales