Coin Your Bangers: Turn Your Jokes into Coins
In this guide we illustrate how to use Smart Wallet and Zora’s content coin SDK to create an engaging consumer application with great UX.
Memecoins and culturecoins have been catalysts of the onchain economy, allowing people to rally around concepts that are fun and engaging with a potential upside.
Memecoins are great for long term community and culture building onchain. Contentcoins are an emergent category of coins focused on valuing individual pieces of content and providing monetization for creators.
Apps like Zora or Flaunch illustrate the power of contentcoins. They create a new category of apps that we may call “contentcoin apps”.
Overview
This example explains “Coin Your Bangers”, a full onchain app that lets users turn their jokes into coins on Base. The app uses OpenAI to generate coin metadata and the Zora SDK to coin the content. From the user’s perspective, the process is simple:
- Input a joke or funny content
- Generate coin metadata using AI
- Deploy a new Zora Coin on Base
- Get transaction confirmation and links
- Start earning referal fees from your the app
- Start earning trading fees from your Coin
The full codebase of this app is available on Github:
Why use Smart Wallet to build your contentcoin app?
Onboarding users to end-consumer onchain apps has always been a challenge, mainly due to the need for a wallet. In the case of web apps, this has always come in the form of a new browser extension to install or a new mobile app to download. In order to solve this, Smart Wallet was created.
Smart Wallet is a new way to universally sign in into any onchain app. This example shows how Smart Wallet can seamlessly onboard users without the need for an installation. If you are building an app for creators and end-consumers, it is important to meet them where they are. Smart Wallet allows you to onboard them with passkeys, a simple pop-up, and no new extension to install.
Does Zora use Smart Wallet?
Yes, Zora integrates Smart Wallet smart contracts directly into their protocol. This allows users to sign in to the app and create contentcoins without any additional steps.
You can see the share of Zora from Smart Wallet transactions on the Dune Dashboard.
Run the app
- Open a terminal and run the following commands:
- Open the repository in your favorite editor (eg. Cursor, VSCode, etc.) and edit the
.env
file with your own values as specified in the README.
- Run the app
Key Components
Wagmi Config (wagmi.ts
)
The wagmi config is used to set up the Smart Wallet client.
CoinButton Component (CoinButton.tsx
)
The deployment button component handles the actual token creation:
Key features:
- Using Zora’s
createCoin
function to create a new coin - Using Smart Wallet and Wagmi to submit the transaction
- Loading states and error handling
- Transaction status tracking
Metadata Generation API
The API endpoint uses OpenAI to generate creative coin metadata:
Features:
- OpenAI integration for creative naming
- Metadata JSON generation
- URI creation for token metadata
- Error handling and validation
Technical Stack
- Frontend: Next.js 13+ with App Router
- Styling: Tailwind CSS
- Onchain tools:
- Smart Wallet for Sign In
- Wagmi for contract interactions
- Zora SDK for coining content
- AI: OpenAI API for metadata generation
- Network: Base
Deployment
You can deploy your app to Vercel by following the instructions here.
Conclusion
This example demonstrates how to build a full-featured onchain application that combines:
- Smart Wallet for Sign In
- AI capabilities
- Coin creation with Zora’s SDK
- Wagmi for contract interactions
- Error handling
- Transaction management
The modular architecture makes it easy to extend or modify for other use cases beyond joke tokenization.