The problem
Financial lessons compete with everything else in a short-form feed. A useful learning platform needs a way to organize relevant content, give creators a reason to contribute, and make the viewing experience easy to return to.
FinFluence connects these pieces through video intake, transcript-based topic screening, and a token-enabled interface. The technical challenge was carrying a video through that entire system while keeping its media, classification, and engagement records connected.
My contribution
I helped build the multi-service hackathon prototype with the team, connecting the FastAPI pipeline, React experience, content validation, storage, and token workflow. My work centered on bringing those components into one usable path from upload to viewing.
Architecture
The React interface sends a video and its metadata to FastAPI. The upload handler checks the file extension and size, writes a temporary file, and runs transcript screening when AI verification is enabled. A passing upload is stored in GridFS with a separate MongoDB metadata record.
The feed queries verified videos and sorts them by recency or engagement. Streaming reads the stored media in chunks. The metadata connects the title, uploader, topic score, and view count to the media file.
The inspected upload route performs classification before returning its response. Its cleanup block removes the temporary file when the request finishes. This ordering makes the screening decision part of the upload transaction.
Content screening
The classifier extracts audio with FFmpeg and obtains a transcript through Vosk. It embeds that text with all-MiniLM-L6-v2, alongside two fixed descriptions: one containing financial topics and one containing general entertainment and lifestyle topics.
Cosine similarity measures how closely the transcript aligns with each description. The score is the finance similarity divided by the sum of both similarities, multiplied by 100. When that sum is zero or negative, the method returns zero. The upload handler compares the resulting value with its configured threshold.
The figure uses two-dimensional illustrative embeddings to make the calculation visible. Its value comes from the source formula executed on fixed vectors. The production encoder supplies higher-dimensional text representations. Topic relevance is the signal this calculation measures.
def classify(self, transcript):
if isinstance(transcript, list):
transcript_text = " ".join(transcript)
else:
transcript_text = transcript
transcript_embedding = self.model.encode(
[transcript_text],
normalize_embeddings=True
)
finance_sim = cosine_similarity(
transcript_embedding,
self.finance_embedding
)[0][0]
non_finance_sim = cosine_similarity(
transcript_embedding,
self.non_finance_embedding
)[0][0]
total = finance_sim + non_finance_sim
confidence = (finance_sim / total) * 100 if total > 0 else 0.0
return confidenceEngagement and rewards
A view event updates the engagement model, looks up the video, and increments its view count. The response includes the model’s human_index, precision, and a CAPTCHA flag. The flag is set when precision exceeds 0.3 and the human index falls below 0.6.
The handler reads the configured base reward into a local variable. Its response contains the engagement fields. Token delivery is handled through a separate wallet-transfer endpoint, which invokes the SPL treasury and records a transaction signature after a successful transfer.
captcha_required = False
print(metrics)
if metrics['precision'] > 0.3 and metrics['human_index'] < 0.6:
captcha_required = True
print(f"⚠️ Bot behavior detected: human_index={metrics['human_index']}, precision={metrics['precision']}")
try:
# Get video to find creator
video = await request.app.mongodb.videos.find_one({"_id": ObjectId(video_id)})
if not video:
raise HTTPException(status_code=404, detail="Video not found")
creator_wallet = video.get("uploader_id") or video.get("uploader_wallet")
# Calculate reward amount
base_reward = settings.base_reward_finf
total_reward = base_reward
# Increment view count
await request.app.mongodb.videos.update_one(
{"_id": ObjectId(video_id)},
{"$inc": {"views": 1}}
)
return {
"success": True,
"captcha_required": captcha_required,
"human_index": metrics['human_index'],
"precision": metrics['precision'],
"message": "Bot behavior detected. Please complete verification." if captcha_required else "View recorded successfully"
}The project also includes token-management endpoints with demo-mode responses. Keeping the route boundaries explicit makes it possible to trace which action changes a view count, requests verification, or invokes a token transfer.
Results
FinFluence brought video intake, semantic screening, a short-form interface, and a Solana workflow together during SwampHacks XI. The demonstration shows the product experience developed for the event.
Offline fixtures for this case study exercise the pinned classifier and view handler. They cover finance-leaning, general-topic, balanced, and nonpositive similarity inputs; the CAPTCHA thresholds; and view-count updates. Database and engagement-model responses are stubbed. The opening scene uses a fixed illustrative sequence.