Forge Documentation
##Contents
- What is Forge?
- How it works
- Fee recipient routing
- ForgeNFT
- Profiles + transparency
- Contract reference
- Public REST API
- FAQ
##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
##How it works
›Deploy flow (1 transaction)
factoryV2.deployToken(name, symbol, feeRecipient) atomically:
- CREATE2-deploys a fresh ForgeToken (mints 100B supply to factory)
- Builds the V4 PoolKey (TOKEN / WETH, dynamic-fee flag, ForgeHook)
- Initializes the pool at the locked tick (~$20K mcap)
- Transfers 100B supply to ForgeLPManager which mints the single-sided LP NFT
- Records the fee recipient slot (creator wallet OR explicit address OR resolved @handle wallet)
- Emits
TokenDeployedwith both deployer + feeRecipient indexed
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:
lpManager.collectRewards(token)— for tokens NOT routed through ForgeFeeVault. Single tx, instant distribution.vault.distribute(token)— for tokens where fees route to the vault (handle-fallback mode). Vault snapshot-deltas the LP collect and credits per handle hash.
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 secondsSnipers 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:
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:
- Sign into Forge via X — Privy provisions an EVM embedded wallet
- Open /me— the "VAULT CLAIMS" section auto-appears if there's an accrued balance under your handle hash
- Click claim — backend verifies your session matches the handle hash and signs an EIP-712 authorization (5-min deadline + fresh nonce)
- Frontend submits
vault.claim(handleHash, recipient, currencies, nonce, deadline, sig)— all credited balances transfer to your chosen wallet
##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.
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).
›External (Uniswap V4 + Permit2 + WETH)
›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).
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.
