Skip to content

luloxi/PunkSocial

Repository files navigation

Social protocol where interactions are monetized πŸ’° allowing users to earn through engaging with their community πŸ«‚.

🎁 Current build focuses on implementing USDC, NFTs and interaction between users on an Avalanche L1 with USDC as native gas and onramp USDC with Coinbase OnchainKit

🀘 Features

NOTE: This is a work in progress and most features are not yet implemented.

  • πŸ’Έ When bridged to PunkSociety, you can select different options to stake your USDC or bridged asset
  • ⛓️ Avalanche L1 with USDC as native gas and other tokens bridged from other chains.
  • πŸ’° Social monetization: Likes, comments, shares and follows send USDC to the user on the other end
  • πŸ“ˆ Revenue dashboard: Users can track and analyze their earnings
  • πŸ€Ήβ€β™‚οΈ Post types: Posts can have text, image, audio, video, links and polls
  • πŸ”” Notifications: Receive alerts on activity
  • πŸ’Œ Messaging: Direct messaging and group chat features
  • 🎨 Profile customization: Users can customize their profile and create post collections
  • πŸ“± Web 2.5 login: Social login options with Web2 platforms (Google, Twitter, etc.)
  • 🌐 Multi-chain support: Bridge your posts as NFTs to Avalanche L0 and other chains to access NFT markets
  • 🎧 Accessibility support: ARIA compliant for screen readers and other assistive technologies
  • πŸ“š Educational content: Onboarding tutorials and step-by-step guides

🀘 Roadmap

πŸ“₯ To see pending project tasks, see this Trello

🐣 Phase 1 (MVP)

  • βœ… Create PunkPosts contract
  • βœ… Create PunkProfile contract to register users info and socials
  • βœ… PunkSociety contract: Social interactions
  • βœ… Post creation tool
  • βœ… User profile page
  • βœ… Search: By address or username
  • βœ… Enable options for sharing on other platforms
  • βœ… Avalanche L1 with USDC as native gas: Use an Avalanche L1 with USDC as native gas (Reference: Create an Avalanche L1)
  • βœ… Enable liking with incentive
  • βœ… Enable posting with a fee to owner

πŸ“ˆ Phase 2 (Business model)

  • Incentive model: Social interactions send $ to the user on the other end
  • USDC Staking/Lending model: Bridged USDC can be lent or staked on AAVE and/or Compound (or similar) so users can earn interest on their USDC while using the platform
  • Business Model: PunkSociety collects 1% fees from social interactions and from USDC lending revenue
  • Easy onramp tool: Easy USDC buying tool for onboarding new users. (Reference:FundButton from Coinbase | OnchainKit extension for Scaffold-ETH 2)
  • Built-in bridge manager: Built-in simple tool for bridging USDC and NFTs to and from Avalanche, Base, Ethereum, and other EVM chains (Reference: avalanche-interchain-token-transfer | Chainlink CCIP Cross Chain Tokens)
  • Make PunkSociety the only one who can deploy contracts on the chain (Reference: Avalanche Contract Deployer Allowlist)
  • Dashboard Insights: Track and analyze your revenue
  • Enable following users, liking, commenting and sharing posts on frontend
  • Multi-language support: Switch between languages (include emoji language)
  • Individual post viewer
  • Accesibility support: For the hearing and visually impaired, the app should be ARIA compliant to support screen readers and other assistive technologies (Reference: ARIA)
  • Add special metadata to NFTs for screen readers and SEO

🌐 Phase 3 (Indexing)

πŸ’¬ Phase 4 (Social enhancement)

  • Direct messages: Allow users to send private messages to each other (Reference Push Protocol)
  • Enable audio, video and links with preview type of posts
  • Polls: Allow users to create polls
  • Customization: Allow users to customize their profile appearance
  • Collections: Create and share collections of posts
  • Groups: Allow users to create and join groups with custom chat and newfeed
  • Categories: Allow users to categorize their posts, filter by category and search by category

πŸ‘¨β€πŸ¦½ Phase 5 (Ease of use)

  • Web 2.5 social login with account abstraction: Sign up and log in with Google, Twitter, Instagram, etc. (Reference: wagmi-thirdweb Connect Button)
  • Educational Content: Include onboarding tutorials and step-by-step guides to help users understand what they can do on the platform

🀘 Development

πŸ“₯ To see pending development tasks, see this Trello

πŸ› οΈ Technical details

βš™οΈ Currently built using Scaffold-ETH 2, Foundry, OnchainKit, Pinata, Vercel, NextJS, RainbowKit, Wagmi, Viem, and Typescript.

🏦 Considering using protocols: Circle USDC as native gas, The Graph for indexing events, Uniswap and similar with an aggregator for token swaps, AAVE, Compound and similar options for generating interest on bridged ERC20, Chainlink for price oracles, Push Protocol for notifications and messages, Thirdweb for social login with account abstraction.

πŸ“œ Considering using contracts: Ownable and Upgradeable from OpenZeppelin or Solady for contract ownership. EIP712 Signatures.

πŸ”— To be deployed on Avalanche L1 and Bridge ERC20 and ERC721 using Avalanche Interchain Token Transfer and Chainlink CCIP Transfer Tokens with EVM compatible chains.

πŸ“š Prerequisites

πŸ‘¨β€πŸ« Instructions

To get started follow the steps below:

  1. Open a terminal and run this commands to clone this repo and install dependencies:
git clone https://github.com/luloxi/PunkSociety.git
cd PunkSociety
yarn install
  1. Duplicate and rename packages/foundry/.env.example to packages/foundry/.env

NOTE: ETHERSCAN_API_KEY and ALCHEMY_API_KEY are not required until you deploy to a live EVM like Avalanche, Base, Ethereum, etc.

  1. Rename the .env.example to .env in the packages/nextjs folder. For each variable, follow the instructions above the variable.

  2. Start a local Avalanche L1:

It'd be ideal to run it with one command like yarn subnet with a config file, but so far, you gotta follow this instructions.

You'll start a local Avalanche L1 using Ava Labs avalanche-starter-kit. The network runs on your local machine and can be used for testing and development.

  1. Open a terminal, navigate to PunkSociety and run this command to deploy the contracts:
yarn deploy

This command deploys a PunkSociety contracts to your Avalanche L1.

NOTE: Contracts are located in packages/foundry/contracts and can be modified to suit your needs. The yarn deploy command uses the deploy script located in packages/foundry/script/Deploy.s.sol to deploy the contract to the network. You can also customize the deploy script.

NOTE 2: To deploy to a different network, you can run yarn deploy --network <network-name>. For example, to deploy to the Ethereum network, you can run yarn deploy --network ethereum.

  1. Open a second terminal, navigate to PunkSociety and run this command to start your NextJS app:
yarn start

Visit your app on: http://localhost:3000.

NOTE: You can interact with your smart contract on http://localhost:3000/debug and see a local block explorer on http://localhost:3000/blockexplorer