FollowGraph

Module for recording on-chain user-to-user follow relationships. Powers feed routing, curation visibility, and AI-based personalization.


🧩 Purpose

The FollowGraph contract manages the social layer of the TRN platform. Every time a user follows another, the relationship is recorded on-chain for durability, transparency, and to enable deterministic behavior for content routing.

It plays a critical role in:

  • Determining what shows in a user's follow feed

  • Routing retrned posts from curators to their audience

  • Enhancing AI targeting for content and ad delivery

  • Supporting resonance weighting based on user relationships


⚙️ Core Logic

The FollowGraph contract uses on-chain mappings to store all follow relationships:

solidityCopyEditmapping(address => mapping(address => bool)) public isFollowing;
mapping(address => address[]) public followers;
mapping(address => address[]) public following;

These mappings enable constant-time queries like:

  • Is user A following user B?

  • Who follows user A?

  • Who is user A following?

The contract is append-only for followers, with removals (unfollows) tracked via a separate flag or nullification to maintain event integrity and indexing compatibility.

All write operations are recorded on-chain, but bulk read queries are offloaded to the indexer for efficient personalization and feed hydration.


✅ Key Rules

Rule
Enforced By

Users may follow/unfollow any other public user

FollowGraph

Follow events are immutable and recorded as events

FollowGraph

A retrned post shows up in all followers’ feeds

RetrnIndex + FG

Content visibility is routed based on these relationships

Feed System

AI uses these relationships to cluster resonance and targeting

AI Targeting


🧠 AI & Personalization Integration

The AI distribution logic uses FollowGraph in tandem with:

  • User embeddings (semantic interest vectors)

  • Retrn history

  • Boosting metadata

  • Flag history

To determine what content a user should see next, especially when:

  • Viewing trending posts

  • Receiving AI-recommended boosted posts

  • Being selected for ad impressions

Follow relationships weight relevance but are not absolute determinants — content still rises or falls based on real-time engagement and resonance.


🔁 Integration with Retrns

When a user retrns a post, the retrn is indexed in the RetrnIndex, and their followers (from FollowGraph) are notified and shown the retrned post in their feeds.

  • The system ensures a user cannot retrn their own post

  • Only one retrn per user per post per day is allowed

  • The retrn points back to the original post, not the boosted wrapper

This enables a non-hierarchical social curation system where value is distributed based on trust and resonance, not follower count alone.


🚫 Abuse Prevention

While the platform allows open follows, AI bot detection and trust-weighted moderation infrastructure monitor for patterns such as:

  • Sudden bot-driven mass follows

  • Engagement pods

  • Fake influencer clusters

If detected, these patterns can be suppressed algorithmically in feeds or moderation tools, though the raw follow mappings remain public and unaltered.


Module
Purpose

RetrnIndex

Records retrns, tied to follower routing via FollowGraph

BoostingModule

Distributes campaign posts, enhanced by social graph relevance

AI Targeting

Uses social graph to improve recommendation precision

FlagEscalator

May incorporate social trust metrics in future extensions

GeoOracle

Enforces regional blocks after social mapping

ModerationLog

Ensures users don’t see flagged or burned content, regardless of follows


🔒 Privacy

All follow relationships are public and on-chain. This transparency:

  • Enables open ecosystem innovation (analytics, alternate frontends)

  • Prevents shadowbanning or algorithmic manipulation

  • Supports social accountability for curated content

Last updated