Skip to content

us3r-network/degencast

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

DegenCast: Curate, Mint, and Trade Onchain Content 🎩✨

DegenCast lets you curate content onchain by minting ERC1155-ERC20 hybrid tokens on a bonding curve, which are later launched on UniswapV3. Each piece of curated content undergoes a proposal process secured by an economic game inspired by Kleros, ensuring only high-quality contributions make it through. Whether you’re a creator or a curator, DegenCast offers a seamless way to engage with and monetize top-tier content in a decentralized ecosystem.

Degencast is built as a cross platform a mobile and web application built with React Native and Expo, on Farcaster ecosystem and powered by $DEGEN.

Introduction πŸš€

Degencast revolutionizes content curation in the social media landscape by combining the power of decentralized finance (DeFi) πŸ’° with community-driven content selection πŸ—³οΈ. At its core, Degencast introduces innovative features that empower users to curate and value content collectively:

  • Channel Content Curation NFTs πŸ–ΌοΈ: Users can propose to transform high-quality casts (posts) into Channel NFTs, creating a new paradigm for content curation where the community decides what content is most valuable.
  • Community-Driven Curation πŸ‘₯: Degencast implements a unique challenge system for proposal approval, ensuring that content curation is a collaborative effort driven by community consensus.
  • Curator Rewards πŸ†: Top curators (including the proposer and early supporters) are rewarded with a share of the transaction fees, encouraging active participation in content curation.

By tokenizing content curation, Degencast creates a more engaging and rewarding social media experience where users have a direct stake in the quality of content shared on the platform. This approach not only enhances the overall content quality but also fosters a sense of ownership and community among users. 🌟

Table of Contents πŸ“š

  1. Features
  2. Technology Stack
  3. Project Structure
  4. Setup and Installation
  5. Configuration
  6. Usage
  7. Key Components
  8. Contributing
  9. License

Features πŸŽ‰

  • User authentication with Privy πŸ”
  • Farcaster integration for social interactions πŸ’¬
  • Community management and exploration 🌍
  • Cryptocurrency trading and portfolio management πŸ“Š
  • Real-time chat and messaging πŸ“¨
  • Customizable UI components 🎨
  • Cross-platform support (iOS, Android, Web) πŸ“±πŸ’»
  • Channel NFT creation and management πŸ›οΈ
  • Community-driven content curation πŸ‘¨β€πŸ‘©β€πŸ‘§β€πŸ‘¦
  • Tokenized engagement with $CAST πŸ’Ž
  • Bonding curve for Channel NFTs πŸ“ˆ
  • Integration with Uniswap v3 for liquidity 🌊

Technology Stack πŸ› οΈ

  • React Native πŸ“±
  • Expo πŸš€
  • Redux Toolkit for state management πŸ—ƒοΈ
  • Wagmi for Ethereum interactions ⚑
  • Privy for authentication πŸ”‘
  • NativeWind for styling πŸ’…
  • Radix UI primitives 🧱
  • Lucide React Native for icons 🎭
  • Zora Protocol SDK for NFT creation πŸ–ΌοΈ
  • Arweave for decentralized storage πŸ’Ύ

Project Structure πŸ—οΈ

The project follows a modular structure with the following main directories:

  • app: Contains the main application routes and screens πŸ“±
  • components: Reusable UI components 🧩
  • config: Configuration files for various services βš™οΈ
  • constants: Application-wide constants πŸ“Š
  • features: Redux slices for different features 🍰
  • hooks: Custom React hooks 🎣
  • lib: Utility libraries and wrappers πŸ“š
  • public: Static assets for the web version πŸ–ΌοΈ
  • services: API services and types 🌐
  • store: Redux store configuration πŸͺ
  • utils: Utility functions πŸ› οΈ

Setup and Installation πŸš€

  1. Clone the repository πŸ“‚
  2. Install dependencies:
    npm install
    
  3. Set up environment variables (see Configuration) βš™οΈ
  4. Run the development server:
    npm start
    

Configuration βš™οΈ

Create a .env file in the root directory with the following variables:

EXPO_PUBLIC_API_BASE_URL=
EXPO_PUBLIC_DEGENCAST_WEB_HOST=
EXPO_PUBLIC_DEGENCAST_FRAME_HOST=
EXPO_PUBLIC_PRIVY_APP_ID=
EXPO_PUBLIC_HTTP_HMAC_KEY=
EXPO_PUBLIC_INVITE_ONLY=

Usage πŸš€

The application can be run on different platforms:

  • iOS: npm run ios οΏ½οΏ½
  • Android: npm run android οΏ½οΏ½
  • Web: npm run web οΏ½οΏ½

Key Components 🧩

Channel NFTs πŸ–ΌοΈ

Channel NFTs represent curated content within Degencast. Users can propose to turn high-quality casts into Channel NFTs, which are then subject to community approval.

The challenge process for Channel NFTs works as follows:

  • Propose: Users can propose to turn a high-quality cast into a Channel NFT.
  • Approve: If the proposal is approved, it becomes a Channel NFT.
  • Cost: The minimum challenge cost is equal to the NFT price.
  • Weight: The challenge weight is calculated as the square root of the amount spent.
  • Challenge: Disagreements extend the countdown by 1 hour. Each account can challenge once per phase.
  • Win Condition: A stance must have twice the weight of the opposing stance to win.
  • Result: The final stance is determined after the countdown ends.
  • Funds Distribution: Winners receive their principal back, while losers' funds are distributed to winners based on weight.
  • Token Ratio: Each Channel NFT represents 1000 Channel Tokens.
  • Curation: After approval, the top 10 upvoters (including the proposer) become curators, with earlier supporters earning more revenue.
  • Transaction Fees: Fees are distributed as follows: Degencast 1%, Channel host 2%, Creator 3%, Curators 4%.
  • Bonding Curve: All Channel NFTs share the same channel bonding curve.
  • Liquidity Provision: When the bonding curve reaches a market cap of 4,206,900 DEGEN, all liquidity is deposited into Uniswap v3.
  • Post-Launch: After the token launch, each Channel NFT still represents 1000 Channel Tokens.

Curation Process πŸ—³οΈ

The curation process involves proposing, challenging, and approving content to become Channel NFTs. This process ensures that only the most valuable content is tokenized and rewarded.

  • Curation NFT = 1000 Curation Token.
  • NFT transaction fee: Degencast 1%, Channel host 2%, Creator 3%, Curators 4%.
  • All Curation NFTs share the same bonding curve.
  • When bonding curve reaches a market cap of 4,206,900 DEGEN, all the liquidity will be deposited into Uniswap v3.
  • After token launch, Curation NFT = 1000 Curation Token.

Content Creation ✍️

Users can create casts (posts) within the Degencast ecosystem, which can then be proposed for curation.

export default function Editor({
  text,
  setText,
  images,
  setImages,
  channel,
  setChannel,
  previewComponent,
  placeholder = "Create a cast...",
}: {
  text: string;
  setText: (text: string) => void;
  images: string[];
  setImages: (images: string[]) => void;
  channel: WarpcastChannel;
  setChannel: (channel: WarpcastChannel) => void;
  previewComponent?: React.ReactNode;
  placeholder?: string;
}) {

NFT Creation 🎨

When a cast is approved to become a Channel NFT, the platform uses the Zora Protocol SDK to create and mint the NFT.

async function createNew1155Token({
  publicClient,
  walletClient,
  contractAddress,
  contractMetadataURI,
  tokenMetadataURI,
}: {
  publicClient: PublicClient;
  walletClient: WalletClient;
  contractAddress?: `0x${string}`;
  contractMetadataURI?: string;
  tokenMetadataURI: string;
}) {
  if (!contractAddress && !contractMetadataURI) {
    throw new Error("Contract address or metadata URI is required");
  }
  const addresses = await walletClient.getAddresses();
  const chainId = await walletClient.getChainId();
  const creatorAccount = addresses[0]!;
  const creatorClient = create1155CreatorClient({ publicClient });
  const { request, contractAddress: collectionContractAddress } =
    await creatorClient.createNew1155Token({
      contract: contractAddress! || {
        name: CAST_COLLECTION_NAME,
        uri: contractMetadataURI,
      },
      tokenMetadataURI: tokenMetadataURI,
      account: creatorAccount,
      mintToCreatorCount: 1,
      createReferral: ZORA_CREATE_REFERRAL,
    });
  const { request: simulateRequest } =
    await publicClient.simulateContract(request);
  const hash = await walletClient.writeContract(simulateRequest);
  const receipt = await publicClient.waitForTransactionReceipt({ hash });
  return {
    receipt,
    tokenInfo: {
      contractAddress: collectionContractAddress,
      creatorAccount,
      chainId,
    },
  };
}

Contributing 🀝

Contributions are welcome! Please follow these steps:

  1. Fork the repository 🍴
  2. Create a new branch 🌿
  3. Make your changes πŸ’»
  4. Submit a pull request πŸš€

License πŸ“œ

MIT


This README provides a comprehensive overview of the Degencast project, its features, and how to set it up and use it. For more detailed information on specific components or features, please refer to the corresponding files in the project structure. Happy coding! πŸŽ‰πŸ‘¨β€πŸ’»πŸ‘©β€πŸ’»

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages