Paid missions: $30 blocks, a $10 listing, priced off the live POL rate

Marty's pricing, settled. A block is $30 and buys completions rather than a
fixed count: the advertiser picks what hunters earn and the count falls out, so
a higher payout trades visits for speed at the same price.

  0.30/completion -> 666 visits      0.75 -> 272      1.00 -> 204

The listing fee is $10, charged ONCE per mission and only at approval, because
that is when the review it pays for has actually happened. Never charged again
on that mission, and waived entirely on a first order of 4 blocks or more.

  1 block  $40    2 blocks  $70    4 blocks  $120 (listing waived)
  repeat   $30

No volume discount, deliberately. At a 20% margin the reserve is a hard cost
owed to hunters, so a discount comes entirely out of the house share with five
times leverage: 10% off the price is half the margin gone. The levers that do
not cost anything are the listing waiver and priority placement.

Dollars convert at the InstantAdPay contract's own quote (priceCents/quoteWei),
so a mission is priced at exactly the rate members already pay for packages. No
third-party feed. Reads $0.1055/POL right now. It throws rather than guessing:
a purchase priced off a rate we could not read is a purchase that might sell
delivery below cost.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-09-24 10:49:08 -05:00
parent c81c720602
commit 8a006a90c1
2 changed files with 127 additions and 1 deletions
+38 -1
View File
@@ -41,6 +41,11 @@ const DEFAULTS = {
// gas together, so a failed-and-retried send or a price spike is already covered.
paidReserveBufferPct: 10,
paidHouseFloatPol: 50, // POL kept back for house missions, never counted as sellable
// Priced in dollars because that is what a buyer judges; converted at the InstantAdPay
// contract's own rate at purchase (Marty, 2026-09-24).
paidBlockCents: 3000, // $30 a block
paidListingCents: 1000, // $10, once per mission, charged AT APPROVAL after the review is done
paidListingFreeBlocks: 4, // a first order this size or larger gets the listing free
};
function cfg() { return Object.assign({}, DEFAULTS, store.read('settings', {})); }
const r4 = n => Math.round(Number(n) * 10000) / 10000;
@@ -63,6 +68,38 @@ function quote(hunterPol, completions) {
margin: r4(total - reserve), total, marginPct: pct };
}
// How many completions a block buys. The inverse of quote(): the advertiser fixes the spend and
// the payout they want hunters to get, and the completion count falls out.
//
// NOTE, because it is easy to get backwards: with a fixed-price block the house margin is the
// same whatever the payout. Raising the payout trades completions for SPEED at the same price,
// it does not earn the house more. Margin only moves with the number of blocks sold. So the
// upsell is "more blocks", and a higher payout is the reason a buyer needs more of them.
function blockFor(hunterPol, totalPol) {
const c = cfg();
const hp = r4(Math.max(Number(c.paidBaseHunterPol), Number(hunterPol) || 0));
const gas = Number(c.paidGasPol) || 0;
const buf = 1 + (Math.max(0, Number(c.paidReserveBufferPct) || 0) / 100);
const pct = Math.min(90, Math.max(0, Number(c.paidMarginPct) || 0));
const reserve = Number(totalPol) * (1 - pct / 100);
const n = Math.floor(reserve / ((hp + gas) * buf));
return Object.assign(quote(hp, n), { requestedPol: r4(Number(totalPol)) });
}
// What this order costs all in. The listing fee is charged ONCE per mission, at approval, because
// it pays for the review that has already happened by then. It is never charged again on that
// mission, and a first order of paidListingFreeBlocks or more waives it: a serious first buyer
// should not be taxed for the privilege.
function orderTotal(blocks, alreadyListed) {
const c = cfg();
const n = Math.max(1, Math.round(Number(blocks) || 1));
const blockCents = Number(c.paidBlockCents) * n;
const waived = alreadyListed || n >= Number(c.paidListingFreeBlocks);
const listingCents = waived ? 0 : Number(c.paidListingCents);
return { blocks: n, blockCents, listingCents, totalCents: blockCents + listingCents,
listingWaived: waived, listingReason: alreadyListed ? 'already listed' : (waived ? 'waived, ' + n + ' blocks' : 'first order') };
}
// ---- reserves ---------------------------------------------------------------------------
const paidMissions = () => store.read('missions', []).filter(m => m.paid);
@@ -114,4 +151,4 @@ function isPaid(missionId) {
return !!(m && m.paid);
}
module.exports = { cfg, quote, outstanding, canSell, extraAllowance, isPaid, usedOf, paidMissions };
module.exports = { cfg, quote, blockFor, orderTotal, outstanding, canSell, extraAllowance, isPaid, usedOf, paidMissions };