StackTrading Docs

SRS: UC_9.15 — Flow 33: Amplify Bounty Verification

FieldValue
UC_IDUC_9.15
Versionv1.1
Last Updated2026-11-05
BA PiClinh.nguyen34
CategoryBACKGROUND MECHANISMS & CRON JOBS
ModuleFlow 33 (4.9.3/4.9.4)
FunctionAmplify Bounty
Document ReferencesZapier Integration V7.pdf (§Flow 33 Amplify Verification) · RFQ_ Stack Trading Prop Tech V7.pdf (§2.3 Discord Bot — Application Commands; §API GET /bounty/check-url, POST /generate-promo-code; §Audit Requirements)

1. UC Index

UC_IDFunctionDescription
UC_9.15Flow 33 — Amplify Bounty VerificationTrader submits a TikTok / YouTube Shorts URL via /submit-bounty [url] in #bounty-submissions. Bot validates URL format and the 1-per-24h limit, then Zapier runs a 5-step audit: (1) URL uniqueness, (2) fetch Views/Likes/Comments, (3) Views ≥ 50,000 AND (Likes+Comments)/Views ≥ 0.015, (4) Gemini 1.5 Pro bot-farm audit on PII-redacted text, (5) PASS → 100%-off Associate Track promo code + DM + email; FAIL → DM with reason.

UC_9.15 — Flow 33: Amplify Bounty Verification

FieldValue
Use CaseAmplify Bounty Verification & Reward
DescriptionRewards authentic organic short-video promotion. Quantitative thresholds filter low-reach content; Gemini 1.5 Pro forensic analysis rejects synthetic engagement (bot-farm). Each URL can be rewarded only once.
ActorTrader (Discord member) · System (Discord Bot, Zapier, Middleware, Gemini 1.5 Pro)
Zapier FlowFlow 33
Trigger SourceDiscord Bot webhook from /submit-bounty
3rd PartyDiscord · TikTok API · YouTube Data API · Google Gemini 1.5 Pro · Google Sheets · AWS SES (PASS email — linked users only)
Middleware EndpointsGET /bounty/check-url · POST /generate-promo-code
Related UCsUC_9.14 (shares POST /generate-promo-code) · UC_2.7.8 Apply Promo Code (redemption)

2. Trigger

Trader runs Discord slash command /submit-bounty [url] in #bounty-submissions. After bot-side checks pass (§5 Steps 1–2), the bot fires a webhook to Zapier Flow 33.

(Source: RFQ_ Stack Trading Prop Tech V7.pdf §2.3; Zapier Integration V7.pdf §Flow 33)


3. Pre-conditions

IDPre-condition
P1#bounty-submissions: Send Messages disabled for @everyone; Use Application Commands enabled.
P2Submitter is a member of the Stack Trading Discord server. Linking a Stack Trading account is not required (QnA [BG-013] — client sheet 2026-11-04).
P3Video is public on TikTok or YouTube Shorts.
P4Gemini 1.5 Pro enterprise configuration with defined data-retention terms is in place.

4. Post-conditions

OutcomePost-condition
PASSPromo code generated (single-use, 100% off Associate Track, origin_user_id logged); URL recorded in bounty_submissions as rewarded; DM + email sent; AUDIT_PASS stored in Google Sheets.
Duplicate URLDM sent; nothing recorded as reward.
Math failureDM with current metrics; no reward; URL not marked rewarded (trader may resubmit).
AI failureDM rejection; no reward; AUDIT_FAIL stored in Google Sheets.
All outcomesExecution logged to BPS_Audit_Log.

5. Basic Flow

Step 1 — URL format validation (Discord Bot, client-side)

Bot checks the input is a valid TikTok or YouTube Shorts URL before accepting. Invalid → Alt-1.

(Source: RFQ_ Stack Trading Prop Tech V7.pdf §2.3 — Validation)

Step 2 — Rate limit (Discord Bot)

One submission per 24 hours per discord_user_id. Exceeded → Alt-2.

Implementation (BA assumption): Redis SET bounty_rate:{discord_user_id} 1 NX EX 86400; key exists → reject.

(Source: RFQ_ Stack Trading Prop Tech V7.pdf §2.3 — Rate Limiting)

Step 3 — Webhook to Zapier

Payload: discord_user_id, url, platform (tiktok | youtube_shorts), timestamp.

Step 4 — Audit Step 1: URL uniqueness

Zapier calls GET /bounty/check-url?url=[URL-encoded]. Middleware queries bounty_submissions.

  • is_unique = false → stop; DM: "This link has already been used to claim a reward." (Alt-3)

(Source: Zapier Integration V7.pdf §Flow 33 Step 1; RFQ V7 §API Check Bounty URL)

Step 5 — Audit Step 2: fetch metrics

Zapier fetches Views, Likes, Comments from the TikTok / YouTube API. On API error, retry 3 times with exponential backoff (within 10 seconds). All retries fail → Exc-1.

(Source: QnA_BACKGROUND_MECHANISMS_CRON.md [BG-015] — client sheet 2026-11-04)

Step 6 — Audit Step 3: quantitative filter (Zapier Filter)

ConditionThreshold
Views≥ 50,000
(Likes + Comments) / Views≥ 0.015 (1.5%)

Both must pass. Otherwise → Alt-4 (Math Failure).

(Source: Zapier Integration V7.pdf §Flow 33 Step 3)

Step 7 — Audit Step 4: Gemini 1.5 Pro forensic audit

  1. PII redaction — strip emails, phone numbers, account identifiers, payment details, full names from all text before sending to the LLM.
  2. Input — video description + top 10 comments.
  3. Prompt (intensive reasoning task, not a basic spam classifier): "Analyze these comments for bot-farm patterns (repetitive emojis, generic praise, identical phrasing). Return 'AUDIT_PASS' or 'AUDIT_FAIL'."
  4. Storage — store only the derived AUDIT_PASS / AUDIT_FAIL in Google Sheets (no raw comments).
  5. AUDIT_FAIL → Alt-5.

(Source: Zapier Integration V7.pdf §Flow 33 Step 4 — LLM Analysis (Privacy-Safe))

Step 8 — Audit Step 5: reward (on PASS)

  1. Call POST /generate-promo-code (type = Associate Track 100%, origin_user_id = submitting trader).
  2. Record URL as rewarded in bounty_submissions.
  3. DM trader: "Success. Your impact is verified. Your free Associate Track code is [promo_code]. It has also been sent to your email."
  4. Query Users by discord_user_id. If a linked user with an email exists → send the code to that email via AWS SES. If no linked account → skip the email; the Discord DM is the only delivery.

(Source: Zapier Integration V7.pdf §Flow 33 Step 5; QnA_BACKGROUND_MECHANISMS_CRON.md [BG-013], [BG-014] — client sheet 2026-11-04)


6. Alternative Flows

IDConditionSystem actionTrader message (Discord)
Alt-1Not a TikTok / YouTube Shorts URLBot rejects; no webhookEphemeral error (copy — see Q5)
Alt-2Already submitted within 24hBot rejects; no webhookEphemeral "one submission per 24 hours" (copy — see Q5)
Alt-3URL already rewardedStop at Step 4"This link has already been used to claim a reward."
Alt-4Math failureStop at Step 6; no reward"Submission logged. You currently have [Views] views and a [Ratio] engagement rate. This bounty requires 50,000 views and 1.5 percent engagement. Resubmit once your metrics update."
Alt-5AUDIT_FAILStop at Step 7; no reward; store AUDIT_FAIL"Submission rejected. Our system detected non-organic engagement patterns. We only reward authentic traffic. Repeated bot-farming attempts will result in an Amplify Program ban."

(Source: Zapier Integration V7.pdf §Flow 33 Steps 1, 5 — Communication Matrix)


7. Exceptional Flows

Exc-1 — Social API unavailable after 3 retries / URL invalid, private or deleted: no reward; the attempt counts toward the 24h rate limit for that discord_user_id; DM the user that verification failed and they may resubmit in 24 hours (copy — see Q5); log to BPS_Audit_Log. (Source: QnA [BG-015] — client sheet 2026-11-04)

Exc-2 — Gemini timeout / malformed output (not exactly AUDIT_PASS / AUDIT_FAIL): treat as not passed (fail-closed); no reward; log for manual review. (BA assumption)

Exc-3 — POST /generate-promo-code failure after PASS: do not mark URL rewarded; Ops alert to #ops-marketing; trader DM pending manual issue. (BA assumption)

Exc-4 — Discord DM blocked by user privacy settings: linked user → email still sent on PASS; log DM failure. Unlinked user → no email either, so the code is not delivered; log for Ops follow-up.


8. Business Rules

BR_9.15.1: Structured Input Only

#bounty-submissions accepts only the /submit-bounty slash command (Send Messages off for @everyone, Use Application Commands on).

(Source: RFQ_ Stack Trading Prop Tech V7.pdf §2.3)

BR_9.15.2: Supported Platforms

Only TikTok and YouTube Shorts URLs are accepted; validated by the bot before submission.

(Source: RFQ_ Stack Trading Prop Tech V7.pdf §2.3)

BR_9.15.3: One Submission per 24 Hours per discord_user_id

The 24h rate limit and the anti-bot strike count are tracked by discord_user_id (linked or not). Failed verifications (API error after retries, invalid/private URL) also count.

(Source: RFQ_ Stack Trading Prop Tech V7.pdf §2.3; QnA_BACKGROUND_MECHANISMS_CRON.md [BG-013], [BG-015] — client sheet 2026-11-04)

BR_9.15.4: One Reward per URL

GET /bounty/check-url returns is_unique = false for any URL already rewarded. Only rewarded URLs block resubmission.

(Source: RFQ_ Stack Trading Prop Tech V7.pdf §API Check Bounty URL)

BR_9.15.5: Quantitative Thresholds

Views ≥ 50,000 AND (Likes + Comments) / Views ≥ 0.015. Both inclusive.

(Source: Zapier Integration V7.pdf §Flow 33 Step 3)

BR_9.15.6: LLM Privacy

PII is redacted before any text reaches the LLM; only the derived PASS/FAIL is stored (Google Sheets); enterprise LLM config with defined retention.

(Source: Zapier Integration V7.pdf §Flow 33 Step 4)

BR_9.15.7: Reward Definition

Single-use, 100% off Associate Track, transferable, origin_user_id logged for audit. (usage_limit = 1 per QnA STAGE1-074.)

(Source: RFQ_ Stack Trading Prop Tech V7.pdf §API Generate Promo Code · QnA_STAGE1_CHECKOUT_ONBOARDING.md STAGE1-074)

BR_9.15.8: Message Copy Is Fixed

Discord DM copy for Alt-3/4/5 and PASS follows the V7 Communication Matrix verbatim (English).

(Source: Zapier Integration V7.pdf §Flow 33 Step 5)


9. Acceptance Criteria

AC_IDFlowGivenThenType
AC-9.15-01Happy pathNew TikTok URL, 80,000 views, 1,000 likes, 300 comments (ER 1.625%), Gemini AUDIT_PASSPromo code generated; URL marked rewarded; PASS DM with code; email sent; AUDIT_PASS in SheetsE2E
AC-9.15-02BoundaryViews = 50,000; ER = 1.5% exactlyPasses Step 6Integration
AC-9.15-03Math fail — views49,999 viewsAlt-4 DM with actual views and ratio; no codeIntegration
AC-9.15-04Math fail — ER100,000 views, 1,400 likes+commentsAlt-4 DM; no codeIntegration
AC-9.15-05AI failGemini AUDIT_FAILAlt-5 DM; no code; AUDIT_FAIL in SheetsIntegration
AC-9.15-06Duplicate URLURL rewarded earlierAlt-3 DM; Steps 5–8 not executedIntegration
AC-9.15-07Rate limitSame user submits twice within 24hSecond rejected by bot; no Zapier webhookIntegration
AC-9.15-08Invalid URLInstagram Reel URLBot rejects; no webhookIntegration
AC-9.15-09PIIComment contains an email addressText sent to Gemini has the email redactedSecurity
AC-9.15-10Channel ACL@everyone posts plain text in #bounty-submissionsNot allowedConfig
AC-9.15-11Unlinked userdiscord_user_id not linked to any Stack Trading account; submission passes all audit stepsPromo code generated; PASS DM with code; no email sentIntegration
AC-9.15-12API failureSocial API errors on all 3 retriesDM verification failed / resubmit in 24h; no reward; second submission within 24h rejected by botIntegration

10. API Reference

GET /bounty/check-url

ParamTypeDescription
urlSTRING (URL-encoded)Submitted video URL

Response: { "is_unique": true }

POST /generate-promo-code

Request (per V7: type, origin_user_id):

{
  "type": "ASSOCIATE_TRACK_100",
  "origin_user_id": "94a2b1c8-3f4e-4b21-a123-890abcdef123"
}

Response: { "promo_code": "STRING" }

type enum values are not defined in V7 — ASSOCIATE_TRACK_100 is a BA placeholder (see Q3).

(Source: RFQ_ Stack Trading Prop Tech V7.pdf §API)


11. Open Questions

IDPriorityQuestionAssumption
Q1HCan a Discord member whose discord_user_id is not linked to a Stack Trading account submit? Who receives the code / email?✅ Answered 2026-11-04 — anyone in the Discord server may submit; DM always, email only if linked ([BG-013]).
Q2HIs there a cap on rewards per trader (e.g. 1 per 30 days)? Not in V7 — only 1 submission/24h and 1 reward/URL.No cap beyond V7 rules.
Q3Mtype values for /generate-promo-code and the target applicable_product_id for Associate Track (which account size / market)?One code valid for Level 1 Associate Track, any market.
Q4MWhich channel sends the PASS email — Klaviyo event (like Velocity_Reward_Unlocked) or AWS SES? Template name/copy?✅ Answered 2026-11-04 — AWS SES, linked users only ([BG-014]).
Q5LCopy for invalid-URL, rate-limit, and API-failure messages (not in V7).BA to draft; client approve.
Q6LIf the audit fails at Step 2 (API error), does the 24h rate-limit still apply?✅ Answered 2026-11-04 — yes, failed attempts count toward the 24h limit; retry 3× first ([BG-015]).
Q7MBan policy conflict: Zapier V7 DM says "Repeated bot-farming attempts will result in an Amplify Program ban", but the #amplify-intel pinned copy (Discord Server Details.md — not in _SOURCE_MANIFEST.yaml) says "immediate and permanent ban" on first detection. Which applies, and is the ban automated or manual?Zapier V7 wording (repeated → ban); ban executed manually by Ops; AUDIT_FAIL history visible in Sheets.
Q8MThe V7 PASS DM says "It has also been sent to your email" — wrong for unlinked submitters (no email sent, [BG-013]). Use a different DM copy for unlinked users? (BR_9.15.8: copy is fixed, cannot change without client approval)Keep V7 copy until client confirms.

12. Changelog

DateVersionChangePreviousAfterSource
2026-11-05v1.1Header; §1 3rd Party; §3 P2; §5 Step 5 (retry), Step 8.4 (email); §7 Exc-1, Exc-4; §8 BR_9.15.3; §9 AC-9.15-11/12 (new); §11 Q1, Q4, Q6, Q8 (new)Linking required; email channel open (Klaviyo assumed); API error 24h rule openNo linking required; DM always, AWS SES email only if linked; social API retry 3×; failed attempts count toward 24hClient sheet 2026-11-04 [BG-013] [BG-014] [BG-015]
2026-10-27v1.0Initial document creation—Full spec: bot validation, 5-step audit, Communication Matrix, BR_9.15.1–8, AC-9.15-01–10Zapier Integration V7.pdf §Flow 33; RFQ_ Stack Trading Prop Tech V7.pdf §2.3, §API

On this page