Ember Mode Whitepaper

Version 1.0 — April 2026

Abstract

Ember Mode is an autonomous, two-phase mechanism that permanently reduces the circulating supply of a Solana SPL token while simultaneously building and locking liquidity. It operates by claiming creator fees generated from trading activity on Pump.fun, splitting the proceeds between immediate token buyback-and-burn and a fee vault that is later deployed as permanent, irrevocable liquidity on PumpSwap.

The system is fully open source, runs autonomously once activated, and requires no manual intervention. All transactions are signed locally — private keys never leave the operator's machine.

Problem Statement

Tokens launched on bonding curve platforms face a common set of structural issues:

  • Supply stagnation — total supply is fixed at launch with no deflationary pressure, meaning token value relies entirely on demand-side growth.
  • Liquidity fragility — after migration to an AMM, liquidity is often shallow, unlocked, or removed by the creator, leading to price instability.
  • Creator fee misalignment — PumpFun creator fees accumulate but are typically withdrawn as profit rather than reinvested into the token's health.
  • Trust deficit — holders have no verifiable guarantee that the creator will act in the token's long-term interest.

Ember Mode addresses all four by converting 100% of creator fees into permanent, verifiable supply reduction and locked liquidity.

Mechanism Design

The Ember Mode mechanism operates as a continuous loop with a configurable cycle interval (default: 2 minutes). Each cycle follows a deterministic sequence:

  claim_fees()
      |
      v
  measure_received_sol()
      |
      +--- 50% ---> buy_tokens() ---> burn_tokens()
      |
      +--- 50% ---> fee_vault (accumulate for Phase 2)

The split ratio is configurable (default 50/50) via the EMBER_BUY_PERCENT environment variable. The cycle interval is controlled by EMBER_INTERVAL_MIN.

Fee Claiming

Creator fees are claimed via the PumpPortal collectCreatorFee API. The system measures the wallet's SOL balance before and after the claim to determine the exact amount received, avoiding any dependency on API-reported values.

Buyback

Tokens are purchased through PumpPortal's trade-local endpoint, which supports both bonding curve and migrated AMM tokens via the pool parameter. The transaction is built server-side by PumpPortal and signed locally using the solders library.

Burn

Purchased tokens are sent to the canonical burn address (1nc1nerator11111111111111111111111111111111). The burn instruction is built directly as an SPL Token Transfer (or Token-2022 TransferChecked) targeting the burn address's associated token account.

Phase 1: Bonding Curve

While the token trades on PumpFun's bonding curve, Ember Mode operates in Phase 1:

  • Cycle interval: 2 minutes (configurable)
  • Fee source: PumpFun creator fees from all trading activity
  • 50% allocation: Immediately buys tokens on the bonding curve and burns them
  • 50% allocation: Retained in the wallet as a fee vault, accumulating SOL for Phase 2

Phase 1 creates continuous deflationary pressure on the circulating supply. As tokens are burned, the remaining supply becomes scarcer relative to the bonding curve's pricing function.

The system tracks and displays running totals of SOL claimed, tokens burned, and fee vault balance at each cycle. Jupiter Price API provides real-time USD pricing for monitoring.

Phase 2: PumpSwap Graduation

When the bonding curve completes and the token migrates to PumpSwap, Phase 2 begins:

Migration Detection

The system polls the PumpFun frontend API (frontend-api-v3.pump.fun/coins/{mint}) to detect when the token's complete status becomes true, indicating bonding curve completion and PumpSwap pool deployment.

Liquidity Deployment

The accumulated fee vault SOL is deployed into the PumpSwap AMM pool using the add_liquidity.py script:

  • Auto-discovers the PumpAMM pool address from the token mint via getProgramAccounts
  • Computes proportional token/SOL amounts from on-chain pool reserves
  • The buy-and-deposit mode purchases the required tokens and deposits both sides in sequence
  • Creates associated token accounts (WSOL, LP token) idempotently
  • Wraps SOL to WSOL, executes the PumpAMM deposit instruction, and unwraps remaining WSOL

Permanent Lock

After liquidity is deposited, the resulting LP tokens can be burned, permanently locking the liquidity in the pool. This makes the liquidity irrevocable — it cannot be withdrawn by anyone, ever.

Continued Buyback

After graduation, PumpSwap trading continues generating creator fees. Ember Mode is restarted and continues its buy-and-burn cycles perpetually. The fee vault allocation in Phase 2 can be set to 0% (100% buy+burn) since liquidity has already been deployed.

Technical Architecture

Stack

  • Language: Python 3.10+
  • Solana SDK: solders — Rust-based, high-performance Solana primitives
  • Transaction format: Versioned Transactions (MessageV0) for modern validator compatibility
  • RPC: Any Solana RPC endpoint (Helius, QuickNode, Alchemy, or public)
  • Price feed: Jupiter Price API v3 (lite-api.jup.ag/price/v3)
  • Trade execution: PumpPortal local-trade API (supports bonding curve + AMM)
  • IPFS: Pinata (free tier) for token metadata storage

On-Chain Programs

  • SPL Token: TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA
  • Token-2022: TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb
  • Associated Token: ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL
  • PumpAMM: pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA
  • Compute Budget: ComputeBudget111111111111111111111111111111

Transaction Flow

  1. Build instruction(s) using solders primitives
  2. Set compute budget + priority fee
  3. Fetch latest blockhash from RPC
  4. Compile MessageV0 with all instructions
  5. Sign VersionedTransaction with local Keypair
  6. Send via RPC sendTransaction
  7. Confirm and log result

Tooling

buyback_burn.py

The primary script implementing Ember Mode. Supports three operational modes:

  • Ember Mode (--ember): The core mechanism. Claims fees every N minutes, splits between buy+burn and fee vault.
  • Drop Mode (default): Monitors token price via Jupiter and triggers a buy+burn when a configurable percentage drop is detected.
  • Timer Mode (--timer): Fixed-interval buy+burn with a set SOL amount per cycle.
  python buyback_burn.py --ember          # 2min cycles, 50% buy+burn
  python buyback_burn.py --ember 5 75     # 5min cycles, 75% buy+burn
  python buyback_burn.py --timer 10 0.05  # 10min, 0.05 SOL per buy

add_liquidity.py

Deposits tokens and SOL into a PumpSwap AMM pool. Used in Phase 2 to deploy the fee vault as permanent locked liquidity.

  • Auto-discovers pool from token mint address via getProgramAccounts
  • Computes proportional deposit amounts from on-chain reserves
  • Supports buy-and-deposit mode for single-command LP deployment
  • Handles PumpFun Token-2022 tokens and WSOL wrapping/unwrapping
  • Robust balance confirmation with retry logic (6 attempts, 3s intervals)
  python add_liquidity.py --buy-and-deposit 1.0  # Buy tokens + deposit
  python add_liquidity.py --deposit 0.5          # Deposit existing tokens
  python add_liquidity.py --info                 # Show pool reserves

create_token.py

Creates new tokens on PumpFun with IPFS-stored metadata via Pinata. Supports optional dev-buy bundled with creation, dry-run validation, and upload-only mode.

  python create_token.py                  # Create with .env config
  python create_token.py --dry-run        # Validate without spending SOL
  python create_token.py --upload-only    # Push metadata to IPFS only

Security Model

  • Local key management: All private keys are loaded from environment variables and never transmitted over the network. Transactions are signed client-side using solders.
  • No custody: The system does not use any external key management, custodial wallets, or hosted signing services.
  • Open source: All code is publicly available under MIT license at github.com/emberliq/embermode. Anyone can audit the mechanism.
  • Deterministic behavior: The mechanism follows a fixed, verifiable sequence: claim, measure, split, buy, burn. There is no discretionary decision-making.
  • Irreversible burns: Tokens sent to the burn address cannot be recovered. LP tokens burned for locked liquidity cannot be withdrawn.
  • Environment isolation: .gitignore excludes .env files and key material from version control.

Tokenomics

Ember Mode does not alter the token's initial supply or distribution. Instead, it introduces a continuous deflationary force post-launch:

  • Supply: Standard PumpFun token supply (1 billion tokens, 6 decimals)
  • Deflation source: 50% of all creator fees are used to buy and permanently burn tokens
  • Liquidity source: 50% of Phase 1 creator fees are accumulated and deployed as permanent locked liquidity at PumpSwap graduation
  • Post-graduation: 100% of ongoing creator fees can be allocated to buy+burn, as liquidity is already locked

The net effect is a monotonically decreasing circulating supply with monotonically increasing locked liquidity, creating sustained upward pressure on token value for as long as trading activity continues.

Roadmap

  • v1.0 — Core Ember Mode mechanism: buyback_burn.py with --ember command, add_liquidity.py for Phase 2 deployment, create_token.py for token creation
  • v1.1 — Telegram Bot: activate Ember Mode on any token directly from Telegram with wallet management and real-time status
  • v1.2 — Auto Phase 2: automatic detection of PumpSwap graduation and autonomous liquidity deployment + LP burn
  • v2.0 — Multi-token support: manage Ember Mode across multiple tokens from a single dashboard

Disclaimer

This document is for informational purposes only. Ember Mode is open-source software provided under the MIT license with no warranty. Interacting with smart contracts and decentralized protocols involves risk. Users are responsible for their own due diligence and decisions.