ModerationLog
The ModerationLog
is a core on-chain enforcement module responsible for recording all moderation actions on the TRN platform. It provides a tamper-proof audit trail of enforcement events, flagging escalations, and geo-based restrictions. All moderation decisions—automated, DAO-driven, or escalated via AI—are logged here.
🧩 Purpose
Provide a transparent and immutable history of moderation events
Support real-time auditing and dispute resolution processes
Enable cross-contract integration with other moderation tools like
FlagEscalator
,BurnRegistry
, andGeoOracle
✅ Key Responsibilities
Log Moderation Events Every action—burns, geo-restrictions, AI flags, retrn suppressions, escalated content removal—is recorded with metadata:
Action type
Timestamp
Moderator type (User, AI, DAO, CouncilNFT, CountryNFT)
Target post hash or user CID
Resolution status (e.g., pending, confirmed, reversed)
Optional reference to retrn, view, or bless logs
Integrate with FlagEscalator The
ModerationLog
receives threshold-triggered flags from theFlagEscalator
module when user-initiated reports or AI signals surpass defined thresholds.Record Geo-Restrictions When
GeoOracle
enforces a regional block, a corresponding log entry is generated, associating:The post hash
The CountryNFT triggering enforcement
A compliance tag (without disclosing private moderation rules)
Capture DAO Governance Actions DAO-led enforcement such as vetoes, mass burns, or reversals initiated via
ProposalFactory
are logged for transparency and future auditing.Maintain Post State History Ensures that once a post is marked as:
Burned: All earnings are forfeited, cannot be viewed or shared
Flagged: Under review, earning may be paused
Suppressed: Not shown in public feeds
Restricted: Geo-blocked or subscription-locked These states are persistently tracked and cannot be overridden without triggering another event entry.
🛠️ Contract Interface
The ModerationLog
smart contract exposes interfaces for:
solidityCopyEditstruct ModerationEvent {
bytes32 postHash;
address initiator;
string actionType; // "burn", "geo_restrict", "flag", "escalate", "veto"
uint256 timestamp;
address resolvedBy; // Optional
string resolutionStatus; // "pending", "confirmed", "reversed"
bytes extraData; // Optional metadata
}
function logAction(ModerationEvent calldata event) external;
function getLogsForPost(bytes32 postHash) external view returns (ModerationEvent[]);
function getLogsForUser(address user) external view returns (ModerationEvent[]);
⚠️ All interactions must come from whitelisted contracts like
FlagEscalator
,GeoOracle
,ProposalFactory
, or authorized moderators (e.g., CouncilNFT holders).
🔐 Privacy and Transparency
Event Types are Public
Specific GeoBlocking Reasons are Private: CountryNFTs enforce their own semantic rulesets without disclosing post-level justifications. Only the existence of the restriction is public.
Audit Trail is Permanent: Once written, a moderation event cannot be deleted or modified.
🧠 AI Integration
AI Moderators may trigger actions like post flagging, temporary suppression, or geo warnings.
Actions triggered by AI are clearly marked in the log as such.
Escalation from AI to DAO or Council is recorded as a multi-stage event.
🔁 Reversal & Appeal
A reversal can only occur via:
DAO vote (via ProposalFactory)
MasterNFT override
Reversal is logged with
resolutionStatus = reversed
and a reference to the original action.
🔄 Interactions With Other Modules
FlagEscalator
Sends escalation triggers when thresholds exceeded
BurnRegistry
Tracks forfeited earnings from burned posts
GeoOracle
Logs geo-blocks initiated by CountryNFTs
ProposalFactory
Triggers post-level enforcement or reversal actions
CouncilNFT
Enables high-level manual moderation logging
MasterNFT
Veto/reverse capabilities, logs override decisions
Last updated