What-if calculator with honest guardrails, pass-up rule explainer

Scenario sliders compute the contract's mechanical splits: sub-$20
packages visibly fail to qualify (levels stay locked and pass up), and the
copy states plainly this is arithmetic, not a prediction. Pass-up rule
block explains the 25-position climb and that it cuts both ways. Assets
bumped to v=20260904h.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-09-04 13:56:30 -05:00
parent dea279eed0
commit f3226c9955
6 changed files with 102 additions and 14 deletions
+35
View File
@@ -98,6 +98,41 @@
}));
}
// what-if calculator: pure arithmetic on the locked constants
const dc = document.getElementById('dcDirects');
if (dc) {
const $id = x => document.getElementById(x);
const usd = n => '$' + n.toLocaleString(undefined, { maximumFractionDigits: 2 });
const recalc = () => {
const d = Number($id('dcDirects').value);
const p = Number($id('dcPkg').value);
const r = Number($id('dcSpread').value);
$id('dcDirectsV').textContent = d;
$id('dcSpreadV').textContent = r;
const qualifies = p >= 20; // sub-$20 packages never count toward qualification
const l2open = qualifies && d >= 2;
const l3open = qualifies && d >= 5;
const g2 = d * r, g3 = g2 * r;
const e1 = d * p * 0.5;
const e2 = l2open ? g2 * p * 0.2 : 0;
const e3 = l3open ? g3 * p * 0.1 : 0;
$id('dcN1').textContent = d; $id('dcN2').textContent = g2; $id('dcN3').textContent = g3;
$id('dcE1').textContent = usd(e1);
$id('dcE2').textContent = l2open ? usd(e2) : 'passes up';
$id('dcE3').textContent = l3open ? usd(e3) : 'passes up';
$id('dcTotal').textContent = usd(e1 + e2 + e3);
const setB = (el, open, need) => { el.textContent = open ? 'open' : 'locked: ' + need; el.className = 'badge' + (open ? '' : ' amber'); };
setB($id('dcB1'), true, '');
setB($id('dcB2'), l2open, qualifies ? (2 - d) + ' more buyer(s)' : 'needs $20+ buyers');
setB($id('dcB3'), l3open, qualifies ? (5 - d) + ' more buyer(s)' : 'needs $20+ buyers');
$id('dcQualNote').textContent = qualifies
? 'Buyers of $20 or more count toward your qualification. 2 unlock level 2, 5 unlock level 3.'
: 'Heads up: $5 packages pay your level 1 but do not qualify buyers, so levels 2 and 3 stay locked in this scenario.';
};
['dcDirects', 'dcPkg', 'dcSpread'].forEach(x => $id(x).addEventListener('input', recalc));
recalc();
}
loadLadder();
loadStats();
loadTicker();
+1
View File
@@ -216,6 +216,7 @@ footer{border-top:1px solid var(--line);margin-top:90px;padding:34px 0 0;color:v
#status.bad{border-color:var(--bad)}
input,select{background:rgba(4,8,7,.65);border:1px solid var(--line-strong);color:var(--ink);border-radius:11px;
padding:11px 14px;font-size:14.5px;font-family:inherit}
input[type=range]{padding:0;border:0;background:transparent;accent-color:var(--mint);height:28px;vertical-align:middle}
input:focus,select:focus{border-color:var(--mint)}
:focus-visible{outline:2px solid var(--mint);outline-offset:2px}
.hero-note{font-family:var(--mono);font-size:12px;color:var(--muted);margin-top:26px}
+3 -3
View File
@@ -5,7 +5,7 @@
<title>The contract | InstantAdPay</title>
<meta name="description" content="Plain-language review of the InstantAdPay settlement contract: what it does, what nobody can change, what the operator can and cannot touch, and how to verify all of it yourself.">
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Sora:wght@600;700;800&display=swap">
<link rel="stylesheet" href="/assets/site.css?v=20260904g">
<link rel="stylesheet" href="/assets/site.css?v=20260904h">
</head>
<body>
<div class="wrap">
@@ -129,7 +129,7 @@
<div class="small">Advertising services with a performance referral program. Not an investment product; no income guarantees. Crypto transactions are irreversible. Never spend what you cannot afford.</div>
</footer>
</div>
<script src="/assets/common.js?v=20260904g"></script>
<script src="/assets/contract.js?v=20260904g"></script>
<script src="/assets/common.js?v=20260904h"></script>
<script src="/assets/contract.js?v=20260904h"></script>
</body>
</html>
+56 -4
View File
@@ -5,7 +5,7 @@
<title>InstantAdPay: advertise and earn, locked in code</title>
<meta name="description" content="Real ad packages with instant on-chain settlement. Every purchase pays the sponsor line in the same transaction, verifiable by anyone on the live ledger.">
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Sora:wght@600;700;800&display=swap">
<link rel="stylesheet" href="/assets/site.css?v=20260904g">
<link rel="stylesheet" href="/assets/site.css?v=20260904h">
</head>
<body>
@@ -290,6 +290,58 @@
</div>
</section>
<section>
<div class="wrap">
<div class="sectionhead">
<h2>Run your what-if</h2>
<p>Play with a scenario and see how the contract would split it. This is arithmetic on the
locked percentages, not a prediction and not a promise. Nobody earns a cent unless real
people really buy advertising.</p>
</div>
<div class="card">
<div class="grid c2">
<div>
<p class="small muted" style="margin-bottom:4px">Direct referrals who each buy a package</p>
<p><input type="range" id="dcDirects" min="0" max="20" value="2" style="width:100%">
<span class="mono" id="dcDirectsV">2</span></p>
<p class="small muted" style="margin-bottom:4px">The package they buy</p>
<p><select id="dcPkg" style="width:100%">
<option value="5">Micro, $5</option>
<option value="20" selected>Activation, $20</option>
<option value="50">Builder, $50</option>
<option value="100">Growth, $100</option>
<option value="250">Leader, $250</option>
</select></p>
<p class="small muted" style="margin-bottom:4px">Referrals each of them brings who also buy</p>
<p><input type="range" id="dcSpread" min="0" max="10" value="2" style="width:100%">
<span class="mono" id="dcSpreadV">2</span></p>
<p class="small muted" id="dcQualNote"></p>
</div>
<div>
<div class="tablewrap"><table>
<thead><tr><th>Level</th><th>People buying</th><th class="num">Your share</th><th class="num">You receive</th></tr></thead>
<tbody>
<tr><td>Level 1 <span class="badge" id="dcB1">open</span></td><td class="num" id="dcN1">–</td><td class="num">50%</td><td class="num mono" id="dcE1">–</td></tr>
<tr><td>Level 2 <span class="badge amber" id="dcB2">locked</span></td><td class="num" id="dcN2">–</td><td class="num">20%</td><td class="num mono" id="dcE2">–</td></tr>
<tr><td>Level 3 <span class="badge amber" id="dcB3">locked</span></td><td class="num" id="dcN3">–</td><td class="num">10%</td><td class="num mono" id="dcE3">–</td></tr>
<tr><td colspan="3"><b>If every one of those purchases happens</b></td><td class="num mono" style="color:var(--mint)"><b id="dcTotal">–</b></td></tr>
</tbody>
</table></div>
<p class="small muted" style="margin-top:10px">And that is one round of purchases. The same
split runs again on every future package the same people buy.</p>
</div>
</div>
<p class="small muted" style="margin-top:14px;border-top:1px solid var(--line);padding-top:14px">
<b style="color:var(--mint)">The pass-up rule:</b> a locked level's share does not disappear.
The contract climbs the sponsor line, checking up to 25 positions, and pays the first qualified
person it finds; only if nobody in those 25 qualifies does the share go to the platform. It cuts
both ways: stay qualified and you catch the shares that under-qualified positions below you let
slip. Every pass-up is a visible event on the <a href="/ledger">ledger</a>, so you can see
exactly where money climbed past someone and why.</p>
</div>
</div>
</section>
<section>
<div class="wrap">
<div class="sectionhead">
@@ -345,8 +397,8 @@
</div>
</section>
<script src="/assets/common.js?v=20260904g"></script>
<script src="/assets/wallet.js?v=20260904g"></script>
<script src="/assets/home.js?v=20260904g"></script>
<script src="/assets/common.js?v=20260904h"></script>
<script src="/assets/wallet.js?v=20260904h"></script>
<script src="/assets/home.js?v=20260904h"></script>
</body>
</html>
+3 -3
View File
@@ -5,7 +5,7 @@
<title>Live ledger | InstantAdPay</title>
<meta name="description" content="Every purchase, payout, and pass-up on InstantAdPay, streamed straight from the blockchain with a verify link on every line.">
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Sora:wght@600;700;800&display=swap">
<link rel="stylesheet" href="/assets/site.css?v=20260904g">
<link rel="stylesheet" href="/assets/site.css?v=20260904h">
</head>
<body>
<div class="wrap">
@@ -25,7 +25,7 @@
<div>InstantAdPay · <a href="/">how it works</a> · <a id="contractLink" href="#" target="_blank" rel="noopener">contract source ↗</a></div>
</footer>
</div>
<script src="/assets/common.js?v=20260904g"></script>
<script src="/assets/ledger.js?v=20260904g"></script>
<script src="/assets/common.js?v=20260904h"></script>
<script src="/assets/ledger.js?v=20260904h"></script>
</body>
</html>
+4 -4
View File
@@ -4,7 +4,7 @@
<meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1">
<title>My account | InstantAdPay</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Sora:wght@600;700;800&display=swap">
<link rel="stylesheet" href="/assets/site.css?v=20260904g">
<link rel="stylesheet" href="/assets/site.css?v=20260904h">
</head>
<body>
<div class="wrap">
@@ -131,8 +131,8 @@
<footer><div>InstantAdPay · <a href="/ledger">live ledger</a></div></footer>
</div>
<script src="/assets/common.js?v=20260904g"></script>
<script src="/assets/wallet.js?v=20260904g"></script>
<script src="/assets/my.js?v=20260904g"></script>
<script src="/assets/common.js?v=20260904h"></script>
<script src="/assets/wallet.js?v=20260904h"></script>
<script src="/assets/my.js?v=20260904h"></script>
</body>
</html>