Skip to content

Capcaicin/platform-dao

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Platform DAO

A 100% user-owned, community-governed social media platform

License: MIT Solidity React Native

TikTok-style vertical video + Facebook-style social feed + Reddit-style threads β€” governed entirely by token holders via on-chain voting.


Portfolio Summary

This project explores how a large product idea can be broken into architecture, governance, mobile experience, content systems, and operating rules. The most valuable learning was not only the blockchain stack; it was the product thinking required to connect user trust, moderation, cost, ownership, and long-term governance.

Recruiter takeaway: this is a systems-thinking project. It shows comfort with new technical domains, but also the account-management skill of translating complicated requirements into a roadmap that stakeholders can discuss.


🎯 What This Is

A decentralized social media app where:

  • Users own their content (Lens Protocol NFTs)
  • Community votes on everything (algorithm weights, moderation, features)
  • No corporate control after year 1 (trustless handover via smart contracts)
  • 100% open source (MIT license β€” fork it, audit it, run your own instance)

πŸ—οΈ Architecture

Mobile App (React Native)
    ↓
Lens Protocol (social graph) + Livepeer (video)
    ↓
IPFS/Arweave (decentralized storage)
    ↓
Base Blockchain (governance contracts)

4 Smart Contracts:

  • PlatformToken.sol β€” ERC-20 governance token (100M PLAT, fixed supply)
  • PlatformGovernor.sol β€” On-chain voting (1-day delay β†’ 7-day vote β†’ 4% quorum)
  • PlatformTimelock.sol β€” 2-day execution delay on all governance actions
  • HandoverVault.sol β€” Locks founding tokens for 365 days; releases via community vote

πŸš€ Quick Start

1. Deploy Contracts (Base Sepolia Testnet)

cd step-1-contracts
npm install
npx hardhat test          # All tests must pass
npx hardhat run scripts/deploy.js --network baseSepolia

2. Run the Mobile App

cd step-3-app
npm install
cp .env.example .env      # Add your Livepeer API key + WalletConnect ID
npx expo start            # Press 'i' for iOS, 'a' for Android, 'w' for web

3. Set Up Governance

# Grant Governor permission to queue proposals in Timelock
# (See deploy.js output for exact commands)

# Founding multisig deposits their allocation into HandoverVault
vault.deposit(50_000_000 * 1e18)

# Token holders self-delegate to activate voting power
token.delegate(yourAddress)

πŸ“¦ What's Included

Folder Description
step-1-contracts/ Solidity: Token + Governor + Timelock + HandoverVault
step-2-repo/ GitHub setup: CI/CD, branch protection, governance templates
step-3-app/ React Native app: Video feed, social feed, threads, governance UI
docs/architecture.md 9 Mermaid diagrams + cost estimates + security model

Total: 43 TypeScript files, 4 Solidity contracts, 3,764 lines of production code.


βš–οΈ Governance Model

Bootstrap Phase (Year 1)

  • 50% tokens β†’ Wallet A (right-leaning trusted individual)
  • 50% tokens β†’ Wallet B (left-leaning trusted individual)
  • They manually airdrop to early builders/creators
  • All distributions logged on-chain (transparent + auditable)

Handover (Day 365)

  1. Community proposes: "Transfer locked tokens to address X"
  2. 7-day vote (4% quorum required)
  3. If passed β†’ 2-day Timelock delay
  4. Vault automatically transfers all locked PLAT to winning address
  5. Founding wallets renounce all roles β†’ full community control

Post-Handover

  • Anyone with 100k PLAT can propose (algorithm changes, features, treasury spends)
  • All proposals pass through Governor β†’ Timelock β†’ execution
  • No admin keys, no backdoors (even upgrades require a vote)

🎬 Key Features

Feature Tech Stack
Vertical video feed Livepeer transcoding + HLS streaming + React Native gesture handler
Social graph Lens Protocol v2 (profiles, posts, follows, comments as NFTs)
Threaded discussions Lens publications with nested comment references
On-chain voting OpenZeppelin Governor + ERC20Votes
Decentralized storage IPFS (metadata) + Arweave (video backup)
Recommendation algorithm Python scoring engine (open-source, community-votable weights)
Moderation AI flagging β†’ elected council β†’ public appeals β†’ governance override

πŸ’° Cost Estimates

At 10,000 monthly active users:

  • Livepeer video: ~$50–200/month
  • IPFS pinning: ~$20/month
  • Base governance gas: ~$5–20/month
  • Redis + ranking service: ~$30–80/month

Total: ~$135–450/month (scales 8–10x at 100k MAU)

Livepeer grants available for early-stage projects.


πŸ”’ Security

  • βœ… All contracts use OpenZeppelin audited libraries
  • βœ… ReentrancyGuard on all state-changing functions
  • βœ… No minting after genesis (fixed 100M supply)
  • βœ… Timelock prevents instant malicious proposals
  • βœ… Full test coverage (see dao.test.js)

⚠️ Do NOT deploy to mainnet without a professional audit (recommend Code4rena contest)


πŸ“œ License

MIT β€” Fork it. Ship it. Govern it.


πŸ› οΈ Tech Stack

  • Contracts: Solidity 0.8.20 + OpenZeppelin 5.0 + Hardhat
  • Frontend: React Native (Expo) + wagmi + viem + Lens SDK
  • Video: Livepeer Studio API + HLS.js
  • Storage: Pinata (IPFS) + Arweave
  • Blockchain: Base (recommended) or Polygon

🚨 Critical Warnings

  1. Low voter turnout kills DAOs β†’ Design every UX to encourage delegation
  2. Legal: Get a crypto + content moderation lawyer before mainnet
  3. Video costs: Apply for Livepeer grants early; set governance-controlled upload limits
  4. Quorum: 4% quorum on 100M tokens = 4M PLAT must vote. Start lower (1%) if distribution is thin.
  5. Use Snapshot.org for gasless voting β†’ only execute final decisions on-chain

πŸ“š Documentation


🀝 Contributing

  1. Fork this repo
  2. Build your feature
  3. Submit a governance proposal (use template in .github/ISSUE_TEMPLATE/)
  4. Community votes
  5. If passed β†’ merge PR

All code changes require a passed governance proposal (enforced by CI).


πŸ“ž Support

  • GitHub Issues: Bug reports + feature requests
  • Discord: [coming after beta launch]
  • Governance Forum: [Snapshot.org space TBD]

Built by the community, for the community.

About

Decentralized social platform prototype with React Native architecture, token governance, and stakeholder-ready product documentation.

Topics

Resources

Contributing

Security policy

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages