Skip to content

Vitreus-Foundation/power-plant

Repository files navigation

Vitreus - Layer 0 Blockchain Ecosystem🌿⚡

Vitreus is a next-generation Layer 0 blockchain platform focused on decentralized energy trading and management, built using Substrate and featuring comprehensive EVM compatibility.

Substrate version License

Overview

Vitreus is a sophisticated blockchain ecosystem designed to revolutionize energy trading and management. Built on Substrate with full EVM compatibility, it combines traditional blockchain capabilities with specialized energy-focused features.

Core Features

  • Dual-Token System

    • VTRS (Native Token): Platform governance and staking
    • VNRG (Energy Token): Energy trading and fee payments
  • Energy Trading Infrastructure

    • Automated Market for energy assets
    • Dynamic exchange rates based on network metrics
    • Warehouse mechanism for supply stability
    • Multi-asset support and path-based routing
  • Advanced Security & Access Control

    • NFT-based access control system (NAC)
    • Reputation-based validation
    • Tiered VIP system with dynamic privileges
    • Comprehensive slashing mechanisms
  • Economic Features

    • Dynamic fee calculation system
    • Automated treasury management
    • Flexible vesting schedules
    • Reputation-based rewards

Architecture

Vitreus consists of several specialized pallets working in harmony:

Core Pallets

  1. Energy Broker

    • Decentralized energy trading through AMM
    • Automated price discovery
    • Liquidity provision management
  2. Energy Fee

    • Dual-token transaction fee mechanism
    • Dynamic fee adjustments
    • Automated token exchanges
  3. Energy Generation

    • Staking and validation mechanisms
    • Energy-per-stake rate calculation
    • Reputation integration
  4. NAC Managing

    • NFT-based access control
    • VIPP status management
    • Dynamic level updates

Supporting Pallets

  • Claiming: Token distribution and vesting
  • Reputation: Dynamic scoring system
  • Privileges: VIP membership management
  • Simple Vesting: Token lock mechanisms
  • Treasury Extension: Fund recycling and management
  • Faucet: Token distribution (it's only supported in testnet)

Getting Started

Prerequisites

  • Rust 1.74 or later
  • wasm32-unknown-unknown target
  • Node.js (for testing)

Installation

  1. Clone the repository:
git clone https://github.com/Vitreus-Foundation/power-plant
cd power-plant
  1. Build the node:
cargo build --release --features testnet-native
  1. Run the node:
./target/release/vitreus-power-plant-node --dev

Development Chain Configuration

The development chain comes with pre-funded accounts for testing:

  • Alith (Sudo): 0xf24FF3a9CF04c71Dbc94D0b566f7A27B94566cac
  • Baltathar: 0x3Cd0A705a2DC65e5b1E1205896BaA2be8A07c6e0
  • Additional test accounts available in development mode

Network Configuration

For connecting to the network:

Development

Building for Production

# Build with mainnet runtime
cargo build --release --features mainnet-native

Running Tests

# Run all tests
cargo test --features testnet-native --workspace

# Run specific pallet tests
cargo test -p pallet-energy-broker

Security Considerations

  1. Access Control

    • Multiple validation layers through NAC system
    • Reputation-based restrictions
    • Tiered privilege system
  2. Economic Security

    • Dynamic fee mechanisms
    • Slashing for malicious behavior
    • Stake-based validation
  3. Network Stability

    • Warehouse mechanism for price stability
    • Automated treasury management
    • Progressive rate adjustments

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Code Style

  • Follow Rust standard practices
  • Use the provided clippy configuration
  • Ensure comprehensive test coverage
  • Include benchmarks for new features

Documentation

License

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

Support

  • Open an issue for bug reports
  • Join our community
  • Check technical documentation

Acknowledgments

Built using:

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages