FIP: Direct Casts #226
Replies: 7 comments 10 replies
-
Small typo in title FYI ("Auth Addresses") |
Beta Was this translation helpful? Give feedback.
-
A suggestion that metadata keys should use hyphen instead of space, like so:
PGP, HTTP, MIME follow same convention. Reason being that these symbols are often hardcoded in a source code where string whitespace can cause subtle bugs. |
Beta Was this translation helpful? Give feedback.
-
Will the API endpoints be similar to the existing Warpcast specific API Spec? |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
It techincally looks good, probably the allowlist is the only thing that is proposterous, there's no reason to have that because if users sign willy nilly with custody account, then they can lose the account itself very easy, anyone can make such a malicious page today to lose the account if you just sign anything. Which means the allowlist is not justified, it doesn't make sense, the allowlist represents just bad optics, it should be completely open from the start to better measure the demand, because it makes sense to not decentralize the compute of DC if there is low demand anyway. Allowlists are what kill any kind of "WEB3" vibes, I mean you put a wallet in the app, enabled by default, but you expect that people can be easily tricked, even if the allowlist will be eventually removed, then what's the sense to have it in the first place? Will the users be 3x times wiser after a year? The allowlist logic is just flawed. |
Beta Was this translation helpful? Give feedback.
-
Does the token expire and need to be renewed periodically? Would renewals require a signature from the custody address's seed phrase? Asking to confirm how long Foocaster needs access to the imported custody seed phrase for.
Is this the only mechanism or will a deeplink based signed message from Warpcast also be supported? |
Beta Was this translation helpful? Give feedback.
-
I read the discussion and it seems to me that each person is talking about this FIP having their own use case in mind and each case has very different security profiles and expectations.
What are we trying to solve? There is no way to agree, unless the top use case is clearly defined. There is no gold standard for all of them together. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
FIP: Direct Casts
Title: Direct Casts
Type: Implementation FIP
Authors: @ashoat, @deodad , @v
Abstract
TBD
Problem
Users on public social networks often want to start private conversations within their apps. Networks like X and Instagram have their own in-built messaging system even though general purpose systems like Whatsapp and Signal exist. The simplicity of being able to tap a profile and send a message to someone without switching to a different app or network is important.
Warpcast has a direct messaging system built into its app that uses the Farcaster social graph. It would benefit the ecosystem if this was interoperable so that other clients could easily integrate it into their applications. It would also be useful if this messaging layer was programmable so that developers could easily build agents that can communicate directly with users without having to go through the public messaging layer.
End-to-end encryption and decentralization are out of scope for the initial version of the protocol and will be considered in the next version. While Farcaster users want e2e encryption and decentralization, interoperability and programmability are by far the most important priorities. Trying to achieve all four goals will significantly slow down the release of this protocol and may even make some features impossible to build or difficult to implement in a user friendly way.
Proposal
Farcaster operates a direct cast server which lets apps send and receive messages on behalf of their users. A user must authorize an app by signing a message from their custody address, which then allows that app to fetch messages on their behalf. This is similar in architecture to the fname server which handles off-chain fname registrations.
Authentication
Users sign an ECDSA EIP-191 signature from the custody address. It includes a nonce, timestamp and application url to prevent replay attacks.
The application relays this signed message to the DC server, which returns a shared secret that can be used to fetch messages. All further request to the DC server are performed using this message. The user can also produce a revocation signature which removes the app’s permissions to keep fetching messages.
APIs
The Direct Cast server exposes APIs for all functionality like sending messages, fetching an inbox and searching through messages. Most endpoints will provided as HTTP endpoints except for receive message and notification count endpoints which use websockets.
Apps will need to build their own UI for displaying messages and systems for sending push and in-app notifications to their users when new messages are received.
Lifecycle: adding a new client and sending messages
Security
Rate limits — the server will implement per user and possibly per app rate limits to protect against accidental or intentional DDOS attacks.
Encryption at rest — messages are encrypted at rest on the dc server to protect against a compromise of the database or its backups.
ECDSA authentication — access to messages requires authentication from the user controlled ECDSA keypair which prevents any app from getting access to direct messages without explicit permission from the user’s device.
Allowlisted access — access to the DC server will be allowlisted in 2025. this prevents a malicious app from tricking a user into importing their seed phrase and then being able to access all their group chat messages. we plan to open this up in 2026.
Rationale
Why not users signers to fetch messages?
Existing signers cannot be used since users have already authorized many without the expectation that they can read private messages. A new class of signer could be introduced but we propose using custody addresses and [auth addresses](#225) instead since they are more likely to be treated securely by users.
Why is this not end-to-end encrypted?
Adding end to end encryption slows down the pace at which we can ship features and makes some features quite challenging or impossible to build. The large feature gap between telegram and signal is indicative of this challenge, and the majority of farcaster users have indicated that they want to prioritize usability and crypto forward features over end-to-end encryption.
Why is this not decentralized?
Decentralized messaging requires a network of servers and would require e2e encryption to be implemented first. It’s not a priority for most users relative to interoperability and programmability.
Release
The initial version (v0) of the DC server will implement most of this specification and be embedded in Warpcast’s backend. This will likely ship in April or May 2025.
The next version (v1) will have a standalone server and will likely ship closer to the end of 2025.
Beta Was this translation helpful? Give feedback.
All reactions