> For the complete documentation index, see [llms.txt](https://smart-global.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://smart-global.gitbook.io/docs/architecture-and-economics/binary-plan-logic.md).

# 👥 Binary Plan Logic

## Technical Reference: Binary Plan Logic & Mathematics

### 1. Revenue Philosophy Based on Blockchain Educational Sales

The revenue plan of the Smart Global ecosystem operates on an automated binary (two-branched) structure. Commissions and matching bonuses are funded by liquidity generated from the sale of educational packages. Network registration, point calculations, and commission distributions are executed directly on the BNB Smart Chain via the `SmartGlobalPay` smart contract, replacing centralized server calculations.

### 2. Liquidity Flow and Binary Reward Pool Backing

The fee for purchasing an educational package from the payment gateway (`SmartGlobalPay`) is 100 USDT, which the smart contract allocates as follows:

* Treasury Allocation (9 USDT): Routed to the central treasury (`SmartGlobalBank`) to support ecosystem operations.
* Reward Pool Allocation (91 USDT): Retained within the `SmartGlobalPay` contract to fund the binary reward distributions for active promoters during the distribution cycles.

### 3. Point Generation and Network Tree Expansion

The sale of an educational package triggers a 3-stage process on the blockchain:

* Stage 1 (Point Creation): Upon the purchase of an educational package, 1 binary point is generated within the smart contract.
* Stage 2 (Placement): The point is placed in either the right direct leg (`rightDirect`) or left direct leg (`leftDirect`) of the referrer's node.
* Stage 3 (Upward Traversal): The generated point ascends through the binary tree, updating the volume variables (`currentLeft` and `currentRight`) for all upline nodes up to the root.

### 4. Hourly Commission and Equilibrium Reward Distribution Cycle

The matching reward distribution operates on a scheduled cycle (every 1 hour) via the `payReward` function. This process consists of 4 steps:

* Step 1 (Promoter Qualification): The system evaluates the left and right leg states of users. A user holding at least 1 point in both the left and right legs qualifies for the commission cycle.
* Step 2 (Dynamic Point Value Calculation): The value per matched point is calculated each cycle. The formula divides the USDT available in the reward pool (minus caller incentives) by the total matched equilibrium points across the network during that cycle.
* Step 3 (Reward Payout): The user's financial share (hourly matched pairs multiplied by the calculated point value) is transferred directly to their Web3 wallet. For members of the 100-point club, the system deducts a 10% fee from the commission to fund network development.
* Step 4 (Point Settlement): Following the payout, the smart contract manages the processed points:
  * *Matched Points:* Points that successfully paired and generated rewards are deducted from both legs and zeroed out.
  * *Unmatched Points:* Surplus points in the stronger leg without a matching pair are retained in the contract state to balance against future sales volume.

### 5. Defensive Shield and Payout Cap

To manage budget constraints and protocol sustainability, the `SmartGlobalPay` contract implements an equilibrium payout cap (`_getOwnerPoint`) during reward calculations:

* Standard Limit (5 Matches): By default, the system caps the calculable matches at a maximum of 5 equilibrium points per reward cycle.
* Upgraded Limit (10 Matches): Users who activate the `maxPoint` function—by verifying at least one direct downline in each leg (left and right) holding a minimum of 100 historical points—upgrade their calculable ceiling to 10 matched points per cycle.

This mechanism restricts the maximum liquid outflow from the contract treasury during high-volume periods.
