Decentralized Marketplace for Micro-Tasks on Base L2
BaseBounty is a fully decentralized platform where anyone can post small jobs with ETH payments, and workers can apply, complete tasks, and build onchain reputation. Built on Base L2 for low costs and integrated with Farcaster Mini Apps.
- Post Bounties: Create tasks with ETH payments and deadlines
- Apply & Work: Browse tasks, apply, and submit completed work
- Secure Payments: Funds locked in smart contract, released on approval
- Dispute Resolution: Community-based voting system for disagreements
- Onchain Reputation: Ratings and reputation tracked permanently on Base
- Multi-Category: Design, development, writing, translation, research, and more
- Smart contract optimized for Base L2 gas costs
- Reentrancy protection and comprehensive security measures
- 2% platform fee for sustainable ecosystem
- Full test coverage (>80%)
- Farcaster Mini App integration
- Responsive dark-mode UI with Tailwind CSS
BaseBounty/
βββ contracts/ # Solidity smart contracts
β βββ BaseBounty.sol # Main contract (250+ lines)
β βββ test/ # Comprehensive test suite
βββ frontend/ # React + TypeScript frontend
β βββ src/
β β βββ components/ # UI components
β β βββ hooks/ # Custom React hooks
β β βββ context/ # Web3 context
β β βββ types/ # TypeScript types
β β βββ utils/ # Contract ABI and helpers
β βββ public/
β βββ .well-known/
β βββ farcaster.json # Mini App manifest
βββ scripts/ # Deploy, verify, interact scripts
βββ README.md
- Node.js v18+
- npm or yarn
- MetaMask or compatible Web3 wallet
- ETH on Base network
- Clone the repository
git clone https://github.com/yourusername/basebounty.git
cd basebounty- Install dependencies
# Install root dependencies (Hardhat)
npm install
# Install frontend dependencies
cd frontend
npm install
cd ..- Configure environment
# Copy environment template
cp .env.example .env
# Edit .env with your values
PRIVATE_KEY=your_private_key_here
BASESCAN_API_KEY=your_basescan_api_key
PLATFORM_WALLET=your_platform_wallet_address- Compile contracts
npm run compile- Run tests
npm test-
Make sure you have ETH on Base
- Bridge ETH to Base via bridge.base.org
- Minimum recommended: 0.01 ETH for deployment
-
Deploy contract
npm run deploy:base-
Copy contract address from the output
-
Verify on Basescan
npm run verify:base -- <CONTRACT_ADDRESS> <PLATFORM_WALLET># Start local Hardhat node
npm run node
# In another terminal, deploy to local network
npm run deploy:local
# Run interaction script
CONTRACT_ADDRESS=0x... npm run interactcreateBounty()- Create new bounty with ETH paymentacceptWork()- Accept submitted work and release paymentrejectWork()- Reject work with reasoncancelBounty()- Cancel if no applicationsrateUser()- Rate worker after completion
applyToBounty()- Apply to bounty with cover lettersubmitWork()- Submit completed work (URL/IPFS)createDispute()- Create dispute if work unfairly rejectedrateUser()- Rate creator after completion
voteOnDispute()- Vote on active disputesresolveDispute()- Execute dispute resolution after timeout
- Set up environment
cd frontend
cp .env.example .env- Update
.env
VITE_CONTRACT_ADDRESS=your_deployed_contract_address
VITE_BASE_RPC_URL=https://mainnet.base.org- Start development server
npm run dev- Open browser
- Navigate to http://localhost:3000
- Connect MetaMask to Base network
cd frontend
npm run build- Push code to GitHub
git init
git add .
git commit -m "Initial commit"
git branch -M main
git remote add origin https://github.com/yourusername/basebounty.git
git push -u origin main-
Connect to Vercel
- Go to vercel.com
- Click "New Project"
- Import your GitHub repository
-
Configure Build Settings
- Framework Preset: Vite
- Root Directory: frontend
- Build Command:
npm run build - Output Directory:
dist
-
Add Environment Variables
VITE_CONTRACT_ADDRESS- Your deployed contract addressVITE_BASE_RPC_URL-https://mainnet.base.org(optional)
-
Deploy
- Click "Deploy"
- Wait for deployment to complete
- Copy your Vercel URL (e.g.,
https://basebounty.vercel.app)
-
Update URLs in code
- Update URLs in
frontend/public/.well-known/farcaster.json - Update URLs in
frontend/index.htmlmeta tags - Replace
https://basebounty.vercel.appwith your actual URL
- Update URLs in
-
Redeploy
- Push changes to GitHub
- Vercel will automatically redeploy
- Deployed frontend on Vercel
- Farcaster account
- Install Farcaster SDK (already done)
cd frontend
npm install @farcaster/miniapp-sdk-
SDK Integration (already done)
- SDK is imported and initialized in
App.tsx sdk.actions.ready()called on component mount
- SDK is imported and initialized in
-
Create Required Images
You need to create these images and place them in frontend/public/:
-
logo.png (512x512px)
- App icon shown in lists
- Clean, simple design representing tasks/bounties
- Transparent or solid background
-
splash.png (1080x1920px)
- Vertical splash screen shown while loading
- Include BaseBounty branding
- Background color: #10b981 (emerald green)
-
embed.png (1200x630px)
- OG image for social sharing
- Horizontal orientation
- Include key value proposition
-
hero.png (any size, ~1200x600px recommended)
- Hero image for landing
- Showcase main features
-
screenshots/ (3 images, ~1170x2532px each)
1.png- Bounty list view2.png- Bounty detail with applications3.png- User profile with reputation
Design Tips:
- Use consistent color scheme (emerald green #10b981, dark grays)
- Keep text readable on mobile
- Show actual UI elements
- Use tools like Figma, Canva, or Photoshop
- Generate Account Association
After deploying to Vercel:
- Go to https://www.base.dev/preview
- Click on "Account association" tool
- Enter your Vercel domain:
https://basebounty.vercel.app - Click "Verify" and follow instructions
- Copy the generated
header,payload, andsignature - Update
frontend/public/.well-known/farcaster.json:
{
"accountAssociation": {
"header": "eyJ...",
"payload": "eyJ...",
"signature": "MHg..."
},
"miniapp": {
...
}
}-
Commit and push changes to trigger redeploy
-
Test Your Mini App
-
Enter your Vercel URL
-
Test all features:
- Mini App launches correctly
- Splash screen displays
- App loads without errors
- Wallet connection works
- All interactions function
-
Publish on Base App
-
Create a post on Base App
-
Include your Vercel URL in the post
-
Your Mini App will automatically appear as an interactive card
-
Users can launch your Mini App directly from Base
Typical transaction costs on Base:
| Action | Estimated Gas | Cost (~0.1 gwei) |
|---|---|---|
| Create Bounty | ~150k gas | ~$0.01-0.02 |
| Apply to Bounty | ~80k gas | ~$0.005-0.01 |
| Submit Work | ~60k gas | ~$0.003-0.006 |
| Accept/Reject | ~100k gas | ~$0.006-0.012 |
| Create Dispute | ~120k gas | ~$0.007-0.014 |
| Vote on Dispute | ~70k gas | ~$0.004-0.008 |
| Rate User | ~90k gas | ~$0.005-0.01 |
Costs are significantly lower than Ethereum mainnet (100-1000x cheaper)
- Design - Logos, graphics, UI/UX, illustrations
- Development - Coding, smart contracts, bug fixes, features
- Writing - Articles, blog posts, documentation, copywriting
- Translation - Language translation, localization
- Research - Market research, data gathering, analysis
- Marketing - Social media, content creation, campaigns
- Data Entry - Data input, spreadsheet work, organization
- Review - Code review, content review, testing
- Other - Miscellaneous tasks
- Reentrancy Protection: Guards on all state-changing functions
- Checks-Effects-Interactions: Proper pattern implementation
- Access Control: Only authorized users can perform actions
- Input Validation: Comprehensive validation of all inputs
- Custom Errors: Gas-efficient error handling
- Locked Funds: Payments secured in contract until completion
- Dispute System: Fair resolution mechanism
- Deadline Enforcement: Prevents expired bounty manipulation
Run the comprehensive test suite:
# Run all tests
npm test
# Run with gas reporting
npm run test:gas
# Run with coverage
npx hardhat coverageTests cover:
- Bounty creation and validation
- Application process
- Work submission and review
- Payment distribution
- Dispute creation and voting
- Rating system
- Edge cases and error conditions
contracts/
βββ BaseBounty.sol # Main smart contract
βββ test/
βββ BaseBounty.test.js # Test suite
frontend/src/
βββ components/ # React components
β βββ Header.tsx
β βββ BountyList.tsx
β βββ BountyDetail.tsx
β βββ CreateBountyForm.tsx
β βββ UserProfile.tsx
βββ context/
β βββ Web3Context.tsx # Web3 connection management
βββ hooks/
β βββ useBounties.ts # Fetch bounties
β βββ useReputation.ts # User reputation
βββ types/
β βββ index.ts # TypeScript definitions
βββ utils/
βββ BaseBountyABI.json # Contract ABI
scripts/
βββ deploy.js # Deploy contract
βββ verify.js # Verify on Basescan
βββ interact.js # Interact with contract
Smart Contract
- Solidity 0.8.20
- Hardhat
- Ethers.js v6
- Base L2 optimizations
Frontend
- React 18
- TypeScript
- Vite
- Tailwind CSS
- Ethers.js v6
- @farcaster/miniapp-sdk
Deployment
- Vercel (frontend)
- Base Mainnet (contract)
1. "Invalid Amount" error when creating bounty
- Ensure payment is at least 0.000001 ETH
- Check you have enough ETH for payment + gas
2. "Please switch to Base network"
- MetaMask: Click network dropdown β Add Base Mainnet
- Or use the "Switch to Base" button in the app
3. "Failed to connect wallet"
- Ensure MetaMask is installed
- Refresh the page
- Try disconnecting and reconnecting
4. ".well-known/farcaster.json not found"
- Verify file exists in
frontend/public/.well-known/ - Check
vercel.jsonhas correct rewrites - Clear Vercel cache and redeploy
5. "Transaction failed" errors
- Check you're on Base network
- Verify contract address is correct
- Ensure you have enough ETH for gas
- Check transaction on Basescan for specific error
6. Mini App not displaying in Farcaster
- Verify manifest URL is accessible
- Check accountAssociation is filled
- Test at base.dev/preview first
- Ensure all image URLs are valid
- Open an issue on GitHub
- Check contract on Basescan
- Review transaction logs
- Test on Base Sepolia first
- Base Documentation
- Base Mini Apps Guide
- Basescan Explorer
- Base Bridge
- Farcaster
- Vercel Documentation
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License.
Built with β€οΈ for the Base ecosystem
For questions or support, please open an issue on GitHub.