Skip to content

Novus-Tech-LLC/Monad-Smart-Contract

Repository files navigation

Nad.Pump Smart Contract Suite

Composable smart-contracts for launching, trading, and governing bonding-curve tokens on the Nad.Pump protocol.

Table of Contents

Contact

Platform Link
📱 Telegram t.me/novustch
📲 WhatsApp wa.me/14105015750
💬 Discord discordapp.com/users/985432160498491473
Telegram WhatsApp Discord

Feel free to reach out for implementation assistance or integration support.

Overview

Nad.Pump combines bonding curves, automated market making, and fee sharing into a single on-chain system. Creators spin up new assets with deterministic liquidity, while traders interact with a unified endpoint for minting and redemption. Core safeguards—such as slippage controls, deadline enforcement, and permit-enabled approvals—protect order execution throughout the lifecycle of each token.

Architecture Summary

Bonding Curve Flow

screenshot

Illustrates how virtual reserves and the curve treasury evolve as users buy or sell supply.

Mint Party Flow

screenshot

Shows coordinated mint participation and settlement between creators, contributors, and the curve.

Contract Modules

Core Layer

  1. Core.sol – Command hub orchestrating curve creation, trading flows, WNative escrow, fee routing, and guard rails.
  2. BondingCurve.sol – Price discovery engine that computes marginal prices, maintains virtual liquidity, and enforces curve invariants.
  3. BondingCurveFactory.sol – Deterministically deploys new curves, tracks their metadata, and guarantees standardized initialization.
  4. WNative.sol – Wrapped NAD token that exposes an ERC20 interface to the protocol and downstream integrations.

Supporting Services

  1. FeeVault.sol – ERC4626-compliant vault that accrues trading fees and enables programmatic revenue sharing.
  2. Token.sol – Lightweight ERC20 for each launched asset with curve-aware mint and burn hooks.
  3. MintParty.sol / MintPartyFactory.sol – Coordinates collective minting campaigns, contributions, and distribution logic.
  4. DexRouter.sol / Uniswap suite – Bridges liquidity to CPMM venues when curves graduate to open markets.

Utilities and Shared Assets

  • utils/ – Math helpers, safe transfer utilities, and bonding-curve primitives.
  • interfaces/ – ABI contracts for intra-protocol and external integrations.
  • errors/Errors.sol – Centralized revert catalog for deterministic and gas-efficient error reporting.

Functional Surface

Creation

  • createCurve – Deploys a token, bonding curve, and ancillary dependencies in a single atomic call.

Buy Path

Function Purpose
buy Executes a spot buy at the curve’s current marginal price.
protectBuy Adds minimum-out protections to guard against price movement.
exactOutBuy Targets a precise token output by solving for the required WNative input.

Sell Path

Function Purpose
sell Burns tokens for WNative at the prevailing curve price.
sellPermit Sell with EIP-2612 approvals to eliminate pre-approve transactions.
protectSell Enforces maximum-in constraints to cap adverse execution.
protectSellWithPermit Combines slippage protection with permit-enabled approvals.
exactOutSell Targets an exact Native output, returning any residual tokens to the sender.
exactOutSellWithPermit Same as above while leveraging permits for gasless approvals.

Read Utilities

  • getCurveData – Returns metadata, reserves, and pricing state for a curve.
  • getAmountOut – Quotes WNative or token output for a proposed trade.
  • getAmountIn – Computes the cost required to receive a desired amount.

Event Reference

event Buy(
    address indexed sender,
    address indexed token,
    uint256 amountIn,
    uint256 amountOut
);

event Sell(
    address indexed sender,
    address indexed token,
    uint256 amountIn,
    uint256 amountOut
);

event Create(
    address indexed owner,
    address indexed curve,
    address indexed token,
    string tokenURI,
    string name,
    string symbol,
    uint256 virtualNative,
    uint256 virtualToken
);

Usage Guidelines

  • Respect the deadline argument to prevent stale transaction replay.
  • Approve token allowances (or use permits) before invoking buy or sell flows.
  • Trade with either NAD or WNative; conversions occur automatically when required.
  • Prefer the slippage-guarded functions (protect*, exactOut*) when integrating bots or frontends.
  • Monitor FeeVault shares to participate in revenue distribution.

Development

Prerequisites

  • Node.js >=18 and npm
  • Foundry toolchain (forge, cast, anvil)
  • Access to a Nad-compatible RPC endpoint for deployment

Install Dependencies

npm install
forge install

Run Tests

forge test

Export ABIs

./export-abis.sh

Deploy

./deploy.sh

Configure environment variables (RPC URL, private key, WNative address, fee configuration) before executing the deployment script.

Support

Questions, feature requests, or security disclosures can be filed via GitHub issues. For time-sensitive matters, contact the Nad.Pump protocol maintainers through the official communication channels.

Releases

No releases published

Packages

No packages published