FIP: Permissionless Onboarding #91
Replies: 13 comments 23 replies
-
Permissionless Onboarding [Draft]Farcaster’s next goal is permissionless signups so that developers can onboard users into their apps. Our identities must be:
IdentifiersUsers must have a Farcaster ID or fid, which is a durable identifier included in every message. It’s important that this is not the username or key pair used to authorize messages which might change over the life of an account. Ideally, this is a random value that never changes and is never exposed in UI, but is the cornerstone of the user’s identity. Current State Fids are issued via the ID Registry contract on Goerli. A user can acquire an id and map it to an Ethereum address which is used to sign off-chain messages. These fids can be transferred to new addresses at any time. If migrated to mainnet, signing up would cost 50k gas or ~ $5 today. Ideas
NamesUsers must have a unique, human-readable username to make tagging and mentioning easy. Farcaster should support multiple namespaces since early ETH users might have an ENS and new users may need a cheap, starter name. It’s less important that this namespace is fully decentralized, since the identifier is the decentralized mechanism that ensures user security. Current State Fnames are acquired via the Name Registry on Goerli. A user can acquire an ERC-721 fname and associate it with an fid by placing it in the same address. If migrated to mainnet, signing up would require two transactions and cost ~150k gas which is about $15 at today’s prices. Farcaster also plans on supporting using ENS names if the user already owns one. Ideas The experience for new users without an ENS name can be simplified if we;
WalletsUsers need to have a wallet to register a new fid, but using a pre-existing wallet may be impractical:
The smoothest onboarding experience is for apps to create a new wallet for the user. Apps can either cover the cost of registration if it makes financial sense or charge the user in crypto or fiat. The downside is that users are very likely to lose the seed phrase to this wallet and we need a recovery system to protect them against loss. Current State Warpcast creates a new wallet for every user and pays for the gas costs on the Goerli network. It backs up the seed phrase to a key manager on mobile devices, which makes it less likely that the user loses their keys. The Farcaster Id Registry and Farcaster Name Registry contract implement a simple recovery system which allows another address to recover the fid and fname if list. Ideas A challenge is that the user starts with this new wallet as a throwaway hot-wallet, but it might accumulate assets slowly over time. The recovery system only recovers the farcaster identities and not other assets that may be in there.
Storage CostsIf registration costs are kept low, its very likely that a large number of airdrop farmers or otherwise spammy accounts will join the network and flood the hubs. This is not ideal and may cause Hubs to run out of space and become very difficult to operate. Current State We do not charge for storage, assigning all users an identical amount which will become problematic. Ideas Users can pay for different tiers of storage with a yearly payment to a smart contract, monitored by the Hubs. The payment prevents hubs from being flooded by acting as a barrier to entry and also provides a spam-filtering signal for users of Farcaster. Client AffordancesClients can simplify onboarding by letting users signup with an email address. Their messages and likes can be “unverified” and not propagated across hubs until they acquire an on-chain identifier. This makes it easy for users to start playing around with the network before committing to a decentralized option. Clients can also encourage users to sponsor other users by paying their registration fees. While this will only happen for some users, it is a very powerful signal that can be used to build a relationship graph. |
Beta Was this translation helpful? Give feedback.
-
I understand this will continue to be highly discussed topic. So wanted to jump in early on the conversation. Just to get to the point, my biggest concern with permissionless onboarding is Spam. At this early stage of the protocol, we need to plan for some adversarial behavior (as mentioned in Storage Cost)
Primary, takeaway for me is fid's should be required as some measure of spam prevention along with a potential storage cost selection option for users, with a minimum "free tier". |
Beta Was this translation helpful? Give feedback.
-
Would recommend OIDC complaint so FC id can be used as authn for other apps too. Could do a progressive pinning to chain for purple check mark? |
Beta Was this translation helpful? Give feedback.
-
Hi @varunsrin thanks for this. A lot to unpack here. A couple of questions/thoughts. (More thinking out loud than providing any proposed solutions or concrete inputs at this stage.)
Since recovery is a Farcaster contract, it would seem also that user could sign up from Jam and initiate recovery from Warpcast by calling the FC contract.
And thinking through the whole mechanics more |
Beta Was this translation helpful? Give feedback.
-
I came here to say that I love this set of proposed ideas @varunsrin . Thank you for putting it out. I think it's makes the most sense to "Deploy the registry on an L2, trading security and stability for lower cost" How easy is it to move a registry contract in the situation that the L2 turns out to have stability issues? That would be my primary concern. I'm not that worried about security for the FID contract on an L2. If I remember correctly, an L2 sequencer can't execute a transaction that is invalid. All it can do is censor transactions or re-order them. And if the sequencer wasn't processing transactions, users could always push the transaction to mainnet. I also like the idea of allowing "Issue free ENS sub-domain names like foo.farcaster.eth which can be managed by a server for now and issued on-chain in the future". a LOT more users are using "decentralized IDs" on ENS because of Generally, I do agree with folks saying that registration needs to be cheap in order for Farcaster to grow. Maybe something like $1-5/year would be fine (I think Whatsapp had a $1 signup fee which could prevent bots). What kind of cost are you thinking here: "Users can pay for different tiers of storage with a yearly payment to a smart contract"? It seems like <10% of users have more than 100 casts. So if you charged a new user $1/year for their first 100 casts, it would cost a spammer $1/100 casts at a minimum. Seems like reasonable spam prevention? Then, maybe $1/month for 100-1000 casts? |
Beta Was this translation helpful? Give feedback.
-
This is me thinking out loud and trying to learn more: (1)
L2 looks promising. Deploying on L2 should also increase protocol revenue since it can charge more while keeping the total cost (fee + gas) lower? Speaking of protocol revenue, how much would be required to keep the protocol running? I imagine there would be a revenue cap beyond which it will stop charging users for registration. (2)
Just to make sure I understand this point, if a user wants to use their existing wallet, what would be the UX downside? They have to sign a couple txs when signing up or creating new signers? (3) Re. spam prevention, I imagine we should be charging $ per cast (with a free tier) instead of storage. If someone wants to spam the network by replying to everyone, they probably don't care if their old cast will be purged due to storage limit. Tagging and reactions should probably also have limits, otherwise the spammer could just send notification to everyone (this could be solved on a client level but we should put guardrails on the protocol level if possible) |
Beta Was this translation helpful? Give feedback.
-
Identifiers
From where I sit, L2s are ready for this use case. Yes, they have additional room for scaling and decentralization, but they have clear roadmaps and are progressing quickly. Names
This would be my recommendation. There are a number of benefits to this, including:
Wallets
One idea that I have here is that we could make the Farcaster ENS name leverage EIP-6551 to have a account directly connected to it. That account could be configured at start to be controlled by the wallet you create, but then you could create a UX that would allow users to easily add other address for recovery. I believe this would be a very elegant way of adding multiple recovery addresses and beginning to think about the Farcaster name as more than just a name - actually a full enabled onchain account. |
Beta Was this translation helpful? Give feedback.
-
Follow-ups from my previous comment and your response @varunsrin
|
Beta Was this translation helpful? Give feedback.
-
Thanks I think this makes a lot of sense. My north star here is how can we reduce friction, ideally abstracting away any crypto native terminology and costs. I agree some costs act as a spam barrier, but getting each user to pay $10 may not be the best way to solve this problem, as it will inhibit adoption long term as farcaster grows beyond crypto natives. I understand these things will be adjusted over time, but I think ethereum mainnet gas fees are a major hurdle and the security of an L1 is probably not needed. I suspect apps will want to maximize retention of users and demonstrate key value props of using their app over a permissioned alternative. Not posting the content to hubs seem contrary to this a little. I suspect apps will want to boost users at the start and post to hubs ideally and pay a tiny amount of fees for the user, and then if the users retains convert them to pay the full tx fee for registering an fname or similar. Not sure how this translates to the protocol |
Beta Was this translation helpful? Give feedback.
-
Counterfactual Wallet Identity ApproachA user can sign a transaction to make a new smart contract wallet with a recovery system that allows a primary address (user's EOA) and a secondary address (friend, third party etc) to control assets in the wallet. Without broadcasting and paying for this transaction, the user can determine what address it will occupy using CREATE2. Assets can be sent here knowing that user can deploy the contract in the future and take control of the assets. Farcaster Hubs will treat signed messages from the primary address as valid messages on behalf of the smart contract's CREATE2 address. The address of the counterfactual wallet can be used as the fid instead of using a numeric identifier. Since the address is a recoverable smart contract, it is much more durable than an EOA address which cannot be used as fid. Therefore a user can claim an fid without actually making an on-chain transaction. This design achieves three things:
How is a Farcaster account created?
How does Alice change her key pair?If Alice wants to change her primary address to 0x…890, she can:
How does Alice recover her key pair?If Alice loses the keypair to 0x…123, she can:
What are the downsides of this approach?The biggest drawback is that the complexity is high and there are more edge cases and migration challenges to worry about.
|
Beta Was this translation helpful? Give feedback.
-
Smart Contract L2 Identity ApproachA user can deploy a smart contract wallet to a specific L2 which houses the Farcaster ID Registry contract which can be used to claim an identifier. The smart contract specifies a primary EOA address which is the owner (which can be used to sign messages) and a recovery address which can take other actions on behalf of the wallet. The benefits of this approach are:
How is an account created on L2?
How does Alice change her key pair?If Alice wants to change her primary address to 0x…890, she can:
How does Alice recover her key pair?If Alice loses the keypair to 0x…123, she can:
What are the downsides of this approach?Relative to the counterfactual wallet approach:
Relative to the EOA approach:
Relative to using L1’s:
What happens if we pick the “wrong” L2?Assuming that another L2 crops up that has much better speed/security guarantees, there are two approaches:
Open Questions
Additional Notes
|
Beta Was this translation helpful? Give feedback.
-
The first design decision we need to make is whether we want integer based fids or address based fids. The decision of what wallet type to use — EOA, MPC, 4337, Counterfactual etc — is a second-order, client-level decision. Any wallet type can be used irrespective of the identity system used, though there is some slight variation in costs and features. The main criteria for choosing between the two systems are:
Address-Based FIDsA user begins by making a payment to the storage contract for an ethereum address, which becomes the user’s permanent identity. A smart contract wallet’s address can be used if the user wants this address to be recoverable. Hubs will accept any message signed by the ethereum address or by the valid owner of the Ethereum address according to the smart contract.
Integer-Based FIDsA user begins by claiming a unique integer from an on-chain registry contract and making a payment to a storage contract. The integer is assigned to a specific Ethereum address, which can change ownership to another address and nominate a recovery address. Hubs will accept any message signed by the ethereum address that owns the fid or by the valid owner of that Ethereum address if a smart contract is deployed there.
|
Beta Was this translation helpful? Give feedback.
-
closing this discussion since we are now officially on OP Mainnet. Thanks for all the input on this! |
Beta Was this translation helpful? Give feedback.
-
WIP: Ideas to enable permissionless, decentralized onboarding
Beta Was this translation helpful? Give feedback.
All reactions