Enter any position number. The page reads that position and everyone above it straight from the blockchain, then walks the contract's rule one generation at a time, from the buyer upward, until it finds who gets paid. Use "what if" on anyone who is passed over to see what it would take for them to catch it.
+
+
+
+
+
Enter a position number to start.
+
+
skipped, not checkedchecked, passed overpaid 100%fee wallet
+
+
Read live from the contract at 0x33Bd…4fB2DAF. The next level shown is the position's real next purchase; higher levels and "what if" changes are simulations of the same rule. This shows mechanics only, not a promise of income.
+
+
+
+
The rule
+
How the contract picks who gets paid
+
An upgrade is never split. 100% of it goes to one upline in the matrix, or to the fee wallet if nobody qualifies.
+
+
Skip. Skip a number of uplines equal to the buyer's current level minus one, without checking them. Buying Ascensus from Scintilla skips none.
+
Check. From there, look at each upline in turn: do they hold at least the level the buyer is leaving, and do they have 2 directs?
+
Pay or pass. The first upline that passes both checks is paid the full amount and the search ends. Anyone who fails is passed over.
+
Stop. If the search reaches position #1 (the root) or has taken 16 steps, the whole payment goes to the fee wallet.
+
+
// upgrade() · the number that drives everything
+_payUpline(id, currentLevel - 1, cost); // levelIndex = the buyer's level - 1
+
+// _payUpline() · skip, then check
+if (i < levelIndex) { upline = u.uplineId; continue; } // skip this many
+if (u.level > levelIndex && u.directCount >= 2) { // the first to pass gets 100%
+
+
Buying
levelIndex
Uplines skipped
Catcher must hold
+
+
Ascensus
0
0
Scintilla or higher
+
Fabrica
1
1
Ascensus or higher
+
Culmen
2
2
Fabrica or higher
+
Apex
3
3
Culmen or higher
+
Fastigium
4
4
Apex or higher
+
Vertex
5
5
Fastigium or higher
+
Corona
6
6
Vertex or higher
+
+
+
Every row also needs 2 directs. The amount is set by the buyer's tier; Standard is exactly half of Premium. The search follows the matrix (where each member was placed), not the sponsor line. Can the contract change? See the security review →
+
+
+
+
+
+
diff --git a/public/who-gets-paid.js b/public/who-gets-paid.js
new file mode 100644
index 0000000..885db6d
--- /dev/null
+++ b/public/who-gets-paid.js
@@ -0,0 +1,128 @@
+/* /who-gets-paid (Marty, 2026-09-26): enter any position, read it and its matrix uplines live
+ from /api/public/payment-path, and walk the contract's _payUpline rule one step at a time from
+ the buyer upward. "What if" lets a viewer give a passed-over upline the level or direct they
+ are missing and see where the payment would land instead. The rule here is the contract's:
+ skip levelIndex uplines; pay the first with level > levelIndex and directCount >= 2;
+ stop at the root (#1) or after 16 steps and send it to the fee wallet. */
+(function () {
+ var NAMES = ['Scintilla', 'Ascensus', 'Fabrica', 'Culmen', 'Apex', 'Fastigium', 'Vertex', 'Corona'];
+ var $ = function (id) { return document.getElementById(id); };
+ var form = $('wgpForm'), idIn = $('wgpId'), sel = $('wgpLvl'), buyWrap = $('wgpBuyWrap');
+ var runBtn = $('wgpRun'), resetBtn = $('wgpReset'), buyerEl = $('wgpBuyer'), sumEl = $('wgpSum');
+ var chainEl = $('wgpChain'), legend = $('wgpLegend');
+ var data = null, overrides = {}, timer = null;
+
+ function esc(s) { return String(s).replace(/[&<>"]/g, function (c) { return { '&': '&', '<': '<', '>': '>', '"': '"' }[c]; }); }
+ function fmt(n) { return Number(n || 0).toLocaleString(undefined, { minimumFractionDigits: 2, maximumFractionDigits: 2 }); }
+ function lvName(l) { return NAMES[l - 1] || ('level ' + l); }
+ function eff(u) { var o = overrides[u.id] || {}; return { level: o.level || u.level, directCount: o.directCount != null ? o.directCount : u.directCount, what: !!(o.level || o.directCount != null) }; }
+ function price(li) {
+ var t = data.buyer.tier === 2 ? 2 : 1;
+ return data.costs && data.costs.up && data.costs.up[t] ? data.costs.up[t][li] : null;
+ }
+
+ function evaluate(li) {
+ var steps = [], paid = null, U = data.uplines;
+ for (var i = 0; i < U.length; i++) {
+ var e = eff(U[i]);
+ if (i < li) { steps.push({ s: 'skip', why: 'Skipped: ' + (i + 1) + ' of ' + li + ' skipped without checking.' }); continue; }
+ var lvOk = e.level > li, dOk = e.directCount >= 2;
+ if (lvOk && dOk) { steps.push({ s: 'paid', why: 'Holds ' + lvName(e.level) + ', needs ' + lvName(li + 1) + ' or higher, and has ' + e.directCount + ' directs. Paid in full; the search ends.' }); paid = i; break; }
+ var need = [];
+ if (!lvOk) need.push('needs ' + lvName(li + 1) + ' or higher (holds ' + lvName(e.level) + ')');
+ if (!dOk) need.push('needs 2 directs (has ' + e.directCount + ')');
+ steps.push({ s: 'fail', why: 'Passed over: ' + need.join(' and ') + '.', fix: { id: U[i].id, level: lvOk ? null : li + 1, directs: dOk ? null : 2 } });
+ }
+ return { steps: steps, paid: paid };
+ }
+
+ function draw(li, upto) {
+ var r = evaluate(li), U = data.uplines, b = data.buyer;
+ var html = '
';
+ }
+ var done = upto >= r.steps.length, amt = price(li);
+ var amtTxt = amt != null ? fmt(amt) + ' POL' : 'the upgrade';
+ if (done && r.paid === null) {
+ var reason = data.stopped === 'root' && U.length < 16 ? 'The next upline is #1, the root. The search stops there.' : 'The search used all 16 steps.';
+ html += '
stopfee' + (data.stopped === 'root' && U.length < 16 ? '#1 root reached' : '16 steps used') + 'fee wallet' + reason + ' Nobody qualified, so the full ' + amtTxt + ' goes to the fee wallet.
';
+ }
+ chainEl.innerHTML = html;
+ if (done) {
+ var wi = Object.keys(overrides).length ? ' (with your what-if changes)' : '';
+ sumEl.innerHTML = r.paid !== null
+ ? '#' + U[r.paid].id + ' would be paid ' + amtTxt + '' + wi + '. ' + li + ' upline' + (li === 1 ? '' : 's') + ' skipped, ' + (r.paid - li) + ' passed over.'
+ : 'Nobody in reach qualifies, so the full ' + amtTxt + ' would go to the fee wallet' + wi + '. Skipped ' + Math.min(li, U.length) + ', checked ' + Math.max(0, U.length - li) + '.';
+ } else sumEl.textContent = 'Checking ' + (upto + 1) + ' up…';
+ }
+
+ function run(animate) {
+ if (!data) return;
+ if (timer) { clearInterval(timer); timer = null; }
+ var li = Number(sel.value), total = evaluate(li).steps.length;
+ var reduce = window.matchMedia && window.matchMedia('(prefers-reduced-motion: reduce)').matches;
+ if (!animate || reduce) { draw(li, total); return; }
+ var k = 0; draw(li, 0);
+ timer = setInterval(function () { k++; draw(li, k); if (k >= total) { clearInterval(timer); timer = null; } }, 380);
+ }
+
+ function showBuyer() {
+ var b = data.buyer, t = b.tier === 2 ? 'Premium' : 'Standard';
+ buyerEl.innerHTML =
+ '