Skip to content

ritik-ant/STBL-Smart-Contract

Repository files navigation

STPL LaunchPad

Meme Token Marketplace

A decentralized marketplace for launching and trading meme tokens using bonding curves.

Overview

This project implements a marketplace for meme tokens where:

  • Users can launch new meme tokens
  • Trade tokens using bonding curves
  • Earn rewards through platform fees
  • Support meta-transactions for gasless operations

Key Features

  • Token Launch: Create new meme tokens with customizable parameters
  • Bonding Curves: Dynamic pricing based on supply and demand
  • Meta Transactions: Execute transactions without paying gas fees
  • Upgradeable Contracts: All contracts are upgradeable for future improvements
  • Fee Distribution: Automatic distribution of fees to creators and platform

Technical Architecture

Smart Contracts

  1. Marketplace Contract

    • Central hub for managing tokens and curves
    • Handles token launches and trading
    • Implements meta-transaction support
  2. Curve Factory

    • Deploys new bonding curve contracts
    • Manages curve parameters and configurations
  3. Bonding Curves

    • Implements bonding curve logic
    • Handles token pricing and trading
  4. Token Contracts

    • ERC20 token implementation
    • Customizable token parameters

Proxy Pattern Implementation

The project uses two types of proxies:

  • BeaconProxy: For curve contracts
  • TransparentProxy: For marketplace and factory contracts

Development

Prerequisites

  • Node.js
  • Hardhat
  • Ethers.js

Installation

This project contains smart contracts for STPL Pad.

It includes the following smart contracts:

  • MarketPlace
  • MemeToken
  • BondingCurve
  • BondingCurveFactory
  • Beacon Contract (OpenZeppelin)

Two types of proxies are used in this project:

  • BeaconProxy
  • TransparentProxy

Smart Contract Architecture

1. Marketplace Contract

  • Deployed using Transparent Proxy.
  • Acts as the central hub for managing curve factories, curves, and tokens.

2. Curve Factory

  • Deployed using Transparent Proxy.
  • A factory contract responsible for deploying curve contracts dynamically.

3. Curve Contracts

  • Deployed using Beacon Proxy.
  • Each curve instance adheres to a single logic contract managed via a beacon.

4. Token Contracts

  • Deployed as individual Upgradeable Proxies.
  • Each token contract operates independently with upgradability support.

For More details refer to this document: https://docs.google.com/document/d/173w7GJqF8PkMcOsxmMhXvwfVIHImPZqOGr8tcd-p19w/edit?tab=t.0

Tasks and Commands

You can use the following commands to interact with the project:

# install dependencies
npm run test
# Run tests
npm run test

npx hardhat test

# Run tests with gas reporting
REPORT_GAS=true npx hardhat test

# Start a local Hardhat node
npx hardhat node

# Deploy the contracts using Hardhat Ignition
npx hardhat ignition deploy ./ignition/modules/Lock.ts

About

A decentralized marketplace for launching and trading meme tokens using bonding curves. Built with Solidity and Hardhat, this project implements a sophisticated token launch mechanism with dynamic pricing, creator rewards, and platform fees.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors