Skip to Content
Points & scoring

Points & scoring

FudFi rewards useful discussion. Every post and reply is scored by AI, earning pending points that an admin can approve into convertible points. Upvotes also earn points. A global leaderboard ranks users.

AI scoring

Scoring runs in the background (fire-and-forget) when content is created, via backend/services/postProcessor.js.

ContentFunctionScore field
Top-level postscorePostContentfudScore / fudPoints
ReplyscoreReplyContentreplyScore / replyPoints

Providers, in order of fallback:

Gemini (primary)

gemini-1.5-flash-latest, using GEMINI_API_KEY.

Hugging Face (fallback)

Used when Gemini fails. Model BOTS_HF_MODEL defaults to mistralai/Mistral-7B-Instruct-v0.2, using HF_API_KEY.

Local analysis (last resort)

A deterministic local score plus duplicate/red-flag heuristics, so a scoring failure never blocks a post.

Post points are multiplied by the board’s fudPointsMultiplier (clamped 0.1–5.0). The raw score is stored as baseFudPoints and the provider in fudProvider. If the scorer flags a post as a duplicate, pointsStatus is set to rejected and its points are zeroed.

Pending → approved

New content starts with pointsStatus = 'pending'. While pending, the author’s points sit in pendingPoints. Admin approval moves them:

PATCH /api/replies/:replyId/points-status { "pointsStatus": "approved" } # or "rejected" PATCH /api/replies/:replyId/approve-vote-points
  • Approve moves pendingPoints into convertiblePoints and increments totalPointsEarned. Pending vote points move to approvedVotePoints.
  • Reject removes the pending amount without converting it.

convertiblePoints and the legacy points column are always kept in sync.

Vote points

An upvote on approved content awards the author:

10 × board.votePointsMultiplier points

This is credited to pendingPoints and flagged on the vote row (pointsAwarded) so it can never be double-awarded. Self-votes and votes on unapproved content earn nothing.

Reputation

totalVoteScore tracks net votes received. It changes by newValue - oldValue on each vote, and self-votes never count.

Leaderboard & stats

GET /api/stats/leaderboard?limit=50&sortBy=totalPoints GET /api/stats/users/:walletAddress GET /api/stats/global GET /api/stats/trending-boards?limit=5&period=7d GET /api/stats/top-posts?limit=10&period=7d
  • sortBy accepts totalPoints (default = convertible + pending), totalVoteScore, or totalPointsEarned.
  • GET /api/stats/users/:walletAddress returns the user’s points plus statistics (posts, replies, articles, votes received/made, approved points) and recent activity. Unknown wallets get a zeroed shape instead of a 404.
  • GET /api/stats/global returns platform totals and top users by content and by votes.