Introduction
Ethereum Follow Protocol (EFP) is an onchain social graph protocol for Ethereum accounts.
EFP List NFT
Users mint an EFP List NFT to create an EFP List.
Minting an EFP List NFT is free (plus gas).
Roles
Every EFP List has three roles, each of which are held by an Ethereum address.
- Owner:
- Is the owner of the EFP List NFT
- Can transfer ownership of the EFP List NFT
- Can edit the List Storage Location, which stores the records for that list, as well as who the Manager and User are
- Manager:
- This is set in the List Records contract, not the NFT
- Is the manager of the EFP list records and metadata
- Can transfer the Manager role to another address
- Can set or update the user
- Can add/remove list records and add/remove tags
- Can add metadata key/value to the list
- User:
- This is set in the List Records contract, not the NFT
- The Ethereum address for whom the list is intended; the Ethereum address that is following the Ethereum addresses in the EFP List.
Typically, all three roles (Owner, Manager, User) are the same Ethereum address, but they can be different.
List Storage Location
Your EFP List NFT specifies a List Storage Location where the List Records are stored, which can be one of the following:
- Ethereum L1 smart contract
- Ethereum L2 smart contract
- CCIP-read pointers for off-chain storage (future)
The List Storage Location itself (the smart contract or off-chain system) must specify a Manager role, an Ethereum account that is able to edit the List Records. Typically, the Manager will be the same Ethereum account as the Owner and User roles of the EFP List NFT, but they can be different.
To prevent frontrunning, a user should first claim a slot number in their chosen List Storage Location, then mint their EFP NFT and set their List Storage Location (with the chain, smart contract address, and secured slot number).
List Records
An EFP List is formed from a set of List Records.
Each record has a record type, but only one record type is supported at launch:
- Address Record
- Contains an Ethereum address, with zero or more tags.
- These records are typically interpreted as a “follow” of the specified Ethereum address, with some exceptions explained in the Followers section below.
Order of operations
While a user may interact with the EFP smart contracts in any order (no order is enforced in the smart contracts), it’s recommended that to prevent frontrunning a user should first claim a slot number in their chosen List Storage Location, then next mint their EFP NFT and set their List Storage Location (with the chain, smart contract address, and secured slot number).
Tags
A Tag is a string associated with a List Record in an EFP list.
Tags only count for an account if that account is also followed by the user, otherwise they’re not counted.
List Records can have zero or more tags. A few tags are standardized with specified semantics. Users may also set custom tags.
Standard Tags
-
no tag
- If a List Record has no tags, it is interpreted as a simple follow without further categorization.
-
”block”
- This tag means neither the user nor the blocked account should see each other’s activity in a relevant app.
- List Records with this tag are not included in Followers count, even if the List Record has other tags.
- If both “block” and “mute” tags are present, “block” takes precedence.
-
”mute”
- This tag means the user shouldn’t see the muted account’s activity in a relevant app, but the muted account might still be able to see the user’s activity.
- List Records with this tag are not included in Followers count, even if the List Record has other tags.
- If both “block” and “mute” tags are present, “block” takes precedence.
-
”top8”
- This tag means the account should appear in the user’s “Top 8” in UIs that support it.
- If a user has more than eight followed accounts with the “top8” tag, then only show the eight most recent should be included in a “Top 8” displayed in a UI.
Custom Tags
Users can use additional arbitrary custom tags. A custom tag can be any UTF-8 string with the following constraints:
- maximum length of 255 bytes
- no leading or trailing whitespace
- more constraints to be added as needed
Account Metadata
EFP provides an Account Metadata contract that allows users to set EFP-related metadata specific to their Ethereum account, namely to specify a Primary List.
Primary List
Determining if a list is a Primary List is a two step process: the Ethereum account that set it as the Primary List in Account Metadata must match the User role for the list.
Apps should first check the Primary List value for an Ethereum account, and if set, default to using that EFP List for that Ethereum account.
Only Primary Lists are counted as Followers.
Social Graph
The social graph is formed from the union of all Primary Lists. The User role of each Primary List determines which Ethereum account is following the Ethereum addresses in that List.
Followers
Followers is the total number of EFP Primary Lists that follow a particular account, excluding those whoe block or mute the account.
Following
Following is the total number of unique Ethereum accounts followed by a list, excluding accounts tagged with “block” or “mute”.