Files
instantadpay/public/contract.html
T
martbost 03284aa281 Conversion linkage, InstantAdPay side (Marty 2026-11-07, "Yes ship these"): a LinkSpin click stays with the account, and its sign-up, wallet link and each package purchase are reported to LinkSpin. Reporting only: no sponsor, payout, credit or chain path changes; accounts.js only gains a notification after a wallet is linked.
lsreport.js. A click id (lsclk or lsid) arriving on any page is kept in a first-party cookie iap.lsclk, 30 days, last click wins, like the sponsor cookie. The join page also sends its own copy with the code request and verify (the cookie is refused in traffic-exchange frames and never crosses browsers, the 2026-09-29 lesson) and it is remembered per email. It is stored in its own table ls_account_clicks when the account is created or a waiting LinkSpin shell is claimed, on /api/signup, email sign-in and in-game sign-in (a game may pass lsclk; none does yet).

Reports queue in ls_events, whose primary key is the idempotency key (join:<hash>, wallet:<hash>, purchase:<tx>:<log index>), so two app copies in a deploy cannot double a row, and LinkSpin dedupes on the same key. A background loop sends them signed, retrying up to every 5 minutes; a sign-up or a purchase never waits on LinkSpin. The purchase hook runs after the existing ev: claim and its value is the USD price on the chain event. A first purchase finds its buyer through the contract's wallet for that member id, since member_id may not be stored yet. Linked positions count as the account's purchases. Past 30 days from the sign-up nothing is queued (LinkSpin's window is from the click).

Campaigns > Conversion tracking lists everything the member's clicks led to, and joins, wallets and purchases on each campaign row. Guide, privacy page and chatbot (CANNED + FACTS) updated; common.js, join.js and my.js tags bumped.

QA: bash qa/run.sh netconv (54 checks: local InstantAdPay + local LinkSpin + a mock Polygon RPC, a real Purchase log through the real event fan-out, LinkSpin down, two copies racing).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 07:48:36 -06:00

151 lines
9.7 KiB
HTML

<!doctype html>
<html lang="en" data-theme-base="dark">
<head>
<meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1">
<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="canonical" href="https://instantadpay.com/contract">
<meta property="og:type" content="website"><meta property="og:site_name" content="InstantAdPay">
<meta property="og:url" content="https://instantadpay.com/contract">
<meta property="og:title" content="InstantAdPay — the contract, in plain language">
<meta property="og:description" content="What the settlement contract does, what nobody can change, and how to verify all of it yourself.">
<meta property="og:image" content="https://instantadpay.com/banners/iap-hero-1200x630.png">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="InstantAdPay — the contract, in plain language">
<meta name="twitter:description" content="Immutable 50-20-10 splits, no withdrawal button, verify it yourself.">
<meta name="twitter:image" content="https://instantadpay.com/banners/iap-hero-1200x630.png">
<meta name="theme-color" content="#043b2f">
<!--theme-head--><script>(function(){var A=0,h=document.documentElement,b=h.getAttribute("data-theme-base")||"dark",m=window.matchMedia?matchMedia("(prefers-color-scheme: dark)"):{matches:false},v;function g(){try{v=localStorage.getItem("iap.theme")}catch(e){v=null}return v==="light"||v==="dark"||v==="auto"?v:(A?"auto":b)}function ap(){var c=g();h.setAttribute("data-theme",c==="auto"?(m.matches?"dark":"light"):c);h.setAttribute("data-theme-choice",c)}ap();if(m.addEventListener)m.addEventListener("change",ap);else if(m.addListener)m.addListener(ap);window.IAPTheme={base:b,get:g,apply:ap,set:function(c,quiet){try{if(c==="light"||c==="dark"||c==="auto")localStorage.setItem("iap.theme",c);else localStorage.removeItem("iap.theme")}catch(e){}ap();if(!quiet)try{dispatchEvent(new CustomEvent("iap-theme",{detail:g()}))}catch(e){}}}})()</script><!--/theme-head-->
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Sora:wght@600;700;800&display=swap">
<link rel="icon" type="image/png" href="/logo-icon.png">
<link rel="stylesheet" href="/assets/site.css?v=20261101th">
</head>
<body>
<div class="wrap">
<section class="hero" style="padding-bottom:24px">
<h1>The contract, <em>in plain language</em>.</h1>
<p class="lead">Every dollar on this platform moves through one smart contract. This page explains
what it does, what nobody can change, and exactly what powers we kept. Verify every claim
yourself. That is the point.</p>
<p>
<span class="badge">address: <span class="mono" id="cAddr">…</span></span>
<span class="badge" id="cChain">…</span>
</p>
<p style="margin-top:16px">
<a class="btn sec small" id="lnkExplorer" target="_blank" rel="noopener">Raw contract on the explorer ↗</a>
<a class="btn sec small" id="lnkSource" target="_blank" rel="noopener">Verified source code ↗</a>
</p>
</section>
<div class="card">
<h3>The six laws the code enforces</h3>
<ul class="checks">
<li><b>It never holds funds.</b> Every purchase is fully paid out in the same transaction. The contract balance is zero after every sale. There is nothing to freeze, drain, or run away with.</li>
<li><b>The compensation rules are constants.</b> 50 percent, 20 percent, 10 percent, 20 percent platform. They are compiled into the bytecode. No function exists to change them.</li>
<li><b>No upgrade path, no pause switch, no self-destruct.</b> The deployed bytecode is the program forever.</li>
<li><b>Purchased credits only ever go down by delivering your ads.</b> No function reduces them for any other reason, and nothing can mint them except a purchase.</li>
<li><b>Qualification is earned, never bought.</b> Deeper levels unlock only by referring real buyers of $20 or more. No spend-based shortcuts exist.</li>
<li><b>Everything is observable.</b> Every state change emits a public event. The website is a mirror of the chain, never the source of truth for money.</li>
</ul>
</div>
<div class="grid c2">
<div class="card">
<h3>What the operator CAN do</h3>
<ul class="checks">
<li>Add ad packages to the catalog (price floor $1, ceiling $500)</li>
<li>Queue a price change, which waits behind a public 24-hour timelock before anyone can apply it</li>
<li>Retire a package from sale, and reactivate it later</li>
<li>Rotate the fee-receiver, ad-engine, and owner addresses (key-loss insurance)</li>
<li>The ad engine can burn credits, but only as your campaigns consume delivery</li>
</ul>
</div>
<div class="card">
<h3>What the operator CANNOT do</h3>
<ul class="checks">
<li>Change any split percentage or qualification threshold</li>
<li>Pause, upgrade, or replace the contract</li>
<li>Hold, redirect, or claw back anyone's payout</li>
<li>Mint credits, take credits, or touch anyone's membership record</li>
<li>Move a price outside the $1 to $500 bounds, or skip the 24-hour notice</li>
</ul>
</div>
</div>
<div class="card">
<h3>Where every purchase goes</h3>
<div class="split">
<div class="s50">50%<br>direct sponsor</div>
<div class="s20">20%<br>level 2</div>
<div class="s10">10%<br>level 3</div>
<div class="sa">20%<br>platform</div>
</div>
<p class="muted small">On a $20 package: $10.00 to the direct sponsor, $4.00 to level 2, $2.00 to level 3,
$4.00 to the platform. Rounding dust of a few billionths of a cent goes to the platform wallet so the
books always balance to zero. When a level has no qualified recipient, that share visibly passes up
to the next qualified person; if none exists within 25 candidates, it goes to the platform. Every one
of these movements is an event on the <a href="/ledger">live ledger</a>.</p>
</div>
<div class="grid c2">
<div class="card">
<h3>Dollar prices, POL settlement</h3>
<p class="muted small">Packages are priced in dollars and settled in POL using the Chainlink POL/USD
oracle at the moment of purchase. If you send slightly too much because the rate moved, the excess
refunds to you in the same transaction. If the oracle ever goes quiet, the contract keeps selling
at its last fresh price for up to 24 hours, then new purchases pause until the feed returns.
Settled money, credits, and memberships are never affected by an oracle outage.</p>
</div>
<div class="card">
<h3>Nobody can stall it</h3>
<p class="muted small">Payouts are pushed with a strict gas allowance. A wallet that refuses to
accept payment is simply treated as unqualified and its share passes up. No escrow forms, no
purchase reverts, nobody waits on anybody. One practical note: use a normal wallet address for
payouts. Some exotic smart-contract wallets cost more gas to receive than the allowance and would
be passed over.</p>
</div>
</div>
<div class="card">
<h3>How it was tested</h3>
<p class="muted small">Before deployment the contract passed a suite of 24 tests covering every split
scenario, the pass-up walk to its exact 25-candidate boundary, oracle outages and price swings,
refunds, hostile recipient wallets, and catalog rules. On top of that, an invariant fuzzer ran
128,000 randomized transactions and confirmed after every single one: the contract balance stayed
zero, every wei in equaled every wei out, credits equaled purchases minus delivery, and nobody was
qualified without earning it. The full specification was then audited line by line against the code.
The source you see at the verified-source link is byte-for-byte what runs on chain.</p>
</div>
<div class="closer">
<div>
<h2>Do not trust this page. Check it.</h2>
<p class="muted" style="margin:0 0 22px">The whole reason this platform exists is that you should
not have to take anyone's word, including ours. Open the source, open the ledger, click a
transaction.</p>
<a class="btn" id="lnkSource2" target="_blank" rel="noopener">Read the verified source</a>
<a class="btn sec" href="/ledger">Open the live ledger</a>
</div>
<div class="mockup">
<div class="bar"><i></i><i></i><i></i><span class="addr" id="mockAddr">contract</span></div>
<div class="body">
<div class="mrow"><span>compiler check</span><span>exact match</span></div>
<div class="mrow"><span>bytecode check</span><span>exact match</span></div>
<div class="mrow dim"><span>upgrade path</span><span>none</span></div>
<div class="mrow dim"><span>pause switch</span><span>none</span></div>
</div>
</div>
</div>
<footer>
<div>InstantAdPay · <a href="/">how it works</a> · <a href="/ledger">live ledger</a></div>
<div class="small">InstantAdPay is the Polygon hub of the <a href="https://cryptoteambuild.com" target="_blank" rel="noopener">Crypto Team Build Network</a>.</div>
<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=20261107nc"></script><script src="/assets/welcome.js?v=20261101th"></script>
<script src="/assets/contract.js?v=20260908p"></script>
<script src="/assets/chat.js?v=20261016n"></script>
</body>
</html>