Skip to content

antigone4224/nexus-protocol

Repository files navigation

Nexus Protocol 🌌

Decentralized App Store with Bonding Curve Economics on Solana.

Live Demo: https://nexus-one-drab.vercel.app

Nexus Protocol is a decentralized application marketplace where every app has its own Bonding Curve. Users can buy/sell app shares to support developers and earn revenue dividends.

🚀 Features

  • Bonding Curve Pricing: Automated market maker for app shares (Price = Slope * Supply).
  • Revenue Sharing (MasterChef):
    • 80% to Developers (Cash out anytime).
    • 15% to Share Holders (Real-time dividends).
    • 5% to Protocol Treasury.
  • Permissionless Registration: Anyone can launch an app market with a name, domain, and icon.
  • No Indexer Required: Uses getProgramAccounts (GPA) to fetch app lists directly from the chain.

📦 Deployment Info (Devnet)

  • Program ID: H8Dhsv8mpe9RNqyM1TsKGEsnAH5jsQ5bxGQATACxziAz
  • Admin: AoGzZ9MJzdW1ysFd3MqD96prEBJTkobcaPtvT7d2ohfs
  • Cluster: Devnet

🛠 Project Structure

  • /programs: Anchor smart contract (Rust)
  • /app: Next.js 14 Frontend (TypeScript + Tailwind)
  • /sdk: TypeScript client SDK package
  • /tests: Integration tests
  • /scripts: Utility scripts for Devnet interaction

⚡ Quick Start

Prerequisites

  • Rust & Cargo
  • Solana CLI
  • Anchor CLI
  • Node.js & Yarn

1. Smart Contract

yarn install
anchor build
anchor test

2. Frontend (App)

cd app
npm install
npm run dev

Visit http://localhost:3000 to interact with the protocol.

🏗 Architecture

Smart Contract Accounts

  1. GlobalState: Protocol configuration (fees, admin).
  2. AppMarket: Per-app state (bonding curve supply, vault balance).
  3. UserPosition: User's shares and reward debt tracker.

Key Instructions

  • register_app: Launch a new app market.
  • buy_shares / sell_shares: Trade app shares.
  • pay_for_service: Route payment ➔ Split fees ➔ Update rewards.
  • claim_rewards: Withdraw dividends.
  • withdraw_dev_funds: Developer withdraws their accumulated fees.
  • close_app: Close the app market and reclaim rent (requires 0 supply).

📄 License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published