Skip to content

conductiveai/lulzfun-contracts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

@lulz-blueprint

A comprehensive implementation of a Pump.fun-style token platform on the TON blockchain, featuring automated market making, dynamic pricing via bonding curves, and advanced trading functionality. Fully compliant with TEP-74 (Jetton Standard) and TEP-89 (Wallet Discovery).

Features

  • πŸͺ™ TEP-74/TEP-89 compliant Jetton implementation
  • πŸ’± Automated Market Maker (AMM) with bonding curve
  • πŸ”’ Automatic liquidity locking at 69,000 TON market cap
  • 🏦 Ston.fi DEX integration with 12,000 TON liquidity lock
  • πŸ’° Dynamic fee system (platform, LP, creator fees)
  • πŸ›‘οΈ Advanced security features (whitelist, limits, spam protection)
  • πŸ“Š Real-time price and market cap tracking
  • πŸ”„ Seamless wallet integration (Tonkeeper, OpenMask)
  • πŸ—οΈ Modular contract architecture
  • ⚑ Gas-optimized operations
  • πŸ” Comprehensive event logging

Project Structure

@lulz-blueprint/
β”œβ”€β”€ contracts/                 # Smart contract source files
β”‚   β”œβ”€β”€ LulzToken.fc          # Jetton Master contract (TEP-74)
β”‚   β”œβ”€β”€ JettonWallet.fc       # Jetton Wallet contract (TEP-74)
β”‚   β”œβ”€β”€ LiquidityManager.fc   # Ston.fi integration & liquidity locking
β”‚   β”œβ”€β”€ Factory.fc            # Token factory contract
β”‚   β”œβ”€β”€ Router.fc             # Trading router contract
β”‚   β”œβ”€β”€ Pair.fc               # Liquidity pair contract
β”‚   └── imports/              # Shared imports and utilities
β”‚       β”œβ”€β”€ stdlib.fc         # Standard library
β”‚       β”œβ”€β”€ utils.fc          # Utility functions
β”‚       β”œβ”€β”€ op-codes.fc       # Operation codes
β”‚       └── params.fc         # Contract parameters
β”œβ”€β”€ wrappers/                 # TypeScript contract wrappers
β”œβ”€β”€ tests/                    # Test suite
β”œβ”€β”€ scripts/                  # Deployment and utility scripts
└── docs/                     # Documentation

Core Components

Smart Contracts

Jetton Implementation (TEP-74 & TEP-89)

  • LulzToken.fc: Jetton Master contract

    • Token metadata management
    • Minting control
    • Supply tracking
    • Owner management
  • JettonWallet.fc: Jetton Wallet contract

    • Balance management
    • Transfer operations
    • Burn functionality
    • Message handling

Liquidity Management

  • LiquidityManager.fc: Ston.fi Integration
    • Market cap monitoring
    • Automatic liquidity locking at 69,000 TON
    • 12,000 TON Ston.fi deposit
    • LP token burning mechanism

Trading Infrastructure

  • Factory.fc: Token creation and deployment
  • Router.fc: Trading and liquidity operations
  • Pair.fc: Liquidity pair management

Key Features

1. Jetton Standard Compliance

  • Full TEP-74 implementation
  • Wallet discovery (TEP-89)
  • Standard message types
  • Metadata management

2. Bonding Curve Mechanics

  • Dynamic pricing algorithm
  • Automatic price adjustments
  • Slippage protection
  • Volume-based calculations

3. Liquidity Management

  • Automatic liquidity locking at 69,000 TON market cap
  • 12,000 TON Ston.fi deposit
  • LP token burning for permanent liquidity
  • Real-time market cap tracking

4. Security Features

  • Whitelist functionality
  • Transaction limits
  • Daily volume caps
  • Spam protection
  • Role-based access control

5. Fee Structure

  • Platform fee: 0.3%
  • LP fee: 0.2%
  • Creator fee: 0.1%
  • Configurable fee parameters

Installation

# Install as a dependency
npm install @lulz-blueprint

# Or for development
git clone https://github.com/conductiveai/lulz-blueprint.git
cd lulz-blueprint
npm install

Development

Prerequisites

  • Node.js 16+
  • TON Development Environment
  • Blueprint CLI

Local Development

# Build contracts
npm run build

# Run tests
npm test

# Run sandbox tests
npm run test:sandbox

Contract Integration

Token Operations

import { LulzToken, JettonWallet } from '@lulz-blueprint';

// Deploy Jetton Master
const token = new LulzToken({
    admin: adminAddress,
    metadata: {
        name: "LULZ Token",
        symbol: "LULZ",
        description: "The most fun token on TON"
    }
});

// Get user's wallet
const wallet = await token.getWalletAddress(userAddress);

// Buy tokens
await token.buy({ value: toNano('1') });

// Transfer tokens
await wallet.transfer({
    to: recipientAddress,
    amount: toNano('0.1')
});

Liquidity Management

import { LiquidityManager } from '@lulz-blueprint';

// Check liquidity status
const status = await manager.getLiquidityStatus();
console.log(`Locked: ${status.locked}, LP Tokens: ${status.lpTokens}`);

Testnet Deployments

  • Factory: EQDPaA5cM8abNt_mcjg3sfslKl71WQjw_Zy5QKlR0SfYGnY8
  • Router: EQAdxmy-wy2-9FAGfC4qcIvh9vKlzn-EUOo8-BlvqovpHOWk
  • LULZ Token: EQBShPwl5O61zxdMOAwLQZXCVzmvxIQcUvooQ24ZmRGUA6pn
  • Ston.fi Router: EQBsGx9ArADUrREB34W-ghgsCgBShvfUr4Jvlu-0KGc33Rbt

View on testnet explorer: tonscan.org/EQBShPwl5O61zxdMOAwLQZXCVzmvxIQcUvooQ24ZmRGUA6pn

Testnet Wallet

  • Address: EQDHCbKkWaljcqqiFQQwAS7SImuNrXwo2nW6C9Y7W6RWRSnC
  • Seed phrase: dentist busy brisk used chalk garden diesel inquiry involve resist forest renew treat bottom cactus estate liar vicious vague trash tennis divert shoulder fiscal

Security

  • Rate limiting for trading operations
  • Whitelist functionality
  • Spam protection mechanisms
  • Role-based access control
  • Transaction pattern analysis
  • Minimum transaction amounts
  • Maximum daily volumes
  • Time-based restrictions

License

MIT License

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors