I built Crosscaster to solve a simple problem we were facing at Onchainsite: posting the same content to both Farcaster and Twitter requires opening two apps, copying text, and managing two separate workflows. For creators building audiences across Web3 and Web2 platforms, this friction adds up quickly.
Instead of building another standalone app, I created a Farcaster mini app that lives directly inside a Farcaster client. This tutorial walks through the terminology, technical decisions, implementation challenges, and cost structure that make Crosscaster work. Feel free to watch the video below for a quick overview.
Understanding the Foundation
What Is Farcaster?
Farcaster is a decentralized social protocol that enables developers to build social applications where users own their data and relationships. Unlike traditional social networks controlled by single companies, Farcaster operates on blockchain infrastructure, storing user identities onchain while keeping posts and social interactions in a distributed network of servers called Hubs.
The protocol's key difference is user autonomy. Your Farcaster account belongs to you, not to any specific app. You can move between different Farcaster clients without losing your followers, posts, or social graph. Developers can build clients with unique features while accessing the same underlying network of users and content.
Farcaster combines onchain elements (user registration, identity) with offchain efficiency (storing posts, managing feeds). This hybrid approach delivers the ownership benefits of blockchain without sacrificing performance or user experience.
What Are Farcaster Mini Apps?
Building on this decentralized foundation, Farcaster mini apps are lightweight web applications that run inside Farcaster clients like the Base App. Unlike traditional apps that require separate downloads and installations, mini apps load instantly within the social feed. If you want to understand how mini apps evolved into the Base ecosystem, that article provides helpful context.
Mini apps provide several key capabilities that made Crosscaster possible:
Native Wallet Integration: Every user has an embedded Ethereum wallet with no setup required. This enables instant payments for premium features without leaving the app.
Signer Permissions: Users grant mini apps permission to post on their behalf through a one-time approval flow. Once approved, the app can create casts without requiring signatures for each post.
User Context: Mini apps automatically receive user information like username, profile picture, and follower count, eliminating authentication flows.
Cross-Platform: The same mini app works across all Farcaster clients, from mobile to web, without platform-specific builds.
For Crosscaster, these features meant I could focus entirely on the cross-posting logic rather than building authentication, payment processing, or wallet connection from scratch.
Understanding the Base App
The Base App is Coinbase's all-in-one platform that combines social networking, trading, payments, and mini app discovery. Built on Base, the Ethereum Layer 2 network, it serves as the primary consumer gateway to the onchain economy.
For mini app developers, the Base App offers critical advantages:
Built-In Distribution: Mini apps appear in the discovery feed and can be shared directly in posts, putting them in front of engaged users without marketing spend.
Smart Wallet Infrastructure: Every Base App user has a passkey-secured smart wallet that enables instant transactions. With the recent release of EIP-7702 upgrade, users can now upgrade their existing EOA to a smart wallet.
Farcaster Integration: The social feed runs on the Farcaster protocol, giving mini apps access to a decentralized social graph where users own their data and relationships.
Creator Economy Focus: The platform emphasizes direct creator monetization via coin posts and creator coins, .
Base App is the perfect platform to build on because it provides direct distribution to an existing user base of millions of daily active users.
Building Crosscaster
Solving the Twitter API Cost Problem
Building any app that writes to Twitter means confronting one harsh reality: the API is expensive. Twitter's Basic tier costs $200 per month for just 50 write requests per day across all users of your app. That's not per user. That's total.
For Crosscaster, this created an impossible math problem. With even modest adoption, I'd burn through the daily quota in minutes. Upgrading to Pro at $5,000 monthly wasn't viable for a free tool. I needed a different approach.
The solution came through two mechanisms: limiting free posts and monetizing additional usage.
Global Quota Management: I implemented a banner showing remaining posts in the daily quota. The first post each day is free for all users. This prevents one user from consuming the entire quota while keeping the core experience free.
Per-Post Pricing: After using their free post, users pay $0.01 per additional tweet through X402. This covers my API costs while keeping the barrier low enough that price-sensitive users can still post.
This hybrid model keeps Crosscaster free for light users while generating enough revenue from power users to cover Twitter's API fees. Combined with my Neynar API costs of approximately $13 monthly for Farcaster integration, the economics work at modest scale.
Implementing X402 for Micropayments
X402 is an open protocol that enables HTTP-native payments using the dormant 402 "Payment Required" status code. Instead of subscriptions or API keys, it enables true pay-per-use pricing for any web service.
The protocol works through a simple flow:
- Client requests a resource from your API
- Server responds with HTTP 402 and payment requirements
- Client sends USDC payment onchain
- Client retries request with payment proof
- Server verifies payment and returns resource
For Crosscaster, integrating X402 meant adding literally one line of middleware code:
paymentMiddleware("0xYourAddress", { "/post": "$0.01" });This line tells the server to require a $0.01 USDC payment for any request to the /post endpoint. When a user clicks "crosscast" after using their free post, their wallet prompts for payment approval. Once confirmed, the post goes through.
The simplicity is remarkable. No payment processor integration, no subscription management, no billing cycles. The protocol handles verification, settlement, and even currency conversion automatically. Payments settle in under two seconds on Base with effectively zero fees.
This made monetizing my API trivially easy while keeping the user experience clean. Users see a payment request, approve it with one tap, and continue posting. No account creation, no stored payment methods, no recurring charges.
Building the Cross-Posting Flow
The core technical challenge in Crosscaster is handling username mapping between platforms. A user with the Farcaster username "alice" might have the Twitter handle "@alice_crypto". Simply copying text between platforms breaks mentions and tags.
My solution uses the Neynar API to automatically detect and map usernames:
Real-Time Parsing: When a user types a cast, I scan for mentions using Farcaster's @username syntax.
Neynar API Lookup: For each mentioned Farcaster account, I query the Neynar API to check if that user has connected an X (Twitter) profile to their Farcaster account. Many Farcaster users link their X accounts in their profile metadata.
Platform-Specific Formatting: I create two versions of the post. The Farcaster version keeps original mentions. The Twitter version replaces each @farcaster_user with their linked @twitter_handle when available. If no X profile is linked, the mention is preserved as-is.
This ensures that mentions work correctly on both platforms without requiring users to manually edit their posts or maintain separate username mappings.
Managing Signer Permissions
Farcaster uses a signer system to allow apps to post on behalf of users. Creating a signer requires onchain approval, which typically costs gas fees and slows onboarding.
For Crosscaster, I sponsor these transactions through Neynar's managed signer service. When users click "enable posting," the approval flow happens instantly with no cost. I cover the onchain fees because the friction of paying gas would kill conversion.
This represents a $0.02–0.05 cost per new user, but it's worth it. The alternative is requiring users to approve transactions, wait for confirmations, and understand gas fees before they can even try the app.
Once approved, the signer remains valid indefinitely unless users manually revoke permissions. This means the one-time cost enables unlimited future usage.
Technical Architecture
Crosscaster runs as a Next.js application deployed on Vercel. The architecture is straightforward:
Frontend: React components using Minikit from OnchainKit for user context and wallet interactions. The interface shows post composition, quota status, and links to published content.
API Routes: Next.js API endpoints handle Twitter OAuth callbacks, post creation, and payment verification. These routes integrate with both the Neynar and Twitter APIs.
Database: I use Supabase to store user connections, Twitter tokens, and posting history. This tracks which users have used their free daily post and manages the global quota.
Payment Processing: X402 middleware wraps my posting endpoint, handling payment requirements automatically. I don't write any payment verification logic.
The entire codebase is under 2,000 lines. Mini apps eliminate most of the complexity that traditional apps require.
Cost Structure and Sustainability
Operating Crosscaster costs approximately $13 monthly for Neynar API access. This covers all Farcaster interactions, including posting casts, fetching user data, and managing signers.
Twitter API costs vary with usage. At current scale of 17 posts daily across all users, I pay roughly $200 monthly for Basic tier access. X402 micropayments from users who exceed the free quota generate enough revenue to offset this cost.
The key insight: I don't need to profit from every user. By making the first post free and charging only for additional usage, I serve casual users at a loss while power users subsidize operations. This feels fair because heavy users extract more value and can afford small payments.
If I scaled beyond 17 posts daily, I'd need to increase per-post pricing or switch to a different Twitter API tier. But the current model works for my user base without forcing everyone into paid plans.
Lessons and Next Steps
Key Learnings from Building Crosscaster
Mini Apps Lower Development Costs: Building inside Farcaster eliminated months of work. No authentication system, no wallet integration, no payment infrastructure. I focused entirely on the core cross-posting logic.
X402 Makes Monetization Trivial: Adding micropayments took one line of code. Traditional payment integration would have required weeks of development, PCI compliance, and ongoing maintenance.
API Costs Drive Product Decisions: Twitter's pricing forced me to design around scarcity. The quota system and per-post pricing exist purely because of external API costs, not product vision.
Free Tiers Matter: Making the first post free daily means users can try Crosscaster with zero risk. This dramatically improves conversion compared to requiring payment upfront.
Sponsoring Onboarding Works: Covering gas fees for signer approval removes friction that would otherwise kill adoption. The $0.02 cost per user is worth the improved experience.
Building Your Own Mini App
If you're considering building a Farcaster mini app, start with these resources:
The official mini apps documentation walks through setup, SDK integration, and publishing. The create-mini-app CLI scaffolds a basic project in minutes.
For payment integration, the X402 protocol documentation includes examples for Express, Next.js, and other frameworks. The middleware approach makes implementation surprisingly simple.
And of course, you can use Onchainsite to build and deploy your mini app without writing code. Our visual builder handles the technical setup while you focus on your app's unique features.
What's Next for Crosscaster
I plan to keep Crosscaster free and accessible, even if there are API / maintenance costs attached. The current pricing model scales reasonably well, and I'm exploring ways to reduce costs through batch posting and improved quota management.
Potential future features include support for videos, thread posting, and scheduling. Each addition requires balancing value against API costs, but the core cross-posting functionality will remain free for daily use.
The broader lesson from building Crosscaster applies to any developer working with expensive external APIs: hybrid monetization models that combine free tiers with usage-based pricing can be quite fitting.
Getting Started
To use Crosscaster, search for it in the Base App / Farcaster and connect your Twitter account. The first post each day is free. Additional posts cost $0.01 each via X402 until the global quota resets.

For developers interested in building similar tools, the combination of mini apps, smart wallets, and micropayments creates opportunities that weren't possible even a year ago. The infrastructure exists. The distribution channels work. The payment rails are instant.
The question isn't whether to build onchain anymore. It's what you're going to build.