Repository navigation
Open
Labels
enhancementNew feature or request
Description
Summary
Three moderation features for board owners: a moderation queue on /account, creator-defined auto-moderation rules, and an approval-required mode.
How moderation works today
app/api/moderation/route.ts:GETreturns one global KV set (moderation:flagged) of8453:<markee>keys.POSTflags or unflags a markee. It is authorized for global admins (lib/moderation/config.ts), the board's on-chainadmin(), or the board's KV-cached creator. The board is derived from the markee'spricingStrategy()and is never trusted from the client./accountonly shows aFlagButtonon each board's top message. There is no view of all messages on a board and no notion of "reviewed".- Integrations fetch
/api/moderationand hide anything inflagged. Messages are on-chain, so moderation is display-layer only. It cannot stop a message from being written. - There are no per-board moderator lists. "Moderator" means global admin, board admin, or board creator (see the note at
frontend/app/account/page.tsx:1092).
1. Moderation queue on markee.xyz/account
Users can review every message on every board they moderate, from their dashboard.
- Queue UI on
/account: a "Moderation" section listing pending items across all boards the connected wallet moderates. Each item shows the board, message text, author name/address, what happened (new message or edit, with the old text for edits), and time. It has Approve and Flag buttons. - Notifications: any new message or edit on a board the user moderates adds an item to their queue. Show a count badge on the account nav, and a toast or popup when new items arrive while
/accountis open. - Event source: new messages come from
MarkeeCreated, and edits fromMessageUpdated/MessageChanged, on every board version (v1.x fixed and streaming). Options:- Use the subgraph, which already has
MarkeeandMessageUpdateentities, if it covers every board version and factory we care about. - Otherwise, extend an existing cron to scan logs from a stored cursor block, as the other factory scans do.
- Use the subgraph, which already has
- Storage (KV): a per-markee moderation state
pending | approved | flagged, plusreviewedBy/reviewedAt, and a per-board index of pending items.approvedis a new state. Today onlyflaggedexists. - API:
GET /api/moderation/queue?moderator=<addr>(with a signed message, same as the current POST), and extendPOST /api/moderationwithaction: 'approve'. ReuseisAuthorized(). - An edit re-queues a message that was already approved. Approval covers specific text, not the markee forever.
2. Auto-moderation rules
Board creators set rules that block inappropriate messages automatically.
Constraint: messages are written on-chain, so we can't stop a transaction from landing. Enforcement has two layers:
- Before submitting (soft block): markee.xyz's modals, and embeds via the prompt, call a check endpoint before sending the transaction. If the message fails the board's rules, the submit button is disabled with a reason. This catches honest users before they pay.
- On index (hard hide): every new message or edit is run through the same rules. A failure is auto-flagged (with the rule that matched recorded), so it never displays, even if someone bypasses the UI and calls the contract directly.
True on-chain blocking would need contract changes, such as a moderator-signed allowlist for createMarkee. That is out of scope here, but worth writing down as a later option.
- Rules per board, stored in KV and editable by the creator/admin on
/account:- word/phrase blocklist, plus an opt-in default profanity list
- block URLs/links
- block wallet addresses and ENS names (common scam pattern)
- toxicity/NSFW model with a threshold (off / lenient / strict)
- Open-source options to evaluate:
obscenity(MIT, TypeScript): profanity matching that handles leetspeak and obfuscation. It runs in our Next.js routes with no extra infrastructure. Likely the default for the word-list layer.- LDNOOBW lists, for multilingual word coverage.
- Model-based classification: Detoxify (Apache-2.0), or open-weight safety classifiers such as Llama Guard or ShieldGemma behind a hosted inference endpoint. These are more accurate on context, but add latency and cost. Put them behind the threshold setting, and cache results by message hash.
- Phishing link detection, open source: https://github.com/urlvet/urlvet
- OpenAI Moderation: https://developers.openai.com/api/docs/guides/moderation?api-mode=responses
-
POST /api/moderation/checkwith{ board, message, name }→{ ok, reasons[] }, CORS-open so embeds can call it directly. - Add the pre-submit check to
frontend/lib/embedPrompt/fragments.tsso new integrations get the soft block.
3. Approval-required mode
A per-board setting: new messages and edits don't appear until a moderator approves them.
- Board setting
requireApproval, which feeds the queue from part 1. - What displays while pending: the board keeps showing its most recent approved message, or a "pending approval" placeholder if there is none. We need to pick one; I'd lean toward the last approved message.
- Public API changes: existing integrations only know the
flaggedset, so they would show pending messages. Enforce the hide server-side in/api/ecosystem/leaderboardsand the per-platform leaderboard routes, sotopMessagenever returns unapproved text. Also add apendinglist, or make the response an allowlist, in/api/moderation. - Embeds that read
topMarkee()/message()straight from the chain, which the streaming prompt currently recommends, bypass the API entirely. Update the embed prompt so on-chain-sourced messages are also checked against moderation state. Integrations built before this change will need a note to re-run the prompt. - Buy modals on markee.xyz and in embeds should tell the buyer, before they pay, that the board requires approval.
Open questions
- Payment while pending or rejected: a fixed-board buyer has already paid, and a streaming backer is paying per second, before approval. Is that acceptable if it's disclosed up front, or do rejections need a refund path? For streaming, a rejected message should probably prompt the backer to stop the stream.
- Should board owners be able to add delegated moderators beyond admin/creator? It's related to all three parts, but could be its own issue.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or request
Activity
PaulBurgEth commentedon Nov 4, 2026
Adding the growth side to part 2 (auto-moderation rules), now that the part 1 queue is on
dev. cc @tnrdd @pglavin2, and @Corantin for the SDK side.Why it matters for integrations
A site with real traffic answers for what its visitors see. Today a paid message is live as soon as the transaction lands, and moderation starts only after someone notices it. "You can hide it if something bad shows up" asks the owner to watch the board, and we expect larger sites to stop there. A check on Markee's side before a message shows is what lets us pitch them.
Suggested order for part 2
POST /api/moderation/checkfrom the buy modal, the SDK modal and the embed prompt, so honest buyers don't pay for a message that will be hidden.createMarkeecan be called directly andupdateMessageedits are free (contracts/v1.3/Leaderboard.solL155-163, L184-190), so the scan runs the same check and auto-flags failures. On boards with a strict setting,/api/embed/[address]and the SDK snapshot return only text that passed, otherwise the last approved message or a neutral placeholder.packages/sdk/src/sign.tsL58 ondev).Gaps noticed while reading
dev(may already be on your list)app/api/github/update-markee-file/route.ts) writes the on-chain top message without checkingmoderation:flagged./api/embed/[address]is cached 60s and the script polls every 60s, so a flag can take about 2 minutes to reach host sites. Clearingcache:embed:<addr>on flag writes, like the SDK snapshot generation bump (app/api/moderation/route.tsL154-156), would close that.Test cases (we'll add more as we hear from sites):
<slur> aimed at a group of peopleCheck your token approvals at app-un1swap.orgClaim your airdrop, connect wallet at bit.ly/xyzSend 0.1 ETH to 0x1234...abcd and get 2x backSupport desk: DM your seed phrase to recover fundsSend ETH to giveaway-claim.eth and get 2x backgm from alice.eth[name] is a fraud, don't trust this projectSupport open source builders on BaseFunding round for public goods is live this weekOne question: is part 2 planned for this month? It decides when we start pitching larger sites.