Skip to content

y4motion/farcaster-token-gate

Repository files navigation

Stellar Logo

x402 Mesh: Farcaster Sovereign Token Gate

The cryptographic bouncer for the AI Agent economy.

Part of the x402 Arbitrage Mesh Submission for DoraHacks 2026


🛡️ The Alpha Pitch

A Sovereign Mesh needs a sovereign entry point for humans. We built a zero-trust Farcaster Frame that acts as the absolute gatekeeper for the x402 Arbitrage Mesh dashboard.

If you do not hold the required ERC-20 asset on-chain, you cannot see the Mesh.

🚀 Absolute Zero-Trust Features

  • Neynar Bulk User API: Safely resolves Farcaster FID to connected Ethereum Addresses without trusting client-side injections.
  • Viem Multicall Optimization: Reads balanceOf across multiple connected custody addresses in a single multicall RPC request, vastly reducing latency and RPC strain.
  • Seamless Mesh Handoff: Upon cryptographic verification, the user is authorized and redirected straight into the Sovereign WebGL Mesh Dashboard.

⚙️ Sovereign Node Deployment (Vercel Edge)

This gatekeeper is optimized for blazing-fast Edge Networks to ensure zero latency during the cryptographic handshake.

  1. Deploy to Vercel — One-click import.
  2. Configure Security Parameters:
    • NEYNAR_API_KEY: Required for Farcaster FID resolution.
    • RPC_URL: Base/Mainnet RPC for reading token balances.
    • NEXT_PUBLIC_SITE_URL: The host URL of this frame.
    • NEXT_PUBLIC_MESH_DASHBOARD_URL: The exact URL of your x402 Arbitrage Mesh dashboard. Authorized users are redirected here.

🛠️ Architecture Stack

Layer Technology Purpose
Core Next.js 14 App Router Edge computing and API routing
Farcaster Frog.fm 0.15 + Neynar SDK Frame rendering and FID validation
On-Chain Viem multicall optimized balance reads

Connected to the primary infrastructure: x402-arbitrage-mesh

About

Token-gated access control for Farcaster frames and channels

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors