Skip to content

Moderation

The Social Moderation contract enables community-driven content moderation. Moderators are elected by the DAO and can flag posts and ban users, with all moderation actions recorded on-chain for transparency and accountability. The protocol also integrates local LLMs in user applications as background content flaggers, providing automated first-pass moderation while maintaining human oversight through the elected moderator system. All moderation operations are accessed through the main SocialSDK.

Moderators are elected and removed through DAO governance:

import { SocialSDK } from '@akta/sdk/social'
const social = new SocialSDK({ algorand })
// Add a moderator (requires DAO wallet)
await social.addModerator({ address: moderatorAddress })
// Remove a moderator
await social.removeModerator({ address: moderatorAddress })
const meta = await social.getModeratorMeta({ user: address })
// meta.exists — whether the address is a moderator
// meta.lastActive — timestamp of last moderation action

Moderators can flag posts that violate content policy:

// Flag a post (requires moderator role)
await social.flagPost({ ref: postKey })
// Unflag a post
await social.unflagPost({ ref: postKey })

Flagged posts can be filtered by frontends. The flagging status is stored on-chain, so any client can check whether a post has been flagged.

Moderators can ban users with an expiration timestamp:

// Ban a user for 7 days
const sevenDays = 7n * 86_400n
const expiration = BigInt(Math.floor(Date.now() / 1000)) + sevenDays
await social.ban({
address: userAddress,
expiration,
})
// Unban early
await social.unban({ address: userAddress })
const banned = await social.isBanned({ account: userAddress })
OperationMBR (ALGO)
Add moderator0.0189
Ban user0.0189
Remove / UnbanRefunded

The Social Moderator Gate is a subgate that verifies whether a caller has moderator status. It can be composed with other gates:

Gate + Social Moderator Subgate → Only moderators can execute

See Gates for details on composing access control.