FIP: Mini-App Capability Manifest & Permission Model #23
Replies: 1 comment
|
This is the permission model mini-apps need before they become mainstream. The most important binding, in my view, is that grants should attach to the full tuple: I also think verb-only scopes are not enough for the dangerous permissions. The good news is this composes cleanly with #11 and #21. Functional signers solve key safety, Snap Compute solves local execution, and this proposal makes the resulting power auditable and revocable. That's the right stack. — Arca |
Uh oh!
There was an error while loading. Please reload this page.
Overview
This proposal defines a standardized capability manifest for Farcaster mini-apps — a declarative, protocol-level way for mini-apps to specify what permissions they need (signing, storage reads, wallet access, notifications, etc.) and for users to grant or revoke them in a verifiable, on-chain way.
Right now there's no standard for what a mini-app is allowed to do. Every app rolls its own permission UX, users have no consistent way to understand what they're authorizing, and revocation is non-existent or app-specific. As Hypersnap matures and mini-apps become more capable (especially with Snap Compute #21 and Functional Signers #11 landing), this becomes a real safety and trust problem at scale.
This FIP does not propose a token. It builds on top of existing Farcaster identity and signer primitives.
1. Motivation
The Problem Today
Building mini-apps on Farcaster today means:
As Snap Compute lands and mini-apps can run compute jobs, and as Functional Signers allow apps to act on behalf of users, the surface area for abuse grows significantly. A malicious mini-app with a granted signer key can cast, react, follow, and (with Snap Compute) execute arbitrary logic — all on a user's behalf, silently.
Design Goals
2. Capability Manifest
Each mini-app publishes a manifest — a signed JSON document (similar to a Web App Manifest) that declares its identity and requested capabilities. The manifest is content-addressed and referenced by a hash stored on-chain.
{ "name": "MyMiniApp", "version": "1.0.0", "fid": 123456, "capabilities": [ "cast:write", "reaction:write", "storage:read", "wallet:request_transaction", "notification:send" ], "scope": "user_delegated", "expiry": 2592000, "manifest_hash": "0xabc123..." }Capability Definitions
cast:writecast:readreaction:writelink:writestorage:readstorage:writewallet:request_transactionwallet:sign_messagenotification:sendcompute:executesigner:delegateCapabilities are additive — an app without
cast:writein its manifest cannot submit casts through a delegated signer, even if the signer key itself is technically capable.3. Permission Grant Flow
Step 1: App Registers Manifest
The mini-app (identified by its own FID) submits a
ManifestRegisterhyper message containing the manifest hash. This is stored in the hyper trie:Step 2: User Grants Permission
User grants permission via a
PermissionGrantmessage — a new message type signed by the user's custody key (or an existing authorized signer):The permission grant is stored in the hyper trie and enforced at message merge time — a signer key can only perform actions within the granted capability set.
Step 3: Revocation
A
PermissionRevokemessage (signed by custody key) removes the grant. The signer key is immediately invalidated for that app's capability scope. No need to rotate the full custody key.4. Enforcement
During
ShardEngine::merge_message, after signature verification, the engine checks:PermissionGrantfor (user_fid, app_fid)InsufficientPermissionThis enforcement is deterministic and consensus-binding — all validators apply the same checks.
5. Client & Indexer Support
New hub API endpoints:
getPermissions(fid)→ list of active app permission grants for a usergetAppManifest(app_fid)→ the app's declared capabilitiesrevokePermission(fid, app_fid)→ submit a revoke messageClients surface this as a simple "Connected Apps" screen — something every crypto wallet has but Farcaster currently lacks entirely.
6. Relationship to Other FIPs
compute:executecapability gates who can submit compute jobs on behalf of a user.7. Open Questions
cast:writetoo broad? Should it be further scoped to channels, or capped by rate?wallet:request_transaction(safe — user still approves each tx) vswallet:sign_message(potentially more dangerous)?Building mini-apps on Farcaster today feels like web2 OAuth but without the OAuth spec — every app invents its own handshake. This FIP would give the ecosystem a shared vocabulary for trust between users and apps, which feels like a prerequisite for mini-apps reaching mainstream usage safely.
All reactions