MMashDiv

MLM & Affiliate System 6.2.5

Latest

20 October 2026

This release has upgrade notes. Read them before updating — they describe behaviour changes that need your attention.

APPLICATIONSREFERRAL CODESREFERRAL PROGRAMCONDITIONSVISIBILITY

MLM & Affiliate System v6.2.5

Release Date: October 20, 2026 Tags: APPLICATIONS, REFERRAL CODES, REFERRAL PROGRAM, CONDITIONS, VISIBILITY

Overview

Affiliates can now apply, choose their own referral code, and keep the commission rates to themselves. A new Require Affiliate Applications switch makes members apply, and be approved, before they earn the Affiliate Program's commissions. Everyone else is placed in a new Referral Program of one-time rewards, shared with the friend they refer. An approved affiliate can choose a personal code such as JEFF20 that anyone can type on the sign-up page, and a new Show Commissions switch keeps the rates, the leaderboard and the payout totals from everyone who is not an affiliate.

You can also build your own commission conditions and choose how often each pays: every time, every N days against a target, or once.

Both switches default to how the add-on behaved before, so nothing changes until you turn one on. Read Upgrade Notes before you turn on applications: it stops commissions for every referrer who is not an approved affiliate.

Requires Core v6.8.7: the sign-up page's code field is in it, and so are the language files with the 168 new texts.

Update Instructions

pnpm updator

It adds the mlm_affiliate table and seven columns to mlm_referral_condition on its own, then runs the seeder, which adds the three Referral Program conditions (switched off). If your .env has DB_SYNC="none", nothing adds the table and the columns: create them as initial.sql defines them, then run pnpm seed. The new texts are in English in all 90 languages until they are translated.


Upgrade Notes

Turning on Require Affiliate Applications stops commissions for everyone who is not an approved affiliate

The switch takes effect on the next transaction. A referrer who is not an approved affiliate stops earning the Affiliate Program's commissions at that moment: their referrals' activity pays the Referral Program's one-time rewards instead, and a referrer with none of those conditions switched on is paid nothing. A member who chose a personal code while the program was open was approved by doing so, so they are already on the list and keep earning.

Approving someone later does not pay what they missed on the conditions that are paid at an event (a deposit, a trade, a stake). A condition on a schedule is read from the friend's activity instead, so the first hourly run after the approval pays its current and previous period, and a one-time scheduled condition pays on everything the friend has done to date.

  • Before you turn it on, open Admin → Affiliate → Program → Rewards, note who has earned, and add each of them on Admin → Affiliate → Applications with Add an affiliate. They are told they were approved.
  • Turning it off again returns every member to the Affiliate Program at once. Applications and approvals stay in the table.

The seeded volume bonuses are still wrong on an existing install

A fresh install now seeds SPOT_TRADE_VOLUME, MONTHLY_TRADE_VOLUME and FUTURES_VOLUME with their 500 or 1,000 as a target, and the rules meant to be monthly (those three and BINARY_WIN_COMMISSION) with a monthly period. The seeder does not change the values of a row that exists, so an existing install keeps what it had: the figure as a floor on each transaction, so one trade of 500 pays the "monthly total" bonus, and a daily period, so it can pay every day. The only row it touches is WELCOME_BONUS and FIRST_DEPOSIT_BONUS, which it sets to one time (see Changed).

  • Open those four rules and set Calendar period to Monthly. On the three volume bonuses, also move the figure out of Minimum amount and into Target; BINARY_WIN_COMMISSION keeps its minimum, which really is a floor on each win. All four are switched off unless you switched them on.

Referral Program conditions are switched off

REFERRAL_WELCOME_BONUS (5 USDT to the friend on the first USDT deposit that reaches 100), REFERRAL_DEPOSIT_BONUS (5% each on the first deposit that reaches 10) and REFERRAL_COPY_TRADING_BONUS (5 USDT each when the friend starts copy trading) are seeded off, like every condition that spends money you have not chosen to spend. Set the amounts and switch on the ones you will honour on Admin → Affiliate → Program → Conditions → Referral Program. They pay nobody while applications are not required.

Permissions

There are no new permission keys. Admin → Affiliate → Applications uses the referral keys, so edit.affiliate.referral now also decides who is an affiliate. Deleting a condition needs edit.affiliate.condition.


Added

Affiliate applications

  • Added Require Affiliate Applications on Settings. Off, and when it has never been saved, every signed-in member is an affiliate, as before. On, only a member whose application is approved is.
  • Added the member's application page at /affiliate/apply: an optional "How will you promote us?" box of up to 1,000 characters, then the status of the application: under review, approved, or not approved with the team's note and the form again. A member who is not yet approved sees the same panel in place of the Affiliate dashboard, and in place of the Commission Rates page when the rates are hidden from them. Apply now replaces the join button on the Affiliate page.
  • Added Admin → Affiliate → Applications. It opens on the members waiting, oldest first. Approve, reject (with a reason), revoke an approved affiliate (with a reason), reconsider a rejected one, decide a selection of up to 100 with one reason, Add an affiliate without an application, and delete a standing for good. The member is told of every decision that changes their standing, and every user whose role includes edit.affiliate.referral is told when a member applies.

Personal referral codes

  • Added a Your personal referral code card on an approved affiliate's dashboard. A code is 3 to 32 letters, numbers, hyphens or underscores, starting with a letter or number; case does not matter and it is stored in capitals. The card checks the code as the affiliate types, and a taken, reserved or malformed code says why. NULL, UNDEFINED, NONE, TRUE, FALSE, ADMIN, ADMINISTRATOR, SUPPORT, STAFF, OFFICIAL and MODERATOR cannot be taken.
  • Added the code to the affiliate's links: once chosen, the dashboard and the Link Generator build …/register?ref=JEFF20, and /ref/JEFF20 works. The link built from the user id keeps working for everything already shared.
  • Added an optional Referral code field to the sign-up page, opened by Have a referral code? or already filled in by a link. It shows You Were Referred By and the referrer's username, or says the code is not recognised; an unrecognised code does not block the sign-up and credits nobody. A revoked or rejected affiliate's code stops resolving at once.

Show Commissions

  • Added Show Commissions on Settings, Commission tab. On, and when it has never been saved, the rates are public, as before. Off, only a member who counts as an affiliate sees them. Anyone else gets a short description of the program and Apply now (Join the program where applications are not required) on the Affiliate page, an explanation in place of the Commission Rates page, and no rate, leaderboard, payout total or recent reward in the answer the server sends; the public statistics route reports zero for total paid out and average earnings. The homepage's Affiliate Program tile drops its Rewards Paid figure for everyone.

The Referral Program

  • Added the Referral Program for members who are not affiliates, at /affiliate/referral-program, linked from Services → Referral Program and the footer. It runs only while applications are required. It shows the member's own link and the one-time rewards you have switched on, each with what the member earns and what their friend earns, and says when none is running. An approved affiliate is told their referrals pay the Affiliate Program's commissions instead.
  • Added three seeded conditions for it (see Upgrade Notes). A Referral Program condition is always one-time, pays the direct sponsor only whatever structure the Affiliate Program runs, and does not compete with Affiliate Program conditions in the overlap guard.

Conditions you build yourself

  • Added New condition on Admin → Affiliate → Program → Conditions, and a Program and schedule group on every condition. Program is the Affiliate or the Referral Program. Paid when is an event (a friend's first deposit, a friend starts copy trading, a stake, a P2P trade, a store purchase, an ICO contribution, an AI plan or a general investment, a futures trade, an NFT purchase or sale, a binary win) or a schedule read from the friend's activity. How often it pays is every time, every N days, or one time.
  • Added the every-N-days schedule: once per N-day window, counted from the day each referral began, in which the friend's activity reaches a Target, for up to a number of windows you choose or without limit. Added Target, the friend's activity a window has to add up to, apart from the existing minimum, which is a floor on each transaction.
  • Added a Friend's share: what the referred member earns as well, in the same type and currency, as its own reward on their account with a "Referral Bonus Earned" notification. A 5% reward with a 5% share is a 10% bonus split between the two. The maximum commission rate caps the share as well as the reward.
  • Added deleting a condition from its header, only when it is switched off and no reward has ever been written under it.

Changed

How a condition is created and read

  • Changed the create and edit routes: a condition's minimum amount, calendar period and the new fields are accepted on create, where the minimum used to be ignored and the period could not be set at all. A save is judged on the whole row, and a rule the engine cannot pay is refused with the reason: an interval on a rule paid at an event, a one-time percentage on a scheduled rule, a target on an event rule, a Referral Program rule that is not one-time, a rule that pays neither the referrer nor the friend.
  • Changed the two first-deposit bonuses, WELCOME_BONUS and FIRST_DEPOSIT_BONUS, to read One time on the screen. They are paid once per member; the screen no longer says otherwise, and the schedule on these two is fixed.
  • Changed the hourly job to evaluate the new schedules, to leave out Referral Program conditions while applications are not required, and to treat any rule that rides an event (Paid when) as paid at the event. Rewards and idempotency keys already written are unchanged, so the update pays nothing twice.
  • Changed the Require Approval description to say what it does: each new referral starts pending. It never decided whether the member who shared the link may earn commissions; the new switch does.
  • Changed the Commission Rates page and the Affiliate page to list the Affiliate Program's conditions only.

Fixed

The seeded volume bonuses paid for a single trade, daily

The three seeded volume bonuses stored their 500 or 1,000 as a floor on each transaction, so one qualifying trade paid a bonus described as a monthly total, and the seeder left the calendar period out of its insert, so every rule meant to be monthly was created daily.

  • Fixed the seeder for a fresh install: the figure is the target and the monthly rules are monthly. An install that already has the rows keeps them; see Upgrade Notes.