Skip to content

Communities

A community is a public label, written as m/monad in post content. CommunityRegistry records who registered a name and who has joined. It cannot delete posts, ban accounts, transfer names, or upgrade the protocol.

Why membership isn't in storage

Every algorithm takes rank(viewer, candidateIds), and candidate selection already happens outside the ranking contract. The indexer filters by community, then reuses any algorithm without modification. The label is right in the existing post event, so posting still costs exactly one transaction.

Names and label matching rules

A name is 3–21 characters of lowercase ASCII letters, digits or _, right-padded to fill bytes32. The contract validates on-chain because the indexer must recover names from free text unambiguously.

Resolution rules:

  • The first m/name token standing alone wins: it starts at the beginning of the text or after whitespace, and ends at whitespace or the end of the text.
  • Matching is case-insensitive.
  • URLs and text with attached punctuation don't count.
  • The name must be registered before the post's (block, logIndex). A late registration cannot be assigned back to an old post, even in the same block.
  • On encountering the first unregistered tag it stops, and doesn't jump to a later tag.
  • Replies inherit the parent's community.

Register, join, leave

  • Creating a community does not automatically join it.
  • Join and leave are both idempotent — calling again doesn't error or double up.
  • Member counts and post counts are derived by the indexer, not stored in the contract.
  • Only the creator can call setMetadata to describe the community. That's authority over the description of their name, not over other people's content. Metadata is emitted in an event; the client receives JSON with description and icon (including data URIs).

In the app

PathPage
/m/Your communities and Explore, with search and a create button
/m/<name>Community feed, post button

The directory is two tabs on one page: the ones you have joined, and the ones you could. Explore leads, because a new account's list is empty by definition.

Home collects posts from communities you've joined. With nothing joined, Home is empty — that's why Popular exists.

Documentation for Monad testnet. It describes what is actually running.