Rubric red flag 4 sharpened (Marty 2026-11-16): forced High only when earlier buyers are paid from later buyers' payments; sponsor commissions on a delivered product are disclosed and scored, not auto-flagged

Deterministic payout read (chain/payouts.py): every payout matched to the buyer of the same tx and classed operator /
referral line / earlier buyer outside the line. Earlier-buyer payouts = VERIFIED red flag 4. A model red flag 4 is
INFERRED, must cite evidence, and is not applied when the chain shows only operator and referral-line payouts
(shown on the report as 'Considered and not applied'). Same test for every contract.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-11-16 12:26:07 -06:00
parent 148eb7ef95
commit 6aeb1b2146
18 changed files with 263 additions and 40 deletions
+29
View File
@@ -107,6 +107,26 @@ def build(E):
for a, k in (E.get('wallets') or {}).items():
w('- %s [%s] %s, nonce %s, native %s, received from contract %s%s' % (a, ', '.join(k.get('labels') or []) or 'top recipient', k.get('desc'), k.get('nonce'), f2(k.get('native_balance')),
json.dumps(k.get('received_from_contract') or {}), (', positions owned %s' % k['positions_owned']) if 'positions_owned' in k else ''))
pr = E.get('payout_relations')
w('\n## Who gets paid when someone buys (precomputed, rubric red flag 4; use these counts, do not recount)')
if not pr: w('- Not computed for this scan.')
elif pr.get('error'): w('- Could not be computed: %s' % pr['error'])
elif not pr.get('payouts_seen'): w('- %s Purchases seen: %s.' % (pr.get('note'), pr.get('purchases_seen')))
else:
bc = pr.get('by_class') or {}
w('- Payouts seen: %s; purchases seen: %s; payouts matched to a buyer in the same transaction: %s; sponsor links read from the contract: %s' % (
pr['payouts_seen'], pr['purchases_seen'], pr['payouts_with_a_buyer_in_tx'], pr['sponsor_links_read']))
names = {'operator': 'to wallets the contract names (operator, company, prize or fee wallets)', 'referral_line': "to the buyer's sponsor or a sponsor above them (the buyer's referral line)",
'earlier_buyer': "to an EARLIER buyer or position holder who is NOT in the buyer's referral line (paid from a later buyer's payment)",
'earlier_buyer_line_unknown': 'to an earlier buyer, but the contract records no sponsor links, so the referral line cannot be read',
'buyer_self': 'back to the buyer', 'no_purchase_in_tx': 'in a transaction with no purchase (claims, withdrawals, keeper calls)', 'other': 'to a wallet with no earlier purchase seen'}
for k in ['operator', 'referral_line', 'earlier_buyer', 'earlier_buyer_line_unknown', 'buyer_self', 'no_purchase_in_tx', 'other']:
if bc.get(k): w(' - %s payouts %s (%s distinct recipients)' % (bc[k], names[k], (pr.get('distinct_recipients_by_class') or {}).get(k)))
w("- Earlier buyers paid from later buyers' payments: %s" % pr.get('earlier_buyers_paid_by_later_buyers'))
for k, xs in (pr.get('examples') or {}).items():
if k in ('earlier_buyer', 'earlier_buyer_line_unknown', 'referral_line'):
for x in xs[:3]: w(' - example %s: tx %s block %s paid %s (first bought at block %s), buyer %s' % (k, x['tx'], x['block'], x['to'], x.get('recipient_first_bought_block'), x.get('buyer')))
w('- Method: %s' % pr.get('method'))
w('\n## Notes')
for n in E.get('notes') or []: w('- ' + n)
return '\n'.join(o)
@@ -150,6 +170,15 @@ def facts(E):
a, n = p['top_owners'][0]
lab = ', '.join(((E.get('wallets') or {}).get(a) or {}).get('labels') or [])
add('INFERRED', 'Top position owner %s%s holds %d of %d positions.' % (a, (' (' + lab + ')') if lab else '', n, p['count']), ex + '/address/' + a)
pr = E.get('payout_relations') or {}
if pr.get('payouts_seen'):
bc = pr.get('by_class') or {}
if bc.get('earlier_buyer'):
x = (pr.get('examples') or {}).get('earlier_buyer', [{}])[0]
add('VERIFIED', "%d payouts went to earlier buyers or position holders outside the buyer's referral line, paid inside a later buyer's purchase (example tx %s)." % (bc['earlier_buyer'], x.get('tx')), ex + '/tx/' + x['tx'] if x.get('tx') else None)
else:
add('VERIFIED', "Of %d payouts read, %d went to wallets the contract names and %d to the buyer's referral line; none went to an earlier buyer outside that line.%s" % (
pr['payouts_seen'], bc.get('operator', 0), bc.get('referral_line', 0), (' %d went to earlier buyers whose referral line cannot be read.' % bc['earlier_buyer_line_unknown']) if bc.get('earlier_buyer_line_unknown') else ''), None)
win = E.get('window') or {}
add('VERIFIED', 'History read: blocks %s to %s%s.' % (win.get('from'), win.get('to'), ' (complete since deployment)' if win.get('complete_history') else ' (partial window)'), None)
for g in E.get('gaps') or []: add('UNKNOWN', 'Not read: %s in %d block ranges (provider limit or time cap).' % (g['what'], len(g['ranges'])), None)