docs.md
← BACK
// DOCS

Forge Documentation

Last updated: 2026-06-01

##Contents

##What is Forge?

Forge is a permissionless ERC-20 token launcher on Uniswap V4 + Base. Deploy a token in one transaction. No coding, no liquidity needed, no rug possible.

The protocol handles token creation, V4 pool initialization, single-sided LP placement, dynamic fee decay against snipers, and per-recipient fee distribution — all atomically in a single deploy tx. Every deployed token is a clean standard ERC-20 with EIP-2612 Permit, no mint / burn / pause / tax / blacklist functions.

Key properties

Network
Base mainnet (chain 8453)
Token supply
100,000,000,000 (100B, fixed)
Decimals
18
Liquidity
Single-sided · no ETH required
LP lock
Permanent · held by ForgeLPManager
Fee tier
1.5% baseline · 80% → 1.5% over 30s anti-MEV
Creator share
47% WETH + 47% TOKEN
NFT-holder share
15.9% WETH (unwrapped to ETH)
Treasury share
37.1% WETH + 53% TOKEN
Launch mcap
~$20,000 USD (locked tick)

##How it works

Deploy flow (1 transaction)

factoryV2.deployToken(name, symbol, feeRecipient) atomically:

If feeRecipient == address(0), the slot defaults to msg.sender (deployer keeps fees). Otherwise fees route to the passed address from the very first swap.

Fee collection

Anyone can trigger fee collection — funds always flow to the registered recipients regardless of who pays gas. Two entry points:

Don't call collectRewards directly on vault-routed tokens. Doing so strands the deposited WETH + token at the vault as unattributed orphan funds (recoverable only via admin sweep). The app's CLAIM buttons auto-detect routing.

MEV decay (anti-sniper)

For the first 30 seconds after pool init, the swap fee is parabolically interpolated from 80% down to 1.5%:

fee_ppm(t) = base + (start - base) * ((W - t) / W)^2
where  base  = 15_000      // 1.5%
       start = 800_000     // 80%
       W     = 30 seconds

Snipers in the first second pay ~80% fee. By second 15 the fee is ~21%. After 30 seconds it stays at 1.5% forever. The inflated early fees flow through the normal 47/15.9/37.1 split — creator + NFT holders + treasury all earn the difference.

##Fee recipient routing

Three modes via the "Send fees to" field on /deploy:

empty (default)
Fees route to msg.sender (the deployer)
0x... address
Atomic 1-tx route to that address
@handle (resolved)
Backend resolves via Privy. Atomic 1-tx to resolved address.
@handle (not on Forge)
Falls back to vault — 3-tx flow. Fees accumulate per keccak256(handle), claimable later.

Once deployed, the recipient slot is locked. Only the current recipient (verified by lpManager.tokenRewards(token).creator) can re-assign it. The deployer has no privileged access after deploy.

Vault claim (handle fallback)

If your X handle has been listed as the fee recipient for a token before you registered:

##ForgeNFT

ForgeNFT is the long-term yield-bearing asset of the Forge ecosystem. 888 NFTs total revealed at mint time via on-chain gacha. Holders collectively receive 15.9% of every WETH-side fee across every Forge-deployed token, distributed via a MasterChef-style accumulator.

Contract
TBA
Owner
TBA (Gnosis Safe)
Total supply
888 NFTs
Mint price
0.015 ETH
Mint start
2026-06-02 16:00 UTC
Whitelist window
First 2 hours after mint start
Per-wallet cap
2 paid mints (free mints don't count)
Free-mint allocation
Top 100 early-access participants
Whitelist allocation
7,726 wallets (rest of early-access list)
Reveal
On-chain gacha — blockhash+nonce randomness
Tiers
Common 444 (50%) · Rare 267 (30%) · Epic 133 (15%) · Legendary 44 (5%)
Tier shares
Common 1x · Rare 2x · Epic 5x · Legendary 10x
Distribution
WETH unwrapped to ETH on collect → forgeNFT.depositFees{value}

Mint at /mint. ETH share grows with platform volume.

##Profiles + transparency

Every address in the UI resolves to its X handle (if linked via Privy). Click @handle anywhere to land on /u/handle — a public profile showing all tokens deployed by or routed to that user. Each badge has two icons: 𝕏 (X profile) and (Basescan address). Buyers verify both the social identity and the on-chain wallet in one click.

##Contract reference

Production stack (Base mainnet)

Clean redeploy 2026-06-01 with rotated keys + Gnosis Safe ownership. Factory owner = Safe (treasury rerouting locked behind multisig). Hook + LPManager have no admin role post-deploy (trustless by construction).

ForgeFactoryV2
TBA
ForgeHook
TBA
ForgeLPManager
TBA
ForgeFeeVault
TBA
ForgeNFT
TBA
Treasury (Gnosis Safe)
TBA

External (Uniswap V4 + Permit2 + WETH)

V4 PoolManager
0x498581fF718922c3f8e6A244956aF099B2652b2b
V4 PositionManager
0x7C5f5A4bBd8fD63184577525326123B519429bDc
V4 UniversalRouter
0x6fF5693b99212Da76ad316178A184AB56D299b43
Permit2 (canonical)
0x000000000022D473030F116dDEE9F6B43aC78BA3
WETH (Base)
0x4200000000000000000000000000000000000006

ForgeFactoryV2 interface

interface IForgeFactoryV2 {
  /// @notice Deploy ERC-20 + V4 pool + LP + fee recipient atomically
  function deployToken(
    string calldata name_,
    string calldata symbol_,
    address feeRecipient        // 0 = msg.sender
  ) external returns (address token);

  /// @notice Read deployer + fee recipient + LP position metadata
  function tokens(address token)
    external view returns (
      address creator,
      address feeRecipient,
      uint256 positionId,
      int24 startingTick,
      uint64 deployedAt
    );

  function getCreatorTokens(address creator)
    external view returns (address[] memory);
}

ForgeLPManager interface

interface IForgeLPManager {
  /// @notice Collect LP fees + distribute (creator/NFT/treasury) in 1 tx
  function collectRewards(address token) external;

  /// @notice Live preview of accrued fees + BPS split per recipient
  function previewRewards(address token)
    external view returns (RewardPreview memory);

  /// @notice Reassign fee recipient — only callable by CURRENT recipient
  function updateCreator(address token, address newCreator) external;

  function tokenRewards(address token)
    external view returns (TokenRewards memory);
}

ForgeFeeVault interface

interface IForgeFeeVault {
  function registerToken(address token, CreatorConfig calldata cfg) external;

  /// @notice Snapshot-delta LP collect + route per stored config
  function distribute(address token) external;

  /// @notice EIP-712 gated claim of accumulated handle balances
  function claim(
    bytes32 handleHash, address recipient, address[] calldata currencies,
    bytes32 nonce, uint256 deadline, bytes calldata sig
  ) external;
}

##Public REST API

Read-only HTTP endpoints under /api/v1/. CORS-enabled, no authentication required. Uniform { ok, data } response shape. Cached 60s (data) / 5min (resolve + stats).

GET /api/v1/launches
Paginated launches (v1 + v2 merged)
GET /api/v1/launches/{addr}
Detail per token + preview
GET /api/v1/launches/{addr}/swaps
Recent swaps (last ~4h, max 50)
GET /api/v1/launches/by-deployer/{addr}
Filter by deployer
GET /api/v1/launches/by-recipient/{addr}
Filter by current fee recipient
GET /api/v1/resolve/{handle}
X handle → wallet address
GET /api/v1/resolve-address/{addr}
Wallet → X handle (reverse)
GET /api/v1/stats
Platform aggregates

Example: poll for new launches every minute

let seen = new Set();
setInterval(async () => {
  const res = await fetch(
    "https://forgelaunch.build/api/v1/launches?limit=5&sort=newest"
  );
  const { ok, data } = await res.json();
  if (!ok) return;
  for (const launch of data.launches) {
    if (seen.has(launch.address)) continue;
    seen.add(launch.address);
    console.log(`NEW: $${launch.symbol} ${launch.name}`);
  }
}, 60_000);

Example: resolve @handle before deploying via contract directly

const res = await fetch("https://forgelaunch.build/api/v1/resolve/alice");
const { ok, data } = await res.json();
if (ok && data.found) {
  // Pass data.address as factoryV2.deployToken's 3rd arg
}

##FAQ

Do I need ETH to launch a token?

Just enough for gas (a few cents on Base). The entire 100B supply becomes single-sided LP.

Can the creator rug the liquidity?

No. The LP NFT is held by ForgeLPManager which has no withdrawal function. Liquidity is permanently locked. Verifiable on-chain via NFT ownership.

Can the deployer change the fee recipient after launch?

No. Once deployToken's feeRecipient is wired into lpManager, only the current recipient can call updateCreator to reassign it. The deployer has no privileged access after deploy.

Is there any token tax or transfer fee?

No. Forge tokens are standard OpenZeppelin-shaped ERC-20 + EIP-2612 Permit. Zero extra logic — no tax, blacklist, mint, burn, or pause.

What if I deploy fees to a handle that hasn't signed up?

Falls back to the ForgeFeeVault. Fees accumulate per keccak256(handle) until the handle owner signs into Forge via X. They claim from /me with an authority-signed authorization. No loss of funds.

Is the code open source?

Yes. All contracts verified on Basescan + Sourcify. Source code at github.com/ForgeLaunch/forgeprotocolV4uniswap.

Where will the proper docs live?

A dedicated docs subdomain (docs.forgelaunch.build) is planned. For now this page is the canonical reference.