Social Graph
The social graph on Tribe is fully on-chain, using a PDA-per-relationship design that is both efficient and scalable.
Link PDAs
Every follow relationship is represented by a tiny (33-byte) Program Derived Address on Solana.
Seed: ["link", follower_tid_le_bytes(8), following_tid_le_bytes(8)]
O(1) Access
Check if A follows B instantly without scanning an entire list.
Rent Reclamation
Unfollowing closes the PDA and returns the SOL rent to the user.
Social Profiles
Every user has a Social Profile PDA that tracks their aggregate counts. These counters are updated by the protocol when links are created or destroyed.
Following
u32 LE
Followers
u32 LE
Delegated Actions
To support the Ephemeral Rollup, the social-graph program includes delegated instructions.
- follow_delegated
Allows a registered sequencer to create a Link PDA on behalf of a user.
- unfollow_delegated
Allows a registered sequencer to close a Link PDA on behalf of a user.