SRS: UC_9.15 — Flow 33: Amplify Bounty Verification
| Field | Value |
|---|---|
| UC_ID | UC_9.15 |
| Version | v1.1 |
| Last Updated | 2026-11-05 |
| BA PiC | linh.nguyen34 |
| Category | BACKGROUND MECHANISMS & CRON JOBS |
| Module | Flow 33 (4.9.3/4.9.4) |
| Function | Amplify Bounty |
| Document References | Zapier 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_ID | Function | Description |
|---|---|---|
| UC_9.15 | Flow 33 — Amplify Bounty Verification | Trader 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
| Field | Value |
|---|---|
| Use Case | Amplify Bounty Verification & Reward |
| Description | Rewards 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. |
| Actor | Trader (Discord member) · System (Discord Bot, Zapier, Middleware, Gemini 1.5 Pro) |
| Zapier Flow | Flow 33 |
| Trigger Source | Discord Bot webhook from /submit-bounty |
| 3rd Party | Discord · TikTok API · YouTube Data API · Google Gemini 1.5 Pro · Google Sheets · AWS SES (PASS email — linked users only) |
| Middleware Endpoints | GET /bounty/check-url · POST /generate-promo-code |
| Related UCs | UC_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
| ID | Pre-condition |
|---|---|
| P1 | #bounty-submissions: Send Messages disabled for @everyone; Use Application Commands enabled. |
| P2 | Submitter 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). |
| P3 | Video is public on TikTok or YouTube Shorts. |
| P4 | Gemini 1.5 Pro enterprise configuration with defined data-retention terms is in place. |
4. Post-conditions
| Outcome | Post-condition |
|---|---|
| PASS | Promo 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 URL | DM sent; nothing recorded as reward. |
| Math failure | DM with current metrics; no reward; URL not marked rewarded (trader may resubmit). |
| AI failure | DM rejection; no reward; AUDIT_FAIL stored in Google Sheets. |
| All outcomes | Execution 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)
| Condition | Threshold |
|---|---|
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
- PII redaction — strip emails, phone numbers, account identifiers, payment details, full names from all text before sending to the LLM.
- Input — video description + top 10 comments.
- 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'."
- Storage — store only the derived
AUDIT_PASS/AUDIT_FAILin Google Sheets (no raw comments). 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)
- Call
POST /generate-promo-code(type= Associate Track 100%,origin_user_id= submitting trader). - Record URL as rewarded in
bounty_submissions. - DM trader: "Success. Your impact is verified. Your free Associate Track code is [promo_code]. It has also been sent to your email."
- Query
Usersbydiscord_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
| ID | Condition | System action | Trader message (Discord) |
|---|---|---|---|
| Alt-1 | Not a TikTok / YouTube Shorts URL | Bot rejects; no webhook | Ephemeral error (copy — see Q5) |
| Alt-2 | Already submitted within 24h | Bot rejects; no webhook | Ephemeral "one submission per 24 hours" (copy — see Q5) |
| Alt-3 | URL already rewarded | Stop at Step 4 | "This link has already been used to claim a reward." |
| Alt-4 | Math failure | Stop 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-5 | AUDIT_FAIL | Stop 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_ID | Flow | Given | Then | Type |
|---|---|---|---|---|
| AC-9.15-01 | Happy path | New TikTok URL, 80,000 views, 1,000 likes, 300 comments (ER 1.625%), Gemini AUDIT_PASS | Promo code generated; URL marked rewarded; PASS DM with code; email sent; AUDIT_PASS in Sheets | E2E |
| AC-9.15-02 | Boundary | Views = 50,000; ER = 1.5% exactly | Passes Step 6 | Integration |
| AC-9.15-03 | Math fail — views | 49,999 views | Alt-4 DM with actual views and ratio; no code | Integration |
| AC-9.15-04 | Math fail — ER | 100,000 views, 1,400 likes+comments | Alt-4 DM; no code | Integration |
| AC-9.15-05 | AI fail | Gemini AUDIT_FAIL | Alt-5 DM; no code; AUDIT_FAIL in Sheets | Integration |
| AC-9.15-06 | Duplicate URL | URL rewarded earlier | Alt-3 DM; Steps 5–8 not executed | Integration |
| AC-9.15-07 | Rate limit | Same user submits twice within 24h | Second rejected by bot; no Zapier webhook | Integration |
| AC-9.15-08 | Invalid URL | Instagram Reel URL | Bot rejects; no webhook | Integration |
| AC-9.15-09 | PII | Comment contains an email address | Text sent to Gemini has the email redacted | Security |
| AC-9.15-10 | Channel ACL | @everyone posts plain text in #bounty-submissions | Not allowed | Config |
| AC-9.15-11 | Unlinked user | discord_user_id not linked to any Stack Trading account; submission passes all audit steps | Promo code generated; PASS DM with code; no email sent | Integration |
| AC-9.15-12 | API failure | Social API errors on all 3 retries | DM verification failed / resubmit in 24h; no reward; second submission within 24h rejected by bot | Integration |
10. API Reference
GET /bounty/check-url
| Param | Type | Description |
|---|---|---|
url | STRING (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" }
typeenum values are not defined in V7 —ASSOCIATE_TRACK_100is a BA placeholder (see Q3).
(Source: RFQ_ Stack Trading Prop Tech V7.pdf §API)
11. Open Questions
| ID | Priority | Question | Assumption |
|---|---|---|---|
| Q1 | H | Can 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]). |
| Q2 | H | Is 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. |
| Q3 | M | type 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. |
| Q4 | M | Which 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]). |
| Q5 | L | Copy for invalid-URL, rate-limit, and API-failure messages (not in V7). | BA to draft; client approve. |
| Q6 | L | If 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]). |
| Q7 | M | Ban 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. |
| Q8 | M | The 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
| Date | Version | Change | Previous | After | Source |
|---|---|---|---|---|---|
| 2026-11-05 | v1.1 | Header; §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 open | No linking required; DM always, AWS SES email only if linked; social API retry 3×; failed attempts count toward 24h | Client sheet 2026-11-04 [BG-013] [BG-014] [BG-015] |
| 2026-10-27 | v1.0 | Initial document creation | — | Full spec: bot validation, 5-step audit, Communication Matrix, BR_9.15.1–8, AC-9.15-01–10 | Zapier Integration V7.pdf §Flow 33; RFQ_ Stack Trading Prop Tech V7.pdf §2.3, §API |