π΄π΅ Red & Blue Savings Protocol β Project Brief
Summary
The Red & Blue Savings Protocol is a Base-chain DeFi app that lets users deposit ETH into a smart-contract vault that automatically splits their deposit into three parts:
β β Vault (locked for 12 months)
β β LP (liquidity pool, to earn yield)
β β Treasury (protocol revenue wallet)
Users receive RED tokens when they deposit.
They can either:
Hold RED for 1 year (and unlock their vault share + yield), or
Swap 2 RED for 1 BLUE, which allows early exit (less return).
Only holders who keep their RED until the vault unlocks can withdraw the full amount.
Those who swap early for BLUE forfeit their locked vault share.
Core Smart-Contract Logic
Deposit (payable in ETH):
Splits deposit into 3 equal parts (vault / LP / treasury).
Mints equivalent RED tokens to user.
Records timestamp for unlock schedule.
Vault:
Locks funds for 12 months.
After unlock, only RED holders can claim their share.
Swap Function (RED β BLUE):
Burns 2 RED β mints 1 BLUE.
Grants access to withdraw ETH worth Β½ of original deposit from LP side.
Forfeits locked vault amount.
Treasury:
Accumulates β of deposits.
Funds can be used for marketing, dev, or protocol yield.
Address: 0x3CFD81965E316714AFc621602ddB18929585A903
Frontend (already working MVP)
A Next.js / Tailwind / Wagmi / Viem dApp connected to Base mainnet with:
WalletConnect integration.
Deposit form + button to call deposit() on controller contract.
Stats panel showing:
Total ETH Deposited
Vault Balance
Treasury Balance
Live deployment:
π https://red-blue-frontend-sigma.vercel.app/
Whatβs Needed Next
The goal is to take the current MVP and turn it into a polished production-ready protocol site with:
1. Frontend Improvements
Public landing page describing:
βSave in Thirdsβ concept.
Red/Blue token flow diagrams.
Real-time stats from smart contracts.
Dashboard-style app (Deposit / Stats / My Portfolio).
Optional dark-light toggle with Base branding colors.
2. Smart-Contract Enhancements
Add functions for:
totalDeposited() tracking (aggregate).
getVaultBalance()
claimVaultShare() after unlock period.
Implement swapRedForBlue() logic.
Use OpenZeppelin ERC-20 + Ownable for RED/BLUE.
3. Analytics / UI
Live chart of total deposits over time.
Leaderboard (top depositors).
Countdown timer to vault unlock.
4. Launch Prep
Contract verification on BaseScan.
Treasury and LP addresses configurable in deploy script.
Security audit + multisig ownership transfer.
Stack Preferences
Smart contracts: Solidity (Hardhat or Foundry)
Frontend: Next.js 14 + TypeScript + Tailwind + Wagmi 2 + Viem
Backend / Indexing: Optional Node or The Graph for analytics
Network: Base Mainnet
Hosting: Vercel
Deliverables
Updated smart contracts (Controller, Vault, RED, BLUE).
Frontend with polished UI + live stats dashboard.
Deployed & verified contracts on BaseScan.
Admin access + deploy scripts for future upgrades.
Target Outcome
A live DeFi savings dApp where:
Users deposit ETH β earn yield or swap early.
Funds are transparently split & tracked.
Vault and Treasury balances are public.
Protocol scales automatically via community deposits.