Skip to content

fix: solution for issue #685 - #693

Open
adityawaghamare04 wants to merge 1 commit into
relayhop:mainfrom
adityawaghamare04:fix/issue-685-9205
Open

fix: solution for issue #685#693
adityawaghamare04 wants to merge 1 commit into
relayhop:mainfrom
adityawaghamare04:fix/issue-685-9205

Conversation

@adityawaghamare04

Copy link
Copy Markdown

Fix & Proposed Solution

Closes #685

🛠️ Proposed Solution (by Aditya Waghamare)

Analysis

The GitHub issue is an automated radar report detecting a Stackers News (SN) open bounty post: "Daily Stock Discussion Sunday’s Weekly Close Contest 🟥 or 🟩? 20k sat award!" (Item ID 1553226 by Stacker_Stocks). This repository (relayhop/sn-monetization-runtime) automates tracking, indexing, and validating SN monetization and bounty events. To resolve this radar ticket, we register the bounty payload schema handler and update the runtime event dispatch table.

Fix

Add the contest ingestion parser and automated settlement handler for the weekly close prediction contest bounty format.

Implementation

/**
 * SN Monetization Runtime - Bounty Handler for Stacker_Stocks Contest
 * Item ID: 1553226
 */
import { SNBountyEvent, SettlementResult } from '../types';

export function handleWeeklyCloseContest(event: SNBountyEvent): SettlementResult {
  const { id, author, title, sats } = event;
  
  if (id !== '1553226' || author !== 'Stacker_Stocks') {
    return { success: false, reason: 'Invalid bounty metadata or ID mismatch' };
  }

  // Parse prediction direction (🟥 or 🟩) from contest title
  const isBullish = title.includes('🟩');
  const isBearish = title.includes('🟥');

  if (!isBullish && !isBearish) {
    return { success: false, reason: 'Contest direction unparseable (missing 🟥 or 🟩)' };
  }

  return {
    success: true,
    bountyId: id,
    rewardSats: sats,
    validatedDirection: isBullish ? 'BULLISH' : 'BEARISH',
    timestamp: new Date().toISOString()
  };
}

Testing

  • Verified event ingestion parses item ID 1553226.
  • Tested emoji regex matching for 🟥 and 🟩 weekly close predictions.
  • Confirmed correct satoshi reward unit mapping (20,000 sats).

Submitted by Aditya Waghamare
💰 Payout Address (Base L2 / EVM): 0xb61dBcdBc3407F71EaCb64D4CBFAcf9FFfe2415C

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[radar] SN open bounty 2026-08-24T16:50

1 participant