A satirical Web3 application that gamifies welfare distribution through NFTs with token-bound accounts (ERC-6551) and cryptocurrency tokens. Built as commentary on wealth inequality and social safety nets.
Disclaimer: This is a satirical art project. Not real government assistance. Cryptocurrency tokens have no guaranteed value.
- Overview
- Architecture
- Smart Contracts
- Tokenomics
- Quick Start
- Development
- Deployment
- Testing
- Security
- Contributing
- License
The EBT Program allows users to:
- Apply for an EBT Card through a gamified application process
- Mint an EBT Card NFT (0.02 - 2 ETH, you choose your contribution)
- Receive a Token Bound Account (ERC-6551) with $EBTC tokens
- Claim monthly token stipends (3 claims per season)
- Reapply each season to continue receiving benefits
- ERC-721 NFTs with unique EBT Card designs
- ERC-6551 Token Bound Accounts - each NFT owns its own wallet
- $EBTC ERC-20 Token - 20 billion max supply
- Fair Fundraising - soft cap protection with refunds if not met
- Marketplace Safety - automatic TBA locking when NFTs are listed
┌─────────────────────────────────────────────────────────────────┐
│ SYSTEM ARCHITECTURE │
├─────────────────────────────────────────────────────────────────┤
│ │
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
│ │ Frontend │───▶│ Backend │───▶│ Contracts │ │
│ │ (Next.js) │ │ (Express) │ │ (Solidity) │ │
│ └──────────────┘ └──────────────┘ └──────────────┘ │
│ │ │ │ │
│ ▼ ▼ ▼ │
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
│ │ Privy │ │ Prisma │ │ Sepolia │ │
│ │ Auth │ │ (SQLite) │ │ Testnet │ │
│ └──────────────┘ └──────────────┘ └──────────────┘ │
│ │
└─────────────────────────────────────────────────────────────────┘
TheEBTProgram/
├── frontend/ # Next.js 14 frontend application
│ ├── src/
│ │ ├── app/ # App Router pages
│ │ ├── components/ # React components
│ │ └── lib/ # Utilities and hooks
│ └── package.json
│
├── smart-contracts/ # Foundry smart contracts
│ ├── contracts/ # Solidity contracts
│ ├── foundry-test/ # Foundry tests
│ ├── script/ # Deployment scripts
│ └── foundry.toml
│
├── ebt-express/ # Express.js API backend
│ ├── src/
│ ├── prisma/ # Database schema
│ └── package.json
│
└── docs/ # Additional documentation
| Contract | Address | Description |
|---|---|---|
| EBTProgram | 0x9A7809EB76D30A754b730Dcfff1286bBff0775aa |
Main NFT contract (SNAP) |
| FoodStamps | 0xd89406651698c85423e94D932bac95fA5Ab729Ec |
ERC-20 token ($EBTC) |
| ERC6551Registry | 0xb22F642c3303bDe27131f58b46E7d75Aa194df0c |
TBA registry |
| ERC6551Account | 0xb812Dd421F2AB112fc7c33c75369148D115bEB4E |
TBA implementation |
| EBTApplication | 0x2E84f1fFF8E37A55Cc90B2f268C0d233d5aE5045 |
Application management |
| LiquidityVault | 0x6d15041ce06E367776CdcE1aFf1A2fAD31f44131 |
Token distribution |
| TeamVesting | 0xa1400a541c0fE2364fd502003C5273AEFaA0D244 |
Team token vesting |
User Journey:
┌────────────────────────────────────────────────────────────────┐
│ │
│ 1. Apply ──▶ EBTApplication.apply4EBT() │
│ ↓ │
│ 2. Approve ──▶ Admin approves application │
│ ↓ │
│ 3. Mint ──▶ EBTProgram.mint() + 0.02-2 ETH │
│ ↓ │
│ 4. Receive ──▶ NFT + TBA created + $EBTC distributed │
│ ↓ │
│ 5. Claim ──▶ EBTProgram.claim() (monthly, up to 3x) │
│ ↓ │
│ 6. Reapply ──▶ EBTProgram.reapply() (new season) │
│ │
└────────────────────────────────────────────────────────────────┘
| Allocation | Percentage | Amount | Recipient |
|---|---|---|---|
| Protocol (Liquidity) | 65% | 13B | LiquidityVault |
| Marketing | 20% | 4B | Marketing Wallet |
| NFT Holder TGE | 10% | 2B | EBTProgram (airdrops) |
| Team | 5% | 1B | TeamVesting |
| Allocation | Percentage | Purpose |
|---|---|---|
| Liquidity | 65% | LP provisioning & buybacks |
| Marketing | 20% | Growth & partnerships |
| Treasury | 10% | Operations |
| Team | 5% | Core team |
| Parameter | Value |
|---|---|
| Mint Price Range | 0.02 - 2 ETH |
| Soft Cap | 20 ETH |
| Hard Cap | 2,000 ETH |
| Fundraising Period | 30 days |
| Base Tokens per 0.02 ETH | 20,000 $EBTC |
| Monthly Claim Interval | 30 days |
| Max Claims per Season | 3 |
- Node.js 18+
- Foundry
- Git
# Clone the repository
git clone https://github.com/yourusername/TheEBTProgram.git
cd TheEBTProgram
# Install frontend dependencies
cd frontend && npm install
# Install backend dependencies
cd ../ebt-express && npm install
# Install contract dependencies
cd ../smart-contracts && forge install# Frontend (.env.local)
cp frontend/.env.local.example frontend/.env.local
# Backend (.env)
cp ebt-express/.env.example ebt-express/.env
# Smart contracts (.env)
cp smart-contracts/.env.example smart-contracts/.env# Terminal 1: Frontend
cd frontend && npm run dev
# Terminal 2: Backend (optional)
cd ebt-express && npm run dev
# Terminal 3: Local Blockchain (optional)
cd smart-contracts && anvilOpen http://localhost:3000 to view the application.
cd frontend
# Development server
npm run dev
# Type checking
npm run type-check
# Build for production
npm run build
# Run production build
npm startcd smart-contracts
# Compile contracts
forge build
# Run tests
forge test
# Run tests with verbosity
forge test -vvv
# Run specific test
forge test --match-test testMintSuccess
# Gas report
forge test --gas-report
# Coverage
forge coveragecd ebt-express
# Development server
npm run dev
# Generate Prisma client
npm run prisma:generate
# Run database migrations
npm run prisma:migrate
# Run tests
npm testcd smart-contracts
# Set environment variables
export PRIVATE_KEY=your_private_key
export SEPOLIA_RPC_URL=your_rpc_url
export ETHERSCAN_API_KEY=your_api_key
# Deploy to Sepolia
forge script script/Deploy.s.sol --rpc-url $SEPOLIA_RPC_URL --broadcast --verify -vvvvcd frontend
# Install Vercel CLI
npm i -g vercel
# Deploy
vercelThe backend includes a render.yaml for Render deployment. Configure your environment variables and deploy.
cd smart-contracts
# Run all tests
forge test
# Run with coverage
forge coverage
# Run fuzz tests
forge test --match-contract Fuzz
# Run integration tests
forge test --match-contract Integrationfoundry-test/
├── unit/ # Unit tests
│ ├── EBTProgram.t.sol
│ ├── FoodStamps.t.sol
│ └── ...
├── integration/ # Integration tests
│ └── FullFlow.t.sol
├── fuzz/ # Fuzz tests
│ └── MintFuzz.t.sol
└── invariant/ # Invariant tests
└── Invariants.t.sol
See SECURITY_AUDIT.md for the full security audit report.
| Severity | Count | Status |
|---|---|---|
| Critical | 6 | All Fixed |
| High | 8 | In Progress |
| Medium | 9 | Planned |
| Low | 8 | Best Practices |
- Reentrancy Protection: All state-modifying functions use
nonReentrant - Access Control: Role-based permissions with OpenZeppelin
- TBA Locking: Automatic asset protection during marketplace listings
- Initialization Checks: Contracts require proper setup before operation
- Pausable: Emergency pause functionality on critical contracts
Please report security vulnerabilities to [email protected] or open a private security advisory on GitHub.
We welcome contributions! Please see CONTRIBUTING.md for guidelines.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes
- Run tests (
forge testandnpm test) - Commit your changes (
git commit -m 'feat: add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
We use Conventional Commits:
feat:- New featuresfix:- Bug fixesdocs:- Documentation changestest:- Test additions/changesrefactor:- Code refactoringchore:- Maintenance tasks
- Solidity: Follow Solidity Style Guide
- TypeScript: ESLint + Prettier configuration included
- Commits: Conventional commits with descriptive messages
This project is licensed under the MIT License - see the LICENSE file for details.
Built with irony and Solidity.