Flex Docs (Work-In-Progress | Last Updated: 12/07)
  • Current Landscape
  • Welcome to Flex
  • Overview
    • Infrastructure for the New Web
    • The Values of the Flex Ecosystem
  • Protocol
    • Flex Validator Nodes
      • Data and Validation Layer
      • Rewards Layer
      • Audit Layer
      • Sentinel Layer
      • Prediction Layer
      • Getting Started
        • Propagation into the Validation Layer
        • Transaction Pool Generation
        • Transaction Weight Assignment
        • Epoch Score Calculation
        • Reward Distribution
        • Reward Claiming
        • Epoch Reward Pool Mechanics
    • Proof-of-Collaboration (PoCol)
      • PoCol Governance using FLEXE
      • Actors in the Flex Ecosystem
    • Flex Commons
      • Code Tokenization
      • Code Registry and Indexing
      • Code Versioning and Forking
      • Code Licensing and Royalties
      • Code Marketplaces and Auctions
      • Code Search and Discovery
      • Flex Commons Governance using FLEXE
    • Ecosystem Tokens' Multi-Staking
    • Technical Roadmap for the Flex Ecosystem
      • Flex Virtual Machine (FVM)
      • Flex SDCK
      • re:Flex Smart Contract Language
    • Flex Improvement Proposal (FIP)
    • Flex Portal: Your Gateway to Web3
  • Contribute to the Ecosystem
    • Strategists: Roles and Contributions
    • Developers and Projects
  • Governance and Utility
    • Introducing the FLEXE Token (coming soon)
    • Flexonomics (coming soon)
    • How to get FLEXE tokens (coming soon)
      • Use the faucet (coming soon)
      • Run a node (coming soon)
  • Quicklinks
    • Supported Social Media
    • Official Website
  • Legal
    • Terms of Service
    • Privacy Policy
    • Digital Asset Disclosure (coming soon)
Powered by GitBook
On this page
  1. Protocol
  2. Flex Validator Nodes

Prediction Layer

Flex is a community-owned platform that rapidly boosts dApp user growth, ensuring the value generated directly benefits the Flex community.

The prediction layer uses machine learning models and time series analysis to forecast network activity and optimize resource allocation.

Task reward prediction model

A Long Short-Term Memory (LSTM) neural network is used to predict future task rewards:

JavaScriptCopy codefrom tensorflow.keras.models import Sequential
from tensorflow.keras.layers import LSTM, Dense

def create_lstm_model(input_shape):
    model = Sequential([
        LSTM(64, input_shape=input_shape, return_sequences=True),
        LSTM(32, return_sequences=False),
        Dense(1)
    ])
    model.compile(optimizer='adam', loss='mse')
    return model

def predict_rewards(historical_data, model):
    # Preprocess data and make predictions
    pass

Network load balancing

This layer implements a dynamic load-balancing algorithm to optimize task distribution:

L(v)=T1​∑t∈Tv​​P(v)C(t)​L(v)= T 1 ​ ∑ t∈T v ​ ​ P(v) C(t) ​ L(v)=T1​∑t∈Tv​​P(v)C(t)​

where:

  • L(v) is the load factor of validator v

  • Tv is the set of tasks assigned to validator v in the current time window

  • T is the duration of the time window

  • C(t) is the complexity of task t

  • P(v) is the performance score of validator v

The network aims to minimize the variance of Lv across all validators.

PreviousSentinel LayerNextGetting Started

Last updated 10 months ago

We invite developers, researchers, and enthusiasts to work with our contributors for this section.

Start contributing here.