A Mini App built on Base that enables users to stake $DBRO tokens, earn rewards, and unlock exclusive utilities through wrapped NFTs. Built using OnchainKit, Wagmi, and the Farcaster SDK.
- Token Staking: Stake $DBRO tokens and earn annual rewards
- Reward System: Claim and wrap rewards as NFTs when you reach 100K $DBRO
- NFT Utilities: Unwrap NFTs to access exclusive perks and utilities
- Sponsored Transactions: Gas fees sponsored by Decentral Bros through Coinbase Developer Platform
- Farcaster Integration: Receive transaction notifications through Farcaster
- Portfolio Tracking: Real-time staking stats, balances, and reward tracking
Before getting started, make sure you have:
- Base app account
- A Farcaster account
- Vercel account for hosting the application
- Coinbase Developer Platform API Key
- CDP Paymaster configured for sponsored gas transactions
git clone https://github.com/Mr-Web3/basekit-starter-fork
cd basekit-starter-improvednpm installCreate a .env.local file in the root directory and add your environment variables:
# App Configuration
NEXT_PUBLIC_URL=http://localhost:3000
NEXT_PUBLIC_ONCHAINKIT_API_KEY=<your-cdp-api-key>
NEXT_PUBLIC_ONCHAINKIT_PROJECT_NAME=DBRO Mini App
NEXT_PUBLIC_ONCHAINKIT_PROJECT_ID=<your-project-id>
# Icon For Base Wallet
NEXT_PUBLIC_ICON_URL=http://localhost:3000/newLogoTwo.png
# Template Fork Link (optional)
NEXT_PUBLIC_REPO_FORK_URL=
# Paymaster Sponsored Gas Transactions Config
NEXT_PUBLIC_DBRO_TOKEN_ADDRESS=0x6a4e0F83D7882BcACFF89aaF6f60D24E13191E9F
NEXT_PUBLIC_PAYMASTER_AND_BUNDLER_ENDPOINT=<your-paymaster-endpoint>
# RPC Configuration (optional)
NEXT_PUBLIC_BASE_URL=<base-rpc-url>Note: Copy env.template to .env.local and fill in your values.
npm run devVisit http://localhost:3000 to see your app.
/app- Next.js app directory with pages and API routes/app/staking- Main staking interface page/app/api- API routes for Farcaster notifications and webhooks/app/components- Reusable React components/contracts- Deployed contract addresses and ABIs/lib- Utility functions and hooks/scripts- Manifest generation and validation scripts
The minikit.config.ts file configures your manifest located at app/.well-known/farcaster.json.
To personalize your app, update the miniapp object with your app details:
name: Your app namesubtitle: Short descriptiondescription: Full descriptioniconUrl: Path to your app iconsplashImageUrl: Splash screen imageheroImageUrl: Hero banner imagetags: Array of relevant tags
Note: The accountAssociation object should already be configured. Only update it if you're changing domains or need to re-sign.
vercel --prodYou should have a URL deployed to a domain similar to: https://your-vercel-project-name.vercel.app/
Update your .env.local file with production URLs:
NEXT_PUBLIC_URL=https://your-vercel-project-name.vercel.app/
NEXT_PUBLIC_ICON_URL=https://your-vercel-project-name.vercel.app/newLogoTwo.pngAdd all environment variables to your production environment:
vercel env add NEXT_PUBLIC_URL production
vercel env add NEXT_PUBLIC_ONCHAINKIT_API_KEY production
vercel env add NEXT_PUBLIC_ONCHAINKIT_PROJECT_NAME production
vercel env add NEXT_PUBLIC_ONCHAINKIT_PROJECT_ID production
vercel env add NEXT_PUBLIC_PAYMASTER_AND_BUNDLER_ENDPOINT production
# ... add all other required variablesOr set them directly in the Vercel dashboard under Settings → Environment Variables.
The app uses the following contracts on Base (Chain ID: 8453):
- DBROWrappedStaking: Main staking contract
- DecentralBros (DBRO): ERC-20 token contract
- RYFT: NFT contract for wrapped rewards
Contract addresses are configured in /contracts/deployedContracts.ts.
Gas fees are sponsored through the Coinbase Developer Platform paymaster service. This works with:
- ✅ Coinbase Smart Wallet
- ✅ Coinbase Wallet (smart account)
- ✅ Other wallets with account abstraction support
Note: Traditional EOA wallets (MetaMask, Phantom) will not have sponsored transactions unless they're using account abstraction features.
The manifest is already configured with account association. If you need to re-sign or change the domain:
- Navigate to Farcaster Manifest tool
- Paste your production domain (ex: your-vercel-project-name.vercel.app)
- Click the
Generate account associationbutton - Follow the on-screen instructions to sign with your Farcaster wallet
- Copy the
accountAssociationobject
Update your minikit.config.ts file with the new accountAssociation object:
export const minikitConfig = {
accountAssociation: {
"header": "your-header-here",
"payload": "your-payload-here",
"signature": "your-signature-here"
},
// ... rest of config
}vercel --prodGo to base.dev/preview to validate your app:
- Add your app URL to view the embeds and click the launch button to verify the app launches as expected
- Use the "Account association" tab to verify the association credentials were created correctly
- Use the "Metadata" tab to see the metadata added from the manifest and identify any missing fields
- Connect your wallet (preferably Coinbase Smart Wallet for sponsored gas)
- Ensure you have $DBRO tokens in your wallet
- Test staking, unstaking, and claiming rewards
- Verify Farcaster notifications are received after transactions
To publish your app, create a post in the Base app with your app's URL.
npm run dev- Start development servernpm run build- Build for productionnpm run start- Start production servernpm run lint- Run ESLintnpm run format- Format code with Prettiernpm run manifest:generate- Generate Farcaster manifestnpm run manifest:sign- Sign manifest for account associationnpm run manifest:validate- Validate manifest configuration
- Base Mini Apps Documentation
- OnchainKit Documentation
- Farcaster Mini Apps
- Coinbase Developer Platform
Private project - All rights reserved