Plan lab: honest licence booking, licence levels kept after the replay, unsponsored joins under the top position, sponsor leg obeys the gap toggle, pool-only members no longer count as paid

- Licence value now books the money each leg actually moved for it (its own share of the level), not the full level price; labelled "licence value funded" with a note on what a licence-granted level costs the system
- gStartRun: after replaying an org, money counters reset but members keep every level they hold, licence-won ones included, and keep what they actually paid in
- Joins with no recruiter go to the top position (spread placement) instead of the earliest member with one recruit, which qualified members who never brought a second
- Sponsor-leg licences respect the gap toggle (skip vs fund), like the depth leg
- "Paid" counts cash or entry share only; pool-only members are reported apart
- The climb and the drawn tree are labelled as simplified depth-only illustrations; headline numbers come from the month-by-month run
- Cache tag bumped

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-10-15 17:09:40 -05:00
parent be268beb66
commit 0db7c94728
2 changed files with 44 additions and 38 deletions
+35 -29
View File
@@ -597,11 +597,11 @@
c.depth++; c.nodes = next;
}
}
// an entry: placed breadth-first under the recruiter (or assigned to a member short of a direct), paid, split
// an entry: placed under the recruiter by the placement rule (no recruiter: under the top position), paid, split
function gJoin(recruiter, month, unsponsored){
if (!recruiter) { // assigned: earliest member with one recruit, else earliest with none (never you)
recruiter = G.members.find(x => x !== G.you && x.directs === 1) || G.members.find(x => x !== G.you && x.directs === 0) || G.you;
}
// no recruiter: the top position (the company, in the InstantAdPay view) recruits them, placed by the spread rule.
// FIXED 15 Oct: they used to go to the earliest member with one recruit, which qualified members who never recruited a second.
if (!recruiter) recruiter = G.you;
const parent = gSlot(recruiter);
const m = gAdd(parent, recruiter, month); m.unsponsored = !!unsponsored;
recruiter.directs++; recruiter.mDirects++;
@@ -629,7 +629,7 @@
let cur = from.recruiter;
while (cur) {
if (cur.level >= L) { if (gCashOk(cur, origin, L)) return { to: cur, kind: 'cash' }; }
else if (!rem) { const licOk = cur.directs >= 2 || PLAN.unq === 'licence'; if (licOk) return { to: cur, kind: 'lic' }; }
else if (!rem) { const behindOk = PLAN.gap === 'fund' || cur.level >= L - 1, licOk = cur.directs >= 2 || PLAN.unq === 'licence'; if (behindOk && licOk) return { to: cur, kind: 'lic' }; } // FIXED 15 Oct: the gap toggle applies to this leg too
cur = cur.recruiter;
}
return { to: null };
@@ -640,9 +640,9 @@
if (!r.to) { G.aud.above += amt; G.aud.received += amt; G.mon.above += amt; return; }
if (r.kind === 'cash') { r.to.cash += amt; r.to.sp += amt; G.mon.sp += amt; G.aud.received += amt; return; }
// each leg funds licences at its own share of the price: this leg's licence costs the sponsor share of level n,
// and that cost climbs the sponsor line. A licence is still a full level (licV records its full value).
// and that cost climbs the sponsor line. The holder gets the full level; licV records only the money that moved for it.
const n = r.to.level + 1, cost = net(n) * PLAN.sponsor;
r.to.level = n; r.to.lic++; r.to.licV += net(n); G.mon.lics++; G.mon.licV += net(n);
r.to.level = n; r.to.lic++; r.to.licV += cost; G.mon.lics++; G.mon.licV += cost; // FIXED 15 Oct: book what this leg moved for it, not the full level
gPayS(r.to, n, cost, origin, false);
if (amt - cost > 0.005) gPayS(r.to, L, amt - cost, origin, true);
}
@@ -663,7 +663,7 @@
if (!r.to) { G.aud.above += amt; G.aud.received += amt; G.mon.above += amt; return; }
if (r.kind === 'cash') { r.to.cash += amt; r.to.dc += amt; G.mon.dc += amt; G.aud.received += amt; return; }
const n = r.to.level + 1, cost = net(n) * (1 - PLAN.sponsor); // the depth leg's share of level n; with the sponsor leg off this is the whole price, as before
r.to.level = n; r.to.lic++; r.to.licV += net(n); G.mon.lics++; G.mon.licV += net(n);
r.to.level = n; r.to.lic++; r.to.licV += cost; G.mon.lics++; G.mon.licV += cost; // FIXED 15 Oct: book what this leg moved for it, not the full level
gPay(r.to, n, cost, n - 2, origin, false);
if (amt - cost > 0.005) gPay(r.to, L, amt - cost, 0, origin, true);
}
@@ -700,22 +700,28 @@
for (const r of rows) { const rec = map.get(r[1]); const m = gJoin(rec && rec !== G.you ? rec : (r[1] === SEED.apex ? G.you : null), 0, !rec); map.set(r[0], m); m.seedLevel = r[2]; }
for (let L = 2; L <= PLAN.maxL; L++) for (const m of G.members.slice().sort((a, b) => a.depth - b.depth || a.id - b.id)) if (m !== G.you && (m.seedLevel || 1) >= L && m.level < L) gBuy(m, L);
}
// Start over means start over (Marty, 28 Sep): the replay above only builds the org. Its money is reported once,
// in the story head, then every counter goes back to zero and members keep only the levels they actually bought.
G.replay = { in: G.aud.spent, admin: G.aud.admin + G.aud.entryFee, you: G.you.cash + G.you.entry, youLevel: G.you.level };
for (const m of G.members) { m.cash = 0; m.entry = 0; m.pool = 0; m.spent = 0; m.dc = 0; m.lic = 0; m.licV = 0; m.level = m === G.you ? 1 : (m.seedLevel || 1); if (m !== G.you) for (let L = 1; L <= m.level; L++) m.spent += price(L); } // what their bought levels cost at these prices
// Your levels bought up front (Marty, 28 Sep): start the run holding them, paid with your own money before month 1.
const preSel = document.getElementById('gYouLevels'); G.youPre = Math.min(PLAN.maxL, Math.max(1, Number(preSel && preSel.value) || 1));
G.you.level = G.youPre; G.you.spent = 0; for (let L = 1; L <= G.youPre; L++) G.you.spent += price(L);
G.aud = { spent: 0, received: 0, admin: 0, entryFee: 0, above: 0, pool: 0 }; G.poolCarry = 0; gNewMonth();
G.rows.push(gSnap(0));
const ol = document.getElementById('gStory'); if (ol) ol.innerHTML = '<li class="head">' + (seed === 'iap' ? 'Start: the InstantAdPay org today, placed 4-wide under each member\u2019s real recruiter: <b>' + cnt(G.members.length - 1) + ' members</b>, ' + cnt(G.members.filter(x => x.level >= 2).length) + ' of them past level 1 (the levels they actually bought), ' + cnt(G.members.filter(x => x.directs >= 2).length) + ' qualified. Every counter starts at zero and counts only what happens from month 1. For reference, had these rules been running all along, their past purchases would have moved <b>' + $$(G.replay.in) + '</b>, put <b>' + $$(G.replay.admin) + '</b> in the admin wallet and <b>' + $$(G.replay.you) + '</b> to you, funding you to level ' + G.replay.youLevel + '.' + (G.youPre > 1 ? ' <b>You start at level ' + G.youPre + '</b>, bought up front for ' + $$(G.you.spent) + '.' : '') : 'Start: just you at level ' + G.youPre + (G.youPre > 1 ? ' (bought up front for ' + $$(G.you.spent) + ')' : '') + ', nobody under you yet. In month 1 you recruit two people yourself (everyone needs two to receive cash at full reach); after that the org grows the way InstantAdPay’s did.') + ' Now run a month.</li>';
gStartRun();
const ol = document.getElementById('gStory'); if (ol) ol.innerHTML = '<li class="head">' + (seed === 'iap' ? 'Start: the InstantAdPay org today, placed 4-wide under each member\u2019s real recruiter: <b>' + cnt(G.members.length - 1) + ' members</b>, ' + cnt(G.members.filter(x => x.level >= 2).length) + ' of them past level 1 (the levels they hold: bought, or funded by licences when the past purchases were replayed), ' + cnt(G.members.filter(x => x.directs >= 2).length) + ' qualified. Every counter starts at zero and counts only what happens from month 1. For reference, had these rules been running all along, their past purchases would have moved <b>' + $$(G.replay.in) + '</b>, put <b>' + $$(G.replay.admin) + '</b> in the admin wallet and <b>' + $$(G.replay.you) + '</b> to you, funding you to level ' + G.replay.youLevel + '.' + (G.youPre > 1 ? ' <b>You start at level ' + G.youPre + '</b>, bought up front for ' + $$(G.you.spent) + '.' : '') : 'Start: just you at level ' + G.youPre + (G.youPre > 1 ? ' (bought up front for ' + $$(G.you.spent) + ')' : '') + ', nobody under you yet. In month 1 you recruit two people yourself (everyone needs two to receive cash at full reach); after that the org grows the way InstantAdPay’s did.') + ' Now run a month.</li>';
gRender();
window.growAudit = () => ({ spent: Math.round(G.aud.spent), received: Math.round(G.aud.received), ok: Math.abs(G.aud.spent - G.aud.received) <= 0.01 + 1e-9 * G.aud.spent });
}
// Start over means start over (Marty, 28 Sep): the replay only builds the org. Its money is reported once, in the
// story head, then every money counter goes back to zero. FIXED 15 Oct: members KEEP the levels they hold, including
// levels their team funded with licences during the replay (those were discarded before), and `spent` keeps what each
// actually paid in during the replay (entry + the levels they bought, never the licence-won ones).
function gStartRun(){
G.replay = { in: G.aud.spent, admin: G.aud.admin + G.aud.entryFee, you: G.you.cash + G.you.entry, youLevel: G.you.level };
for (const m of G.members) { m.cash = 0; m.entry = 0; m.pool = 0; m.dc = 0; m.sp = 0; m.lic = 0; m.licV = 0; }
// Your levels bought up front (Marty, 28 Sep): start the run holding them, paid with your own money before month 1.
const preSel = document.getElementById('gYouLevels'); G.youPre = Math.min(PLAN.maxL, Math.max(1, Number(preSel && preSel.value) || 1));
const won = G.you.level; G.you.level = Math.max(won, G.youPre); G.you.spent = price(1); for (let L = Math.max(2, won + 1); L <= G.youPre; L++) G.you.spent += price(L);
G.aud = { spent: 0, received: 0, admin: 0, entryFee: 0, above: 0, pool: 0 }; G.poolCarry = 0; gNewMonth();
G.rows = [gSnap(0)];
}
const earned = x => x.cash + x.entry; // paid by the plan itself; the pool is reported apart (FIXED 15 Oct)
function gSnap(month){
const ms = G.members.filter(x => x !== G.you);
const grp = f => { const g = ms.filter(f), v = g.map(x => inc(x)).sort((a, b) => b - a); const total = v.reduce((a, b) => a + b, 0); return { n: g.length, paid: g.filter(x => inc(x) > 0).length, total, avg: g.length ? total / g.length : 0, median: v.length ? v[Math.floor(v.length / 2)] : 0, top: v[0] || 0, lic: g.reduce((a, x) => a + x.lic, 0), pool: g.reduce((a, x) => a + x.pool, 0), spent: g.reduce((a, x) => a + x.spent, 0), poolPaid: g.filter(x => x.pool > 0).length }; };
const grp = f => { const g = ms.filter(f), v = g.map(x => inc(x)).sort((a, b) => b - a); const total = v.reduce((a, b) => a + b, 0); return { n: g.length, paid: g.filter(x => earned(x) > 0).length, poolOnly: g.filter(x => earned(x) <= 0 && x.pool > 0).length, total, avg: g.length ? total / g.length : 0, median: v.length ? v[Math.floor(v.length / 2)] : 0, top: v[0] || 0, lic: g.reduce((a, x) => a + x.lic, 0), pool: g.reduce((a, x) => a + x.pool, 0), spent: g.reduce((a, x) => a + x.spent, 0), poolPaid: g.filter(x => x.pool > 0).length }; };
let topB = null; for (const x of ms) if (!topB || x.mDirects > topB.mDirects) topB = x;
const b20 = ms.filter(x => x.mDirects >= 20);
const extra = { sp: G.mon.sp, pool: G.mon.pool, poolPaid: G.mon.poolPaid, poolN: G.mon.poolN, poolNew: G.mon.poolNew, poolNewAvg: G.mon.poolNewAvg, dc: G.mon.dc, en: G.mon.en, licV: G.mon.licV, heavy: grp(x => x.directs >= 10), light: grp(x => x.directs >= 1 && x.directs < 10), passive: grp(x => x.directs === 0),
@@ -723,7 +729,7 @@
b20: { n: b20.length, avg: b20.length ? b20.reduce((a, x) => a + inc(x) - x.m0, 0) / b20.length : 0 } };
return { ...extra, month, joins: G.mon.joins, assigned: G.mon.assigned, buys: G.mon.buys, lics: G.mon.lics, members: ms.length, in: G.mon.in, admin: G.mon.admin, above: G.mon.above,
toMembers: ms.reduce((a, x) => a + inc(x), 0), toYou: G.you.cash + G.you.entry, youLevel: G.you.level, youLic: G.you.lic,
paid: ms.filter(x => inc(x) > 0).length, l2: ms.filter(x => x.level >= 2).length, qualified: ms.filter(x => x.directs >= 2).length };
paid: ms.filter(x => earned(x) > 0).length, poolOnly: ms.filter(x => earned(x) <= 0 && x.pool > 0).length, l2: ms.filter(x => x.level >= 2).length, qualified: ms.filter(x => x.directs >= 2).length };
}
function gMonth(){
G.month++; gNewMonth();
@@ -752,7 +758,7 @@
const s = gSnap(G.month); G.rows.push(s);
const prev = G.rows[G.rows.length - 2];
const dYou = s.toYou - prev.toYou;
storyG('<b>Month ' + G.month + '.</b> ' + cnt(s.joins) + ' joined' + (s.assigned ? ', ' + cnt(s.assigned) + ' of them with no recruiter, assigned to members short of a direct' : '') + '. ' + cnt(s.buys) + ' bought a level with their own money and ' + cnt(s.lics) + ' licences were funded by pass-ups. Money in <b>' + $$(s.in) + '</b>: company <b>' + $$(s.admin) + '</b>, pool <b>' + $$(s.pool) + '</b>, the rest to members' + (s.above ? ' (' + $$(s.above) + ' climbed past you to the company)' : '') + '. You: <b>' + (dYou >= 0 ? '+' : '') + $$(dYou) + '</b>' + (s.youLevel > prev.youLevel ? ', and your team moved you to <span class="chip lic">level ' + s.youLevel + '</span>' : '') + '. ' + cnt(s.paid) + ' of ' + cnt(s.members) + ' members have been paid something; ' + cnt(s.l2) + ' are past level 1.' + (s.top ? ' <b>Heaviest builder this month:</b> #' + s.top.id + ' brought ' + cnt(s.top.n) + ' and made <b>' + $$(s.top.m) + '</b> this month (' + $$(s.top.total) + ' so far, level ' + s.top.level + ', ' + cnt(s.top.directs) + ' recruits in all).' : '') + (s.b20.n ? ' Builders who brought 20+ this month: ' + cnt(s.b20.n) + ', averaging <b>' + $$(s.b20.avg) + '</b> this month.' : '') + (s.sp ? ' Sponsor leg paid ' + $$(s.sp) + ' this month.' : '') + (s.poolPaid ? ' <b>Pool:</b> ' + $$(s.poolPaid) + ' split among ' + cnt(s.poolN) + ' active members, ' + $$(s.poolPaid / s.poolN) + ' each on average' + (s.poolNew ? '; ' + cnt(s.poolNew) + ' new members who finished training got about ' + $$(s.poolNewAvg) + ' each' : '') + '.' : ''), s.youLevel > prev.youLevel ? 'lic' : 'cash');
storyG('<b>Month ' + G.month + '.</b> ' + cnt(s.joins) + ' joined' + (s.assigned ? ', ' + cnt(s.assigned) + ' of them with no recruiter, placed under the top position (the company)' : '') + '. ' + cnt(s.buys) + ' bought a level with their own money and ' + cnt(s.lics) + ' licences were funded by pass-ups. Money in <b>' + $$(s.in) + '</b>: company <b>' + $$(s.admin) + '</b>, pool <b>' + $$(s.pool) + '</b>, the rest to members' + (s.above ? ' (' + $$(s.above) + ' climbed past you to the company)' : '') + '. You: <b>' + (dYou >= 0 ? '+' : '') + $$(dYou) + '</b>' + (s.youLevel > prev.youLevel ? ', and your team moved you to <span class="chip lic">level ' + s.youLevel + '</span>' : '') + '. ' + cnt(s.paid) + ' of ' + cnt(s.members) + ' members have been paid something; ' + cnt(s.l2) + ' are past level 1.' + (s.top ? ' <b>Heaviest builder this month:</b> #' + s.top.id + ' brought ' + cnt(s.top.n) + ' and made <b>' + $$(s.top.m) + '</b> this month (' + $$(s.top.total) + ' so far, level ' + s.top.level + ', ' + cnt(s.top.directs) + ' recruits in all).' : '') + (s.b20.n ? ' Builders who brought 20+ this month: ' + cnt(s.b20.n) + ', averaging <b>' + $$(s.b20.avg) + '</b> this month.' : '') + (s.sp ? ' Sponsor leg paid ' + $$(s.sp) + ' this month.' : '') + (s.poolPaid ? ' <b>Pool:</b> ' + $$(s.poolPaid) + ' split among ' + cnt(s.poolN) + ' active members, ' + $$(s.poolPaid / s.poolN) + ' each on average' + (s.poolNew ? '; ' + cnt(s.poolNew) + ' new members who finished training got about ' + $$(s.poolNewAvg) + ' each' : '') + '.' : ''), s.youLevel > prev.youLevel ? 'lic' : 'cash');
gRender();
}
function gVisuals(s){
@@ -762,27 +768,27 @@
const tot = parts.reduce((a, p) => a + p[1], 0) || 1;
flow.innerHTML = '<div style="display:flex;height:34px;border-radius:8px;overflow:hidden;border:1px solid var(--line)">' + parts.filter(p => p[1] > 0).map(p => '<div title="' + p[0] + ' ' + $$(p[1]) + '" style="width:' + (100 * p[1] / tot).toFixed(2) + '%;background:' + p[2] + '"></div>').join('') + '</div>'
+ '<div style="display:flex;flex-wrap:wrap;gap:8px 16px;margin-top:8px" class="note">' + parts.map(p => '<span><i style="display:inline-block;width:10px;height:10px;border-radius:2px;background:' + p[2] + ';margin-right:6px;vertical-align:middle"></i>' + p[0] + ' <b>' + $$(p[1]) + '</b> (' + Math.round(100 * p[1] / tot) + '%)</span>').join('') + '</div>'
+ '<p class="note" style="margin-top:6px">Money in this month <b>' + $$(s.in) + '</b>. Along the way ' + cnt(s.lics) + ' licences were funded, worth ' + $$(s.licV) + ' of levels nobody had to pay for.</p>';
+ '<p class="note" style="margin-top:6px">Money in this month <b>' + $$(s.in) + '</b>. Along the way ' + cnt(s.lics) + ' licences were granted (each one a full level for its holder); licence value funded: ' + $$(s.licV) + ', the money that actually moved for them. Each leg funds a licence at its own share of the price, so with the sponsor leg at ' + Math.round(PLAN.sponsor * 100) + '% a licence moves only part of a level’s price, and nobody pays the rest: that part of the level costs the system nothing and pays nobody.</p>';
const ms = G.members.filter(x => x !== G.you);
const med = arr => { const v = arr.slice().sort((a, b) => inc(a) - inc(b)); return v.length ? v[Math.floor(v.length / 2)] : null; };
let heavy = null; for (const x of ms) if (!heavy || x.directs > heavy.directs) heavy = x;
const light = med(ms.filter(x => x.directs >= 1 && x.directs < 10));
const oldP = ms.filter(x => x.directs === 0 && G.month - x.month >= 3), pas = med(oldP.length ? oldP : ms.filter(x => x.directs === 0));
const card = (title, x, why) => !x ? '' : '<div class="rule"><div class="n">' + title + '</div><h3>#' + x.id + ' \u00b7 level ' + x.level + ' \u00b7 ' + cnt(x.directs) + ' recruit' + (x.directs === 1 ? '' : 's') + '</h3><p>In since month ' + x.month + '. Paid in <b>' + $$(x.spent) + '</b>. Got back <b>' + $$(inc(x)) + '</b>: cash ' + $$(x.cash) + ' (sponsor leg ' + $$(x.sp) + ', depth ' + $$(x.dc) + '), entry shares ' + $$(x.entry) + ', pool ' + $$(x.pool) + '. ' + cnt(x.lic) + ' licence' + (x.lic === 1 ? '' : 's') + ' worth ' + $$(x.licV) + '. <b>Net ' + (inc(x) - x.spent >= 0 ? '+' : '\u2212') + $$(Math.abs(inc(x) - x.spent)) + '</b>' + (x.licV ? ' in cash, ' + (inc(x) + x.licV - x.spent >= 0 ? '+' : '\u2212') + $$(Math.abs(inc(x) + x.licV - x.spent)) + ' counting licences' : '') + '.</p><p class="note">' + why + '</p></div>';
const card = (title, x, why) => !x ? '' : '<div class="rule"><div class="n">' + title + '</div><h3>#' + x.id + ' \u00b7 level ' + x.level + ' \u00b7 ' + cnt(x.directs) + ' recruit' + (x.directs === 1 ? '' : 's') + '</h3><p>In since month ' + x.month + '. Paid in <b>' + $$(x.spent) + '</b>. Got back <b>' + $$(inc(x)) + '</b>: cash ' + $$(x.cash) + ' (sponsor leg ' + $$(x.sp) + ', depth ' + $$(x.dc) + '), entry shares ' + $$(x.entry) + ', pool ' + $$(x.pool) + '. ' + cnt(x.lic) + ' licence' + (x.lic === 1 ? '' : 's') + ', licence value funded ' + $$(x.licV) + '. <b>Net ' + (inc(x) - x.spent >= 0 ? '+' : '\u2212') + $$(Math.abs(inc(x) - x.spent)) + '</b>' + (x.licV ? ' in cash, ' + (inc(x) + x.licV - x.spent >= 0 ? '+' : '\u2212') + $$(Math.abs(inc(x) + x.licV - x.spent)) + ' counting licences' : '') + '.</p><p class="note">' + why + '</p></div>';
document.getElementById('gPeople').innerHTML = card('HEAVIEST BUILDER', heavy, 'The most personal recruits in the org.') + card('TYPICAL LIGHT BUILDER', light, 'The median member with 1 to 9 recruits.') + card('TYPICAL JOIN-AND-PAY MEMBER', pas, oldP.length ? 'The median member with no recruits, in for 3 months or more.' : 'The median member with no recruits.');
const row = (name, g) => '<tr><td style="text-align:left">' + name + '</td><td>' + cnt(g.n) + '</td><td>' + (g.n ? Math.round(100 * g.paid / g.n) : 0) + '%</td><td>' + $$(g.median) + '</td><td>' + $$(g.avg) + '</td><td>' + $$(g.top) + '</td><td>' + $$(g.n ? g.spent / g.n : 0) + '</td><td>' + cnt(g.poolPaid) + '</td><td>' + $$(g.pool) + '</td><td>' + cnt(g.lic) + '</td><td class="bar"><i style="width:' + Math.min(100, Math.round(100 * g.avg / Math.max(1, s.heavy.avg))) + '%"></i></td></tr>';
document.getElementById('gMix').innerHTML = '<table class="tabular"><thead><tr><th style="text-align:left">Group</th><th>Members</th><th>Paid anything</th><th>Median got back</th><th>Average</th><th>Top</th><th>Avg paid in</th><th>Got pool</th><th>Pool total</th><th>Licences</th><th></th></tr></thead><tbody>' + row('Builders, 10+ recruits', s.heavy) + row('Light builders, 1 to 9', s.light) + row('Join-and-pay, no recruits', s.passive) + '</tbody></table>';
document.getElementById('gMix').innerHTML = '<table class="tabular"><thead><tr><th style="text-align:left">Group</th><th>Members</th><th>Paid by the plan</th><th>Median got back</th><th>Average</th><th>Top</th><th>Avg paid in</th><th>Got pool</th><th>Pool total</th><th>Licences</th><th></th></tr></thead><tbody>' + row('Builders, 10+ recruits', s.heavy) + row('Light builders, 1 to 9', s.light) + row('Join-and-pay, no recruits', s.passive) + '</tbody></table>';
}
function storyG(html, cls){ const ol = document.getElementById('gStory'); if (!ol) return; const li = document.createElement('li'); if (cls) li.className = cls; li.innerHTML = html; ol.prepend(li); while (ol.children.length > 40) ol.removeChild(ol.lastChild); }
function gRender(){
const s = G.rows[G.rows.length - 1];
document.getElementById('gMonth').textContent = G.month; document.getElementById('gMembers').textContent = cnt(s.members) + ' members';
document.getElementById('gLevel').textContent = s.youLevel; document.getElementById('gLevelS').textContent = 'reach = depth 1 to ' + s.youLevel + ' \u00b7 ' + s.youLic + ' licence' + (s.youLic === 1 ? '' : 's') + ' funded for you';
document.getElementById('gYou').textContent = $$(s.toYou); document.getElementById('gYouS').textContent = 'cash ' + $$(G.you.cash) + ' + entries ' + $$(G.you.entry) + '; licences worth ' + $$(G.you.licV) + ' apart' + (G.you.spent ? ' \u00b7 paid ' + $$(G.you.spent) + (G.youPre > 1 ? ' up front for levels 1 to ' + G.youPre : ' for your entry') + ', net ' + (s.toYou - G.you.spent >= 0 ? '+' : '\u2212') + $$(Math.abs(s.toYou - G.you.spent)) : '');
document.getElementById('gYou').textContent = $$(s.toYou); document.getElementById('gYouS').textContent = 'cash ' + $$(G.you.cash) + ' + entries ' + $$(G.you.entry) + '; licence value funded ' + $$(G.you.licV) + ', apart' + (() => { const u = G.members.filter(x => x.unsponsored).length; return u ? ' · you are the top position, so the ' + cnt(u) + ' members who arrived with no recruiter are yours (in a launch that is the company’s position, so most of this is company money)' : ''; })() + (G.you.spent ? ' \u00b7 paid ' + $$(G.you.spent) + (G.youPre > 1 ? ' up front for levels 1 to ' + G.youPre : ' for your entry') + ', net ' + (s.toYou - G.you.spent >= 0 ? '+' : '\u2212') + $$(Math.abs(s.toYou - G.you.spent)) : '');
document.getElementById('gAdmin').textContent = $$(G.aud.admin + G.aud.entryFee);
document.getElementById('gPool').textContent = $$(G.members.reduce((a, x) => a + x.pool, 0)); document.getElementById('gPoolS').textContent = s.poolN ? 'this month ' + $$(s.poolPaid) + ' to ' + cnt(s.poolN) + ' active members' : (Math.round(PLAN.pool * 100)) + '% of every dollar, split by activity';
gVisuals(s);
document.getElementById('gPaid').textContent = cnt(s.paid); document.getElementById('gPaidS').textContent = 'of ' + cnt(s.members) + ' (' + (s.members ? Math.round(100 * s.paid / s.members) : 0) + '%) \u00b7 ' + cnt(s.qualified) + ' qualified';
document.getElementById('gPaid').textContent = cnt(s.paid); document.getElementById('gPaidS').textContent = 'of ' + cnt(s.members) + ' (' + (s.members ? Math.round(100 * s.paid / s.members) : 0) + '%) \u00b7 ' + cnt(s.qualified) + ' qualified' + (s.poolOnly ? ' · ' + cnt(s.poolOnly) + ' more got pool money only' : '');
document.getElementById('gIn').textContent = $$(G.aud.spent);
const tb = document.querySelector('#gTable tbody'); if (tb) { tb.innerHTML = ''; for (const r of G.rows) { const tr = document.createElement('tr'); tr.innerHTML = '<td>' + r.month + '</td><td>' + cnt(r.joins) + '</td><td>' + cnt(r.members) + '</td><td>' + cnt(r.buys) + '</td><td>' + $$(r.in) + '</td><td>' + $$(r.admin) + '</td><td>' + $$(r.in - r.admin - r.above) + '</td><td>' + $$(r.toYou) + '</td><td>' + r.youLevel + '</td><td>' + cnt(r.paid) + '</td><td>' + cnt(r.l2) + '</td>'; tb.appendChild(tr); } }
const sp = document.getElementById('gSpread');
@@ -791,13 +797,13 @@
const pct = (p) => ms.length ? ms[Math.min(ms.length - 1, Math.floor(ms.length * p))] : 0;
const top10 = ms.slice(0, Math.max(1, Math.round(ms.length * 0.1))).reduce((a, b) => a + b, 0), all = ms.reduce((a, b) => a + b, 0);
const lv = {}; for (const x of G.members) if (x !== G.you) lv[x.level] = (lv[x.level] || 0) + 1;
const older = G.members.filter(x => x !== G.you && G.month - x.month >= 6), olderPaid = older.filter(x => inc(x) > 0);
const older = G.members.filter(x => x !== G.you && G.month - x.month >= 6), olderPaid = older.filter(x => earned(x) > 0);
const olderVals = older.map(x => inc(x)).sort((a, b) => b - a), olderMed = olderVals.length ? olderVals[Math.floor(olderVals.length / 2)] : 0;
const carried = G.members.filter(x => x !== G.you && x.level >= 2 && !(x.bought || 0)).length, ownBuy = G.members.filter(x => x !== G.you && (x.bought || 0) > 0).length;
sp.innerHTML = 'Top earner in the org: <b>' + $$(ms[0] || 0) + '</b>. Top 10% of members took ' + (all ? Math.round(100 * top10 / all) : 0) + '% of what members received. Median member: <b>' + $$(pct(0.5)) + '</b>. Members with nothing: ' + cnt(ms.filter(v => v <= 0).length) + ' (most of them joined recently).'
sp.innerHTML = 'Top earner in the org: <b>' + $$(ms[0] || 0) + '</b>. Top 10% of members took ' + (all ? Math.round(100 * top10 / all) : 0) + '% of what members received. Median member: <b>' + $$(pct(0.5)) + '</b>. Members paid nothing by the plan (no cash, no entry share): ' + cnt(G.members.filter(x => x !== G.you && earned(x) <= 0).length) + ' (most of them joined recently), of whom ' + cnt(G.members.filter(x => x !== G.you && earned(x) <= 0 && x.pool > 0).length) + ' got pool money only.'
+ '<br><b>Members in for 6 months or more:</b> ' + cnt(older.length) + ', of whom ' + cnt(olderPaid.length) + ' (' + (older.length ? Math.round(100 * olderPaid.length / older.length) : 0) + '%) have been paid; their median is <b>' + $$(olderMed) + '</b>.'
+ '<br><b>Product without paying:</b> ' + cnt(carried) + ' members hold level 2 or higher purely from licences their team funded; ' + cnt(ownBuy) + ' bought at least one level themselves.'
+ (() => { const s0 = G.rows[G.rows.length - 1]; const line = (name, g) => '<br><b>' + name + ':</b> ' + cnt(g.n) + ' members, ' + cnt(g.paid) + ' paid (' + (g.n ? Math.round(100 * g.paid / g.n) : 0) + '%), median <b>' + $$(g.median) + '</b>, top ' + $$(g.top) + ', ' + cnt(g.lic) + ' licences, ' + (all ? Math.round(100 * g.total / all) : 0) + '% of member income'; return '<br><b>The mix.</b>' + line('Builders, 10+ recruits', s0.heavy) + line('Light builders, 1 to 9', s0.light) + line('Join-and-pay members, no recruits', s0.passive); })()
+ (() => { const s0 = G.rows[G.rows.length - 1]; const line = (name, g) => '<br><b>' + name + ':</b> ' + cnt(g.n) + ' members, ' + cnt(g.paid) + ' paid by the plan (' + (g.n ? Math.round(100 * g.paid / g.n) : 0) + '%' + (g.poolOnly ? ', ' + cnt(g.poolOnly) + ' more pool only' : '') + '), median <b>' + $$(g.median) + '</b>, top ' + $$(g.top) + ', ' + cnt(g.lic) + ' licences, ' + (all ? Math.round(100 * g.total / all) : 0) + '% of member income'; return '<br><b>The mix.</b>' + line('Builders, 10+ recruits', s0.heavy) + line('Light builders, 1 to 9', s0.light) + line('Join-and-pay members, no recruits', s0.passive); })()
+ '<br>Levels held: ' + Object.keys(lv).map(Number).sort((a, b) => a - b).map(L => 'L' + L + ' ' + cnt(lv[L])).join(' \u00b7 ') + '.';
}
}
+9 -9
View File
@@ -182,27 +182,27 @@ details.adv.big summary{font-size:18px}
<div class="rules" style="margin-top:12px">
<div class="rule"><div class="n">THE PLAN IN ONE BREATH</div><h3>Join for $20, climb an 8-step ladder</h3><p>Everyone enters for the same $20 (level 1). Each of the next seven levels is a product with a price: $40, $75, $125, $200, $300, $500, $750 (a working ladder from the $20 floor most members are already comfortable with). The company keeps 15% of every dollar, 5% goes into a monthly activity pool, and the other 80% is paid out person to person. You sit in a matrix four wide and eight deep under the person who recruited you.</p></div>
<div class="rule"><div class="n">WHO GETS PAID</div><h3>Two legs: your sponsor, then the depth</h3><p>Every level purchase is split. <b>The sponsor leg</b> (proposed 50%) follows the recruiter line: it pays the buyer\&rsquo;s own sponsor if they hold that level and have two recruits, otherwise it buys that sponsor their missing level, otherwise it climbs the sponsor line. <b>The depth leg</b> (the rest) climbs the placement line to the first person above who holds the level and has two recruits; anyone behind on the way up gets a <span class="chip lic">licence</span> instead of being skipped. Entry money goes mostly to the recruiter (proposed three quarters), the rest to the upline directly above the placement.</p></div>
<div class="rule"><div class="n">CASH VS LICENCE</div><h3>Two kinds of money</h3><p><span class="chip cash">cash</span> goes to your wallet. A <span class="chip lic">licence</span> is a level you did not have to pay for, bought with money that reached you from below. Both are real value; only cash is spendable. Your <b>reach</b> equals your level: at level 3 you collect from depths 1 to 3 under you, and the first payment from depth 3 buys you level 4.</p></div>
<div class="rule"><div class="n">CASH VS LICENCE</div><h3>Two kinds of money</h3><p><span class="chip cash">cash</span> goes to your wallet. A <span class="chip lic">licence</span> is a level you did not have to pay for, bought with money that reached you from below. Each leg funds a licence at its own share of the price, so with the sponsor leg at 50% one licence moves half a level&rsquo;s price, not the whole price: on this page <i>licence value funded</i> is the money that actually moved, never the sticker price. Only cash is spendable. Your <b>reach</b> equals your level: at level 3 you collect from depths 1 to 3 under you, and the first payment from depth 3 buys you level 4.</p></div>
<div class="rule"><div class="n">THE POOL</div><h3>5% of every dollar, split by doing</h3><p>Once a month the pool is split by shares: 1 share per day you used a tool (capped at 12), 20 shares for finishing the training in your first month, 4 shares to your sponsor when you do. Never from rank, never from recruiting counts. It is small money on purpose: a reason to open the app, finish the training and get paid every month even with no recruits.</p></div>
<div class="rule"><div class="n">PLACEMENT</div><h3>Spread: one each before two</h3><p>New people land in their recruiter's organisation at the shallowest open spot, and among equals, under whoever has the fewest. Someone who arrives with no recruiter is assigned to a member who still needs a personal recruit. Both were decided on 28 Sep.</p></div>
<div class="rule"><div class="n">PLACEMENT</div><h3>Spread: one each before two</h3><p>New people land in their recruiter's organisation at the shallowest open spot, and among equals, under whoever has the fewest. Someone who arrives with no recruiter is placed under the top position (the company), by the same spread rule, so nobody is qualified by a recruit they did not bring. (Changed 15 Oct: they used to be assigned to a member who still needed a personal recruit.)</p></div>
</div>
<h3 style="margin-top:18px">What is on this page, in order</h3>
<ol class="note" style="padding-left:22px;line-height:1.55">
<li><b>Grow the org, month by month.</b> The one to judge the plan by. It starts from a real 688-member organisation (real recruiters, real levels bought) and adds joins and purchases at rates you can change. Watch <i>Members paid something</i> and the <i>Who earned what</i> spread more than the headline income figure.</li>
<li><b>The theoretical ceiling.</b> A full matrix where everyone buys everything. It shows the most one position could ever receive per level. It is not a forecast and no organisation will ever look like it.</li>
<li><b>The theoretical ceiling.</b> A full matrix where everyone buys everything. It shows the most one position could ever receive per level. It is not a forecast and no organisation will ever look like it. It is also simplified: depth leg only, no sponsor leg or qualification.</li>
<li><b>The eight rules.</b> The plan itself, written as the contract would enforce it. If a rule reads wrong to you, that is exactly the feedback we want.</li>
<li><b>Look inside a small org.</b> A drawn tree, 3 or 4 deep, where you click one position at a time and see where its money goes before it buys. For understanding the mechanics, not for totals.</li>
<li><b>Look inside a small org.</b> A drawn tree, 3 or 4 deep, where you click one position at a time and see where its money goes before it buys. For understanding the mechanics, not for totals: it routes by depth only, with no sponsor leg.</li>
<li><b>The ladder, in numbers.</b> Price, company share and payout per level. The product names are placeholders until the real products are chosen.</li>
</ol>
<h3 style="margin-top:18px">Reading the numbers</h3>
<p class="note"><b>Your income</b> is cash plus your share of entry fees; licences are counted separately because they are levels, not dollars in hand. <b>Company</b> is a flat 15% and the <b>pool</b> a flat 5%; neither changes with any routing rule on this page. <b>Members paid something</b> counts anyone who received at least one dollar of cash or entry share. The join, growth and buy rates are guesses you should argue with: drag them and see what breaks. The model is deterministic, so the same settings always give the same result.</p>
<h3 style="margin-top:18px">Decided so far, and what is still open</h3>
<p class="note"><b>Decided:</b> 4 wide, 8 levels, 20% company share, two recruits to receive cash (one recruit unlocks levels 2 and 3), fund-the-gap licences, licences reach everyone, spread placement, unsponsored entries assigned to members who need a recruit.<br><b>Agreed 28 Sep, working defaults:</b> 15% company + 5% activity pool, sponsor leg 50% of every level purchase, three quarters of the entry to the recruiter, Fast Start (levels 1 to 3) at join, ladder $20 / 40 / 75 / 125 / 200 / 300 / 500 / 750. Why: with every purchase paying one person by depth, a builder who brought 187 people in three months earned $1,544; the sponsor leg fixes the builder, the pool gives the join-and-pay member something every month. All of it is still switchable in the plan controls. Watch three things together: <i>Heaviest builder this month</i> in the story, <i>Where this month's money went</i>, and <i>The mix</i>.<br><b>Still open:</b> whether a member with no recruits should receive level-2 cash from their own downline (the "Cash with no recruits" switch); the real products behind each level; a small operating-cost slice we have parked at zero.</p>
<p class="note"><b>Decided:</b> 4 wide, 8 levels, 20% company share, two recruits to receive cash (one recruit unlocks levels 2 and 3), fund-the-gap licences, licences reach everyone, spread placement, unsponsored entries placed under the company (changed 15 Oct from: assigned to members who need a recruit).<br><b>Agreed 28 Sep, working defaults:</b> 15% company + 5% activity pool, sponsor leg 50% of every level purchase, three quarters of the entry to the recruiter, Fast Start (levels 1 to 3) at join, ladder $20 / 40 / 75 / 125 / 200 / 300 / 500 / 750. Why: with every purchase paying one person by depth, a builder who brought 187 people in three months earned $1,544; the sponsor leg fixes the builder, the pool gives the join-and-pay member something every month. All of it is still switchable in the plan controls. Watch three things together: <i>Heaviest builder this month</i> in the story, <i>Where this month's money went</i>, and <i>The mix</i>.<br><b>Still open:</b> whether a member with no recruits should receive level-2 cash from their own downline (the "Cash with no recruits" switch); the real products behind each level; a small operating-cost slice we have parked at zero.</p>
</section>
<section>
<h2>Grow the org, month by month</h2>
<p class="note">This is the realistic run. It starts from your real InstantAdPay organisation as it stands today (688 members, their real recruiters, the levels they have actually bought), or from just you. Each month a number of people join, most recruited by the few who recruit, some with no recruiter and assigned to a member short of a direct. Each month only a share of members buy their next level. Every payment follows the plan's rules exactly, with the 20% admin fee. Defaults are calibrated to InstantAdPay's first three weeks: 11% of members ever recruit, the top tenth of recruiters bring half the joins, 16% of members have bought a level, and a fifth of those bought another.</p>
<p class="note">This is the realistic run. It starts from your real InstantAdPay organisation as it stands today (688 members, their real recruiters, the levels they have actually bought), or from just you. Each month a number of people join, most recruited by the few who recruit, some with no recruiter, placed under the top position (the company). Each month only a share of members buy their next level. Every payment follows the plan's rules exactly, with the 20% admin fee. Defaults are calibrated to InstantAdPay's first three weeks: 11% of members ever recruit, the top tenth of recruiters bring half the joins, 16% of members have bought a level, and a fifth of those bought another.</p>
<div class="panel">
<div class="deep-sum">
<div><div class="k">Month</div><div class="v" id="gMonth">0</div><div class="s" id="gMembers">members</div></div>
@@ -247,7 +247,7 @@ details.adv.big summary{font-size:18px}
<details class="adv big"><summary>The theoretical ceiling: a full matrix, everyone buying every level</summary>
<section style="margin-top:12px">
<h2 id="deepHead">Watch one position climb all 8 levels</h2>
<p class="note"><b>Depth leg only.</b> This climb and the drawn tree below still route every purchase by depth alone; the sponsor leg proposed on 28 Sep is modelled in the month-by-month run only, for now. <b>Not a forecast.</b> This assumes 87,380 people already joined and every one of them buys the next level every wave. It shows the most one position can ever receive, level by level. You start at level 1 with a full 4-wide organisation under you, everyone else at level 1 too. Press <b>Run one wave</b>: every position under you buys its next level, and the story tells you what reached you and why. Five waves later you are near the top without buying a thing.</p>
<p class="note"><b>Simplified illustration, depth leg only.</b> This climb routes every purchase by depth alone: no sponsor leg, no two-recruit qualification, no cash cutoff, and the whole entry goes to the position directly above. The month-by-month run above is the only place every rule applies, and every headline number on this page comes from it. <b>Not a forecast.</b> This assumes 87,380 people already joined and every one of them buys the next level every wave. It shows the most one position can ever receive, level by level. You start at level 1 with a full 4-wide organisation under you, everyone else at level 1 too. Press <b>Run one wave</b>: every position under you buys its next level, and the story tells you what reached you and why. Five waves later you are near the top without buying a thing.</p>
<div class="panel">
<div class="deep-sum">
<div><div class="k">Your level</div><div class="v" id="dLevel">1</div><div class="s">reach = depth 1 to <span id="dReach">1</span></div></div>
@@ -310,7 +310,7 @@ details.adv.big summary{font-size:18px}
<details class="adv big"><summary>Look inside a small org: click positions, run waves</summary>
<section style="margin-top:12px">
<h2>The drawn tree</h2>
<p class="note"><b>This tree is only 3 or 4 deep</b>, because a 4-wide tree gets 256 positions wide by depth 4. Waves here stop at level 4 or 5 for that reason. Use it to see one purchase at a time; use the climb above for the whole ladder.</p>
<p class="note"><b>Simplified illustration.</b> This tree routes every purchase by depth alone (no sponsor leg) and pays the whole entry to the position directly above; qualification and the cash cutoff do apply. Use it to see the mechanics of one purchase, never for totals: the month-by-month run is the one that follows every rule. <b>This tree is only 3 or 4 deep</b>, because a 4-wide tree gets 256 positions wide by depth 4. Waves here stop at level 4 or 5 for that reason. Use it to see one purchase at a time; use the climb above for the whole ladder.</p>
<p class="note">You are the black node. <b>Click any position</b>: a small menu tells you where its next purchase would go <em>before</em> you buy, then lets you buy it or mark it as having one direct (dashed, gets skipped). The strip under the tree says in plain words what each purchase did. <b>Run a wave</b> has the whole organisation buy one level, shallow to deep, so you can watch your own level climb without buying anything.</p>
<div class="panel">
<div class="money" id="money">
@@ -367,6 +367,6 @@ details.adv.big summary{font-size:18px}
<p class="fine">Unlisted working page for planning. Not a member page, not an offer. Every number here is a mechanic, not a prediction.</p>
<script src="/assets/plan-lab.js?v=20260928-1040"></script>
<script src="/assets/plan-lab.js?v=20261015-1707"></script>
</body>
</html>