UFP Logo

Universal Fairness Protocol

Trust Nothing. Verify Everything.

ℹ️ Universal Fairness Protocol (UFP) Info

🧠 Learn About the Universal Fairness Protocol

The Universal Fairness Protocol (UFP) is a transparent system built on SHA-256 hashing and open logic design.

It guarantees verifiable outcomes, publicly auditable rounds, and segment-based winner validation.

Learn how fairness is achieved through live ticket lists, hash generation, and mathematical segment extraction.

Understanding the Universal Fairness Protocol (UFP)

The Universal Fairness Protocol (UFP) is a deterministic, tamper-proof system that guarantees transparent outcomes for every round. It is engineered for full public auditability, empowering anyone to independently confirm results using basic tools β€” no hidden logic, no trust required.

Whether you're a participant or an external observer, this documentation walks you through how inputs are recorded, how outcomes are generated, and how you can reproduce every result β€” with no hidden logic or trusted intermediaries involved.

UFP is also built with developers in mind. Its modular core supports addons, custom logic, and external integrations β€” all without touching the base fairness engine. This makes it ideal for campaigns, contests, airdrops, and other use cases that demand provable outcomes and real-time adaptability.

The core philosophy of UFP is summarized by its mantra β€” a step-by-step sequence that defines how fairness is enforced:

πŸ’‘ UFP Mantra:
Live List = Final List β†’ Final List = SHA-256 Hash β†’ SHA-256 Hash = Segment β†’ Segment = Public Formula β†’ Public Formula = Winner

This mantra defines the exact flow of fairness β€” from real-time entries to cryptographic resolution.

This mantra is more than a slogan β€” it’s a technical promise. What’s visible to the public is exactly what gets sealed into the cryptographic hash, which becomes the foundation for all winner selection. Each step is public, provable, and immutable.

With UFP, β€œTrust Nothing β€” Verify Everything.” Every outcome can be retraced from the final entry list to the winning positions β€” with no guesswork and no gaps in logic.

How Does the Protocol Work?

Every round in the Universal Fairness Protocol (UFP) follows a clear 4-step process β€” from accepting entries to distributing rewards and starting the next cycle. This section breaks down how the system operates behind the scenes, whether you're integrating via backend logic or simply observing.

🧩 Step 1: How the System Accepts Entries

The Universal Fairness Protocol is designed to accept entries dynamically from a variety of sources β€” including internal logic, external apps, or addon modules like check-ins and task submissions.

These entries are recorded in real-time during an active round, forming a live list that evolves until the countdown ends. Each entry is securely logged with full traceability.

This design ensures that no matter how entries are generated, they are all treated equally β€” funneled into a central, transparent pool that becomes the foundation for hash generation and winner selection.

The flexibility of this structure allows UFP to support a wide range of participation methods, while guaranteeing that every entry is verifiable and cryptographically locked into the round’s final outcome.

⏳ Step 2: Locking Results When the Round Ends

When the countdown timer hits zero, the current round is locked. The system then generates a SHA-256 hash from the complete entry list β€” this becomes the "key" that drives the outcome.

The hash is immediately made public, allowing anyone to independently verify it.

Winner selection is then performed using segment-based extraction logic via a sliding window method β€” a transparent approach that’s fully deterministic, reproducible, and resistant to manipulation.

🎁 Step 3: Distributing Rewards

The system assigns rewards to each position based on the configuration chosen by the admin:

  • Percentage Mode: Splits the prize pool based on fixed percentages (e.g., 44%, 11%, etc.).
  • Label Mode: Assigns predefined reward labels (e.g., β€œGift Card”, β€œHeadphones”) to each winner, with no monetary calculation.

Users can then see their winning entries, positions, and associated rewards on the frontend.

πŸ” Step 4: Beginning a New Round

As soon as a round is finalized, the system automatically starts a new one β€” no manual input required.

This continuous loop is powered by CRON, ensuring uninterrupted fairness and uptime.

πŸ” How Winners Are Selected – A Step-by-Step Breakdown

Each winning ticket is derived using the SHA-256 hash of the final ticket list.

1️⃣ Generating the Round Hash

At the end of each round, the system generates a SHA-256 hash of the final list of tickets.

This hash ensures that no one can modify the ticket list after the round ends.

Example:

SHA-256 Hash: 141de333ca5c352ff70da947d638af07a4b872f9016d56d462241f67f496d618

2️⃣ Extracting Numeric Values for Winner Selection

We extract the first 10 numeric digits from the hash to determine the first winning ticket.

Then, we slide the extraction window by 1 position for each next winner.

πŸ“Œ Example: Extracting Numeric Values from SHA-256 Hash

Position #1: Extraction number from the Hash key = 1413335352

Position #2: Extraction number from the Hash key = 4133353527

Position #3: Extraction number from the Hash key = 1333535270

Position #4: Extraction number from the Hash key = 3335352709

Position #5: Extraction number from the Hash key = 3353527094

Position #6: Extraction number from the Hash key = 3535270947

Position #7: Extraction number from the Hash key = 5352709476

Position #8: Extraction number from the Hash key = 3527094763

Position #9: Extraction number from the Hash key = 5270947638

Position #10: Extraction number from the Hash key = 2709476380

3️⃣ Converting Extracted Numbers into Winning Tickets

Each extracted number is used in this formula:

Winning Ticket = (Extracted Number % Total Tickets) + First Ticket Number

This ensures the result always falls within the valid ticket range.

πŸ† Example: Converting Extracted Numbers into Winning Tickets

Example (If total tickets = 13, first ticket = 735):

Position #1: (1413335352 % 13) + 735 = (735) Is the Winning Ticket

Position #2: (4133353527 % 13) + 735 = (739) Is the Winning Ticket

Position #3: (1333535270 % 13) + 735 = (737) Is the Winning Ticket

Position #4: (3335352709 % 13) + 735 = (735) Is the Winning Ticket

Position #5: (3353527094 % 13) + 735 = (743) Is the Winning Ticket

Position #6: (3535270947 % 13) + 735 = (735) Is the Winning Ticket

Position #7: (5352709476 % 13) + 735 = (745) Is the Winning Ticket

Position #8: (3527094763 % 13) + 735 = (745) Is the Winning Ticket

Position #9: (5270947638 % 13) + 735 = (743) Is the Winning Ticket

Position #10: (2709476380 % 13) + 735 = (735) Is the Winning Ticket

The system extracts up to 20 valid 10-digit numeric segments from each hash output using a sliding window approach. If the number of required segments (defined by the admin via number_of_winners) exceeds the available segments in the original SHA-256 hash, the system will rehash the original key once to generate a second hash. Additional segments are then extracted from this new hash. If more segments are still needed, the system continues rehashing each previous hash recursively, generating as many additional blocks as necessary to fulfill the total required outcomes. This ensures full coverage for any configured number of outcome positions while maintaining deterministic and verifiable logic.

πŸ”’ Why This System is 100% Trustworthy

βœ” SHA-256 hashing prevents tampering

βœ” Everyone sees the ticket list before the round ends

βœ” Users can verify results using a calculator

βœ” No manipulation, no hidden formulas, only pure math

This is one of the most transparent and provably fair systems ever built.

The numbers don’t lie – you can verify everything yourself! πŸš€

πŸ›  How to Use the Verification Tools

This platform provides full transparency through a set of built-in tools that allow developers, admins, and external observers to inspect past rounds, verify outcomes, and validate fairness independently. This guide explains how to interpret each section and utilize the tools effectively for auditing and debugging purposes.

πŸ“Œ Viewing & Analyzing Past Rounds

The Select a Past Round tool allows you to choose a previously completed round and view all details about that round, including:

Total Tickets Sold – The total number of tickets in that round.

Ticket Range – The first and last ticket numbers assigned during the round.

First Ticket – The first ticket number assigned.

Last Ticket – The last ticket number assigned.

Round Hash (SHA-256) – The cryptographic fingerprint of the final ticket list.

Winning Positions (Numeric Extraction) – The numeric values extracted from the hash that were used to determine the winning tickets.

Full Ticket List – A complete, unchanged list of every ticket in that round.

πŸ“Œ How to Use the "Select a Past Round" Tool

1️⃣ Click on the dropdown menu labeled "Select a Round".

2️⃣ Choose the round you want to analyze (Example: Round #1 (Ended: 01 Jan 2025)).

3️⃣ The system will instantly display:

  • Total number of tickets in that round.
  • The first and last ticket numbers issued.
  • The full ticket list that was hashed.
  • The SHA-256 hash of the ticket list (This ensures fairness).

πŸ“Œ Understanding the Round Hash & Numeric Extraction

Every round has a SHA-256 hash, which is a fixed-length digital fingerprint generated from the full list of entries.

Example of a SHA-256 hash:

SHA-256 Hash: 141de333ca5c352ff70da947d638af07a4b872f9016d56d462241f67f496d618

From this hash, the system extracts up to 20 valid 10-digit numeric segments using a sliding window method. If more segments are needed (based on the number of outcome positions), the system continues by rehashing the previous hash to generate additional blocks.

Each segment is then used to determine a winning entry using the following formula:

Resolved Entry = (Extracted Segment % Total Entries) + First Entry ID

3️⃣ Converting Extracted Segments into Resolved Entries

This formula ensures that every resolved position maps to a valid entry within the round. The process is deterministic, transparent, and reproducible.

πŸ† Example: Converting Extracted Segments into Entry IDs

Example (If total entries = 13, first entry ID = 735):

Position #1: (1413335352 % 13) + 735 = (735)

Position #2: (4133353527 % 13) + 735 = (739)

Position #3: (1333535270 % 13) + 735 = (737)

Position #4: (3335352709 % 13) + 735 = (735)

Position #5: (3353527094 % 13) + 735 = (743)

Position #6: (3535270947 % 13) + 735 = (735)

Position #7: (5352709476 % 13) + 735 = (745)

Position #8: (3527094763 % 13) + 735 = (745)

Position #9: (5270947638 % 13) + 735 = (743)

Position #10: (2709476380 % 13) + 735 = (735)

πŸ“Œ Verifying the Winning Entries

The "Verify Winning Entries" tool allows anyone to independently recalculate winning positions using the resolved ticket list and confirm that the outcomes were generated fairly and deterministically.

πŸ“Œ How to Use the "Verify Winning Entries" Tool

1️⃣ Select a completed round from the "Select a Past Round" dropdown.

Once selected, all necessary data for verification is auto-filled:

  • Total Tickets Sold β€” The number of entries submitted during the round.
  • Ticket Range β€” The first and last ticket IDs assigned during the round.
  • Final Ticket List β€” The full list of entries locked in before winner extraction.
  • Round Hash (SHA-256) β€” The cryptographic fingerprint used for segment extraction.

2️⃣ Click "Verify Winners" to extract and resolve winning ticket IDs.

3️⃣ The system will display extracted numeric segments and their corresponding winners.

4️⃣ Cross-check the results with the original round details for complete transparency.

πŸ“Œ Example Output:

Resolved Winners:

Position #1: Entry ID β†’ (735) (Segment: 1413335352)

Position #2: Entry ID β†’ (739) (Segment: 4133353527)

Position #3: Entry ID β†’ (737) (Segment: 1333535270)

Position #4: Entry ID β†’ (735) (Segment: 3335352709)

Position #5: Entry ID β†’ (743) (Segment: 3353527094)

Position #6: Entry ID β†’ (735) (Segment: 3535270947)

Position #7: Entry ID β†’ (745) (Segment: 5352709476)

Position #8: Entry ID β†’ (745) (Segment: 3527094763)

Position #9: Entry ID β†’ (743) (Segment: 5270947638)

Position #10: Entry ID β†’ (735) (Segment: 2709476380)

SHA-256 Hash: 141de333ca5c352ff70da947d638af07a4b872f9016d56d462241f67f496d618

If the output matches the official round results, it confirms that the protocol executed correctly and fairly.

This tool uses only basic hashing and modulo math β€” no proprietary software or hidden logic is involved.

πŸ›  How to Manually Verify the System is 100% Fair

Anyone can verify the fairness of the system using just a calculator!

1️⃣ Generate the SHA-256 hash of the ticket list using an online tool.

2️⃣ Compare the generated hash with the one displayed on the site (They MUST match).

3️⃣ Extract the first 10 numeric digits from the hash.

We extract the first 10 numeric digits from the hash to determine the first winning ticket.

Then, we slide the extraction window by 1 position for each next winner, ensuring that every position is uniquely determined.

4️⃣ Apply the Winning Ticket Formula for Each Position.

Each extracted number is used in this formula:

Winning Ticket = (Extracted Number % Total Tickets) + First Ticket Number

This ensures that every extracted value falls within the valid ticket range and follows a reproducible process.

5️⃣ Cross-check the winning tickets against the published results to confirm accuracy.

🌐 About the Universal Fairness Protocol (UFP)

The Universal Fairness Protocol (UFP) is more than just a fairness engine β€” it's a fully modular, cryptographically enforced framework for real-time, trustless outcome resolution.

Designed for developers, systems integrators, and high-stakes platforms, UFP introduces a **plug-and-play foundation** that allows custom entry logic, external applications, and third-party tools to connect seamlessly to a central fairness core.

Whether you're building check-in campaigns, prediction games, lotteries, airdrops, or user engagement contests, UFP ensures that every entry, result, and reward is verifiable β€” by anyone.

At the heart of the system is a mantra that defines its philosophy and flow:

Live List = Final List β†’ Final List = SHA-256 Hash β†’ SHA-256 Hash = Segment β†’ Segment = Public Formula β†’ Public Formula = Winner

This mantra encapsulates the entire lifecycle of a round β€” from live entry logging, to segment extraction, to final outcome generation. Every step is **public**, **mathematical**, and **immutable**.

Built with extensibility in mind, UFP includes a core engine with support for addons that can be stacked on top of the base without modifying core files. Developers can create any number of addons β€” from simple check-in modules to complex reward systems β€” while inheriting the fairness and automation of the main engine.

The system is designed to run indefinitely, with rounds starting and ending automatically using cron-based automation. Outcomes are resolved via deterministic SHA-256 hashing and a publicly known resolution formula, eliminating all forms of backend manipulation.

Most importantly, UFP is built on a single principle: Trust Nothing β€” Verify Everything. From live snapshots to final hashes, from segment extraction to winner placement, UFP makes sure that **you don’t need to believe it works β€” you can prove it does.**

πŸ§‘β€πŸ’» Developer Integration & Addon System

The Universal Fairness Protocol (UFP) is engineered to support modular, addon-based development. This tab provides a comprehensive guide for developers who want to extend or integrate custom features while inheriting the core fairness logic of the system.

πŸ“ Addon File Structure

Each addon must reside in /addons/your_addon_name/ and follow the standard structure:

  • /addons/your_addon_name/widgets/ β€” for front-end content shown on the homepage. Only PHP files that include the word "widget" in their filename will be auto-loaded. Example: stats_widget.php βœ… | example.php ❌
  • /addons/your_addon_name/system/ajax_cases.php β€” for handling custom AJAX requests
  • /addons/your_addon_name/admin/settings.php β€” for rendering the addon's admin panel

These folders and files are automatically discovered by the UFP core β€” no need to register them manually, as long as they are placed correctly and named properly. Specifically: /addons/your_addon_name/widgets/ is injected directly into the homepage via the core home.php file; /addons/your_addon_name/system/ajax_cases.php is dynamically loaded by the core /system/ajax.php when it encounters an unknown action; and /addons/your_addon_name/admin/settings.php is displayed inside the core /admin/settings.php panel using a dynamic iframe loader. This modular architecture allows developers to extend functionality without modifying any core files.

βš™οΈ AJAX Integration via ajax_cases.php

The UFP core dynamically loads ajax_cases.php files from each addon if an unknown action is encountered.

How it works:

  1. Core ajax.php receives a POST request
  2. If $action is unrecognized, it loops through all ajax_cases.php files
  3. If your addon matches the $action, set $handled = true; and respond using safe_json_response([...])
// Example Template:
            if (!isset($action)) return;
            
            if ($action === 'my_action') {
                $handled = true;
                safe_json_response(['status' => 'success']);
            }

🏠 Front-End Widget Support

To display custom content on the homepage, add PHP files to the following directory:

/addons/your_addon_name/widgets/

Important: Only files that contain the word widget in their filename will be auto-included (e.g., stats_widget.php βœ…, example.php ❌).

These files are automatically injected into the homepage’s β€œAddon Widgets” section by the UFP core β€” no registration or manual linking required.

Each file should be a self-contained HTML/PHP partial and will render in the order it appears in the directory scan.

🧾 Ticket Insert Requirements

If your addon awards entries, you must insert into:

current_round_tickets

Required Format:

$stmt = $db->prepare("INSERT INTO current_round_tickets (round_id, user_id, date) VALUES (?, ?, ?)");
            $stmt->bind_param("iii", $round_id, $user_id, time());
            $stmt->execute();
            

Failure to insert into this table means your addon is not injecting into the Universal Fairness Protocol's automatic system β€” the user’s entry will be ignored, and they will not appear in the round, hash, or reward calculations.

πŸ•’ Cron Job Requirement

The Universal Fairness Protocol relies on automated tasks to handle round locking, winner resolution, and rehash fallbacks. To ensure everything functions correctly, you must run the following file once every minute:

/cron/cron.php

This file powers all core time-based automation. Without it, rounds will not finalize, and winners will not be calculated.

It is your responsibility to configure your server or hosting panel to execute this script via a scheduled task (cron).

🧠 Reward Logic & Display

The system supports two reward types:

  • Payout Mode: Admin defines percentages in settings.payouts
  • Reward Mode: Admin defines custom labels in settings.reward_labels

Mode is controlled by settings.use_custom_rewards (0 = payout, 1 = label).

Formatting is handled using:

  • reward_prefix β€” e.g., "$"
  • reward_suffix β€” e.g., "Points"
  • prefix_or_suffix β€” 1 for prefix, 2 for suffix

JavaScript dynamically applies this using formatReward() to prevent hardcoding.

🏷 Middle Text for Tickets

Each entry in current_round_tickets uses a full token format:

User-ID-24:Check-In-739

The middle segment is controlled by:

settings.ticket_middle_text

Rules:

  • Must not start with a colon
  • Must not end with a dash
  • No spaces allowed (use dashes)

πŸ“¦ Installation Guide

This guide walks you through installing the Universal Fairness Protocol (UFP), setting up the database, running cron jobs, and activating optional simulation addons.

πŸ“ File Structure
  • /install/database.sql β€” Core system SQL (required)
  • /addons/checkin_sim/install/database.sql β€” Check-In addon (optional)
  • /addons/lottery_sim/install/database.sql β€” Lottery simulation addon (optional)
  • /addons/task_sim/install/database.sql β€” Task simulation addon (optional)
πŸ”§ Step 1: Create a New Database

Create an empty MySQL or MariaDB database using your hosting panel (e.g., cPanel) or command line:

CREATE DATABASE ufp_database_name;
πŸ“₯ Step 2: Import the Core SQL

Import the main UFP schema located at:

/install/database.sql

You can import it using a tool like phpMyAdmin or the command line:

mysql -u your_user -p ufp_database_name < /path/to/install/database.sql
πŸ“‚ Step 3: Import Addon SQL Files (Optional)

If you're using any simulation addons, import their corresponding SQL files as well:

  • /addons/checkin_sim/install/database.sql
  • /addons/lottery_sim/install/database.sql
  • /addons/task_sim/install/database.sql

These should be run in the same database used for the UFP core.

πŸ›  Step 4: Configure Database Connection

Update your connection settings in /db/database.php:

$db_host = 'localhost';
            $db_user = 'your_user';
            $db_pass = 'your_password';
            $db_name = 'ufp_database_name';
πŸ•’ Step 5: Cron Job Requirement

The Universal Fairness Protocol relies on automated tasks to handle round locking, winner resolution, and rehash fallbacks. To ensure everything functions correctly, you must run the following file once every minute:

/cron/cron.php

This file powers all core time-based automation. Without it, rounds will not finalize, and winners will not be calculated.

It is your responsibility to configure your server or hosting panel to execute this script via a scheduled task (cron).

πŸ“Œ Final Notes
  • Make sure your PHP version is 8.1 or higher
  • Set file permissions so your web server can read/write if needed
  • Use /info.php to access live documentation and verification tools
  • Addons are plug-and-play β€” no manual linking required
πŸ”‘ Default Admin Access

A default test admin user is included to help you get started:

  • Username: admin
  • Password: 12345

If you'd like to create your own admin account, simply register a new user through the frontend, then update that user's record in the users table by setting is_admin from 0 to 1.

For full documentation, visit https://universalfairnessprotocol.org or contact [email protected]

πŸ“œ License Information

The Universal Fairness Protocol (UFP) is dual-licensed under:

πŸ‘‰ Commercial licenses are available at:
https://dgtalfairness.gumroad.com/l/UFP

Unauthorized commercial usage without a license is prohibited.