forgeit.fun/ developersIDL v0.7.0 · forgeit-idl.json

Integrate forgeit.fun

forgeit.fun is a Solana launchpad. Every coin starts on a SOL bonding curve inside one native program, then graduates to a Raydium CPMM pool paired with SOL, with the liquidity locked. This page is what a terminal, trading bot or indexer needs to list the coins, show them live and trade them.

Events use Anchor's emit_cpi format and instructions use Anchor-style discriminators, so parsers built for Anchor launchpads read us as is. The one thing to know before sending trades is the transaction rules: one trade per transaction, called directly.

Overview

Addresses

Program
A5ZL2dp9ura1wk7w8EwQcnqnNcy6HAwLxmH3aXgFUbjw
Global config · PDA ["global"]
2bMNmWYLdtZ3epni6SLdD4bXPBnLyUUveP8wMLqp3sof
Fee recipient
72Bv4i6hx12f2YiadRn6USdQy5qu8CB8PV7VZTzmFCoN
Event authority · PDA ["__event_authority"]
3vMWqk1Lk9BEhuqUfSSE8ebZx6t6zD7WjDjK9PwABLLK
Jito don't-front marker (every trade)
jitodontfront111111111111111111111111111111
Raydium CPMM (graduated pools)
CPMMoo8L3F4NbTegBCKVNunggL7H1ZpdTHKxQB5qKP1C
CPMM config (0.25% pools)
D4FPEruKEHrG5TenZ2mpDGEfu1iUvTiqBxvpU8HLBvC2
Per coinDerivation
CurvePDA ["curve", mint] of the program
Vault (the curve's tokens)ATA(curve, mint) under Token-2022
Raydium pool after graduationPDA ["pool", mint] of the program: it is the CPMM pool_state of a SOL pool (not CPMM's own pair PDA). Also in MigrateEvent.pool.
Fee Key NFT (creator's locked LP)mint = PDA ["fee_key", mint] of the program

Coins

Events

Every create, trade, completion and migration emits an event through a self-CPI, exactly like Anchor's emit_cpi!: an inner instruction of the program, signed by the event authority, whose data is

[228, 69, 165, 46, 81, 203, 154, 29]   // Anchor's EVENT_IX_TAG (little endian)
+ 8-byte event discriminator           // sha256("event:<Name>")[..8]
+ borsh fields

Read them from meta.innerInstructions (they cannot be lost to log truncation). New fields are only ever appended: decode the prefix you know and ignore extra bytes. sol_amount-style fields are lamports. quote_mint is the all-zero pubkey: every live coin is priced in SOL.

CreateEvent

Discriminator [27, 114, 169, 77, 222, 235, 99, 118]

FieldTypeNotes
mintpubkey
curvepubkey
creatorpubkey
namestring
symbolstring
uristring
virtual_solu64
virtual_tokenu64
real_tokenu64
total_supplyu64
fee_ppmu32
timestampi64
creator_fee_ppmu32
holders_bpsu16
fee_topubkey
quote_mintpubkey

TradeEvent

Discriminator [189, 219, 127, 211, 78, 230, 97, 238]

FieldTypeNotes
mintpubkey
userpubkey
is_buybool
token_amountu64
sol_amountu64
reserve_solu64
feeu64
virtual_solu64
virtual_tokenu64
real_solu64
real_tokenu64
timestampi64
creator_feeu64
holders_feeu64
buyback_tokensu64

CompleteEvent

Discriminator [95, 114, 97, 156, 212, 46, 152, 8]

FieldTypeNotes
mintpubkey
curvepubkey
real_solu64
timestampi64

MigrateEvent

Discriminator [216, 175, 231, 95, 45, 98, 108, 21]

FieldTypeNotes
mintpubkey
poolpubkey
creatorpubkey
token_amountu64
sol_amountu64
tokens_burnedu64
lp_burnedu64
create_pool_feeu64
migration_feeu64
timestampi64
lp_lockedu64
creator_bonusu64
fee_key_mintpubkey
quote_mintpubkey

CreatorFeesClaimedEvent

Discriminator [40, 137, 200, 40, 154, 133, 234, 251]

FieldTypeNotes
mintpubkey
creatorpubkey
amountu64

FeesClaimedEvent

Discriminator [69, 22, 213, 206, 103, 202, 98, 163]

FieldTypeNotes
mintpubkey
recipientpubkey
amountu64

GlobalUpdatedEvent

Discriminator [238, 115, 218, 227, 170, 114, 63, 209]

FieldTypeNotes
authoritypubkey
fee_recipientpubkey
fee_ppmu32
create_pausedbool

Accounts

To read a curve directly (e.g. after a restart), fetch PDA ["curve", mint]. A live SOL curve is 94 bytes. The account is closed at graduation. Do not look for a quote vault: there is not one.

Curve

8-byte discriminator [191, 180, 249, 66, 180, 71, 51, 182], then borsh fields:

FieldTypeNotes
creatorpubkey
real_solu64
real_tokenu64
fees_unclaimedu64
migration_feeu64
fee_ppmu32
versionu8
bumpu8
vault_bumpu8
flagsu8
creator_fee_ppmu32
creator_fees_unclaimedu64
holders_bpsu16

Global

8-byte discriminator [167, 232, 232, 177, 200, 108, 114, 127], then borsh fields:

FieldTypeNotes
authoritypubkey
pending_authoritypubkey
fee_recipientpubkey
fee_ppmu32
migration_feeu64
create_pausedbool
bumpu8

Curve math

A virtual constant-product curve. Per coin the initial reserves are fixed:

Initial virtual SOL30_000_000_000 lamports (30 SOL)
Initial virtual tokens1_073_000_000_000_000 atoms (1.073B tokens)
Tokens for sale on the curve793_100_000_000_000 atoms (793.1M)
Feefee_ppm + creator_fee_ppm from the curve (now 1000 + 3500 = 4500 ppm = 0.45%)
virtual_sol   = initial_virtual_sol + real_sol
virtual_token = 1_073_000_000_000_000 - 793_100_000_000_000 + real_token
price (SOL per token)  = (virtual_sol / 1e9) / (virtual_token / 1e6)
market cap (SOL)       = price * 1_000_000_000
progress               = 1 - real_token / 793_100_000_000_000      // 1 = sold out, graduates

buy exactly `amount` atoms:
  cost      = ceil(virtual_sol * amount / (virtual_token - amount))
  fee       = ceil(cost * fee_ppm / 1_000_000)
  user pays = cost + fee                                   // checked against max_sol_cost

buy for `sol_in` (buy_exact_sol_in):
  net    = floor(sol_in * 1_000_000 / (1_000_000 + fee_ppm))
  amount = min(floor(virtual_token * net / (virtual_sol + net)), real_token)
  then the exact-amount formula above; the user pays that (<= sol_in)

sell `amount` atoms:
  out          = floor(virtual_sol * amount / (virtual_token + amount))
  fee          = ceil(out * fee_ppm / 1_000_000)
  user gets    = out - fee                                 // checked against min_sol_output

Holder buyback. The creator chose, at launch and forever, a share holders_bps of the creator fee that buys the coin back inside every trade, right after it: those tokens leave circulation (burned at graduation). TradeEvent carries the reserves after the buyback (virtual_sol, virtual_token, real_sol, real_token) and buyback_tokens: always quote the next trade from the latest event or account, never by replaying your own math.

Trading instructions

Leave every optional quote account out. The user's token account must exist: create it in the same transaction with CreateIdempotent of the Associated Token program, before the trade (the only other instruction of that kind the rules allow).

buy_exact_sol_in

Spends at most sol_in and receives at least min_tokens_out. What a terminal "buy for X SOL" button should use.

Discriminator [56, 252, 116, 8, 158, 223, 205, 95] (sha256("global:buy_exact_sol_in")[..8]). Args (borsh):

#Accountw/sNotes
0userws
1mint
2curvewPDA ["curve", mint]
3vaultwPDA [curve, Token-2022 program, mint] of Associated Token program
4user_tokenwToken-2022 account of `mint` owned by `user` (usually its ATA).
5jito_dont_frontRead-only Jito marker: in a bundle this transaction must be first. jitodontfront111111111111111111111111111111
6instructions_sysvarSysvar1nstructions1111111111111111111111111
7token_programTokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb
8system_program11111111111111111111111111111111
9event_authority3vMWqk1Lk9BEhuqUfSSE8ebZx6t6zD7WjDjK9PwABLLK
10programA5ZL2dp9ura1wk7w8EwQcnqnNcy6HAwLxmH3aXgFUbjw

buy

Buys exactly amount token atoms, paying at most max_sol_cost lamports including the fee.

Discriminator [102, 6, 61, 18, 1, 218, 235, 234] (sha256("global:buy")[..8]). Args (borsh):

#Accountw/sNotes
0userws
1mint
2curvewPDA ["curve", mint]
3vaultwPDA [curve, Token-2022 program, mint] of Associated Token program
4user_tokenwToken-2022 account of `mint` owned by `user` (usually its ATA).
5jito_dont_frontRead-only Jito marker: in a bundle this transaction must be first. jitodontfront111111111111111111111111111111
6instructions_sysvarSysvar1nstructions1111111111111111111111111
7token_programTokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb
8system_program11111111111111111111111111111111
9event_authority3vMWqk1Lk9BEhuqUfSSE8ebZx6t6zD7WjDjK9PwABLLK
10programA5ZL2dp9ura1wk7w8EwQcnqnNcy6HAwLxmH3aXgFUbjw

sell

Sells exactly amount token atoms for at least min_sol_output (after the fee).

Discriminator [51, 230, 133, 164, 1, 127, 131, 173] (sha256("global:sell")[..8]). Args (borsh):

#Accountw/sNotes
0userws
1mint
2curvewPDA ["curve", mint]
3vaultwPDA [curve, Token-2022 program, mint] of Associated Token program
4user_tokenwToken-2022 account of `mint` owned by `user` (usually its ATA).
5jito_dont_frontRead-only Jito marker: in a bundle this transaction must be first. jitodontfront111111111111111111111111111111
6instructions_sysvarSysvar1nstructions1111111111111111111111111
7token_programTokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb
8system_program11111111111111111111111111111111
9event_authority3vMWqk1Lk9BEhuqUfSSE8ebZx6t6zD7WjDjK9PwABLLK
10programA5ZL2dp9ura1wk7w8EwQcnqnNcy6HAwLxmH3aXgFUbjw

Transaction rules (anti-bundle)

Before trading, the program reads the Instructions sysvar. A transaction is accepted only if:

// a terminal buy that takes its own fee: accepted
ComputeBudget.setComputeUnitLimit / setComputeUnitPrice
AssociatedToken.createIdempotent(user, user_token, user, mint, Token-2022)
System.transfer(user -> terminal_fee_wallet, lamports)
forgeit.buy_exact_sol_in(sol_in, min_tokens_out)
System.transfer(user -> jito_tip_account, lamports)      // optional

Compute: a curve trade is ~12k CU, creating the token account adds ~25k; size the limit from a simulation (finding the curve and vault PDAs costs a little more for some mints).

Holder rewards and traders' cashback

A creator can route their creator money through the platform's rewards wallet AtATU8xAiKuj4RhCzqwhGgsL7hGyhFDzjXGVftAtBLgu instead of keeping it all: the coin's fee_to is that wallet (fixed forever at creation) and its metadata JSON (content-addressed, so fixed too) says how the wallet splits what it collects:

"rewards": {"tokens": ["SOL" or a mint, 1 to 5 in rotation], "holdersBps": 0-10000, "tradersBps": 0-10000, "payTo": "<the creator's wallet>"}

Graduation

Reference: create

create

Launches a SOL coin: Token-2022 mint with on-mint metadata, curve PDA, vault holding the whole supply, optional dev buy that executes atomically with creation (nobody can buy before it). The mint keypair signs. Omit quote_mint: a live coin is priced in SOL.

Discriminator [24, 30, 200, 40, 5, 28, 7, 119] (sha256("global:create")[..8]). Args (borsh):

#Accountw/sNotes
0creatorws
1global2bMNmWYLdtZ3epni6SLdD4bXPBnLyUUveP8wMLqp3sof
2mintws
3curvewPDA ["curve", mint]
4vaultwPDA [curve, Token-2022 program, mint] of Associated Token program
5creator_tokenwUsed only for the dev buy.
PDA [creator, Token-2022 program, mint] of Associated Token program
6jito_dont_frontjitodontfront111111111111111111111111111111
7instructions_sysvarSysvar1nstructions1111111111111111111111111
8token_programTokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb
9associated_token_programATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL
10system_program11111111111111111111111111111111
11event_authority3vMWqk1Lk9BEhuqUfSSE8ebZx6t6zD7WjDjK9PwABLLK
12programA5ZL2dp9ura1wk7w8EwQcnqnNcy6HAwLxmH3aXgFUbjw
13fee_to optionalOnly when args.fee_to is set: that wallet (system-owned, not executable).

CreateArgs (borsh):

FieldTypeNotes
namestring
symbolstring
uristring
initial_buy_solu64
min_tokens_outu64
holders_bpsu16
fee_toOption<pubkey>

Public API

Read-only JSON at https://forgeit.fun (CORS open, cached a few seconds; please cache on your side too).

GET /api/tokens?sort=new|active|mcap|progress&status=all|curve|complete|migrated&q=&limit=48&offset=0   coins
GET /api/tokens/<mint>                    one coin: curve state, rewards, buyback, graduation
GET /api/tokens/<mint>/trades?limit=100    latest trades (curve and the Raydium pool)
GET /api/tokens/<mint>/candles?tf=60      OHLC candles, tf in seconds
GET /api/tokens/<mint>/holders            top holders (curve and pool labelled)
GET /api/quick?mints=a,b,c                   quick stats of up to 150 coins
GET /api/stream                              server-sent events: new coins and trades as they land
GET /api/price                               SOL in USD
GET /api/stats                               platform totals; /api/stats/range?r=24h|7d|30d|all for charts
GET /api/rewards                             the rewards wallet; /api/rewards/<mint> a coin's rewards
GET /api/cashback/<mint>?wallet=          a coin's traders' cashback and a wallet's part
GET /c/<mint>                              a coin's share page: link preview card, then the coin on the site

AI agents: MCP server

Let an AI agent (Claude, Cursor or any MCP client) read forgeit coins and trade them. The server runs on your machine over stdio and signs with your keypair file: keys never leave it. One file, Node 20+, no install: pushit-mcp.mjs. Tool names still start with pushit_.

Safe by default: without a keypair it is read-only; trades are simulated until you set PUSHIT_TRADING=on; every trade is capped by PUSHIT_MAX_SOL_PER_TRADE (default 0.1 SOL) and every day by PUSHIT_MAX_SOL_PER_DAY (default 1 SOL). Use a separate wallet with only what the agent may spend.

Tools

ToolWhat it does
pushit_list_coinsCoins by new, market cap, graduation progress or activity; filter curve / Raydium; search.
pushit_get_coinOne coin: price, cap, progress, fees, links, top holders, latest trades.
pushit_quotePrice a buy or sell from the chain (curve or Raydium pool), without sending.
pushit_buy / pushit_sellTrade on the SOL curve or, after graduation, in the coin's Raydium SOL pool. Sell by amount or percent.
pushit_portfolioSOL balance, holdings with value, coins created.
pushit_wallet_statusWallet, trading on/off, limits, spent today.

Claude Desktop / Cursor

Add to claude_desktop_config.json (Claude Desktop) or .cursor/mcp.json (Cursor):

{
  "mcpServers": {
    "pushit": {
      "command": "node",
      "args": ["/path/to/pushit-mcp.mjs"],
      "env": {
        "PUSHIT_RPC_URL": "https://your-rpc.example",
        "PUSHIT_KEYPAIR": "/path/to/agent-wallet.json",
        "PUSHIT_TRADING": "off",
        "PUSHIT_MAX_SOL_PER_TRADE": "0.1",
        "PUSHIT_MAX_SOL_PER_DAY": "1"
      }
    }
  }
}

Claude Code

claude mcp add pushit --env PUSHIT_KEYPAIR=/path/to/agent-wallet.json --env PUSHIT_RPC_URL=https://your-rpc.example -- node /path/to/pushit-mcp.mjs

Settings

VariableDefaultMeaning
PUSHIT_RPC_URLpublic mainnet RPCUse your own RPC for trading; the public one is rate-limited.
PUSHIT_KEYPAIRnone (read-only)Keypair file (JSON array, as from solana-keygen).
PUSHIT_TRADINGoffon sends real transactions; anything else simulates.
PUSHIT_MAX_SOL_PER_TRADE0.1Largest single buy, in SOL.
PUSHIT_MAX_SOL_PER_DAY1Total buys per UTC day, tracked in ~/.pushit-mcp/spend.json.
PUSHIT_SLIPPAGE_BPS300Slippage tolerance (3%).
PUSHIT_PRIORITY_FEE20000Priority fee, micro-lamports per compute unit.

Memecoins are highly speculative and can go to zero. An agent can be wrong: keep the limits low.

Errors

Custom program errors (custom program error: 0x...):

CodeHexNameMeaning
60000x1770UnauthorizedUnauthorized
60010x1771NoPendingAuthorityNo pending authority
60020x1772FeeTooHighFee too high
60030x1773MigrationFeeTooHighMigration fee too high
60040x1774InvalidCurveConfigInvalid curve config
60050x1775CreatePausedCreate paused
60060x1776InvalidNameInvalid name
60070x1777InvalidSymbolInvalid symbol
60080x1778InvalidUriInvalid uri
60090x1779ZeroAmountZero amount
60100x177aInsufficientInventoryInsufficient inventory
60110x177bNotOutstandingNot outstanding
60120x177cInsufficientRealSolInsufficient real sol
60130x177dSlippageExceededSlippage exceeded
60140x177eMathOverflowMath overflow
60150x177fInvalidCurveStateInvalid curve state
60160x1780AmountTooSmallAmount too small
60170x1781CurveNotCompleteCurve not complete
60180x1782MigrationUnfundedMigration unfunded
60190x1783AlreadyMigratedAlready migrated
60200x1784CpiForbiddenCpi forbidden
60210x1785NotDirectTradeNot direct trade
60220x1786MultipleMarketOperationsMultiple market operations
60230x1787SiblingProgramForbiddenSibling program forbidden
60240x1788ComputeBudgetInstructionCompute budget instruction
60250x1789AtaInstructionAta instruction
60260x178aSystemInstructionSystem instruction
60270x178bSysvarMalformedSysvar malformed
60280x178cMarkerWritableMarker writable
60290x178dTokenAccountDelegatedToken account delegated
60300x178eTokenAccountCloseAuthorityToken account close authority
60310x178fTokenAccountFrozenToken account frozen
60320x1790VaultBalanceMismatchVault balance mismatch
60330x1791SolBalanceMismatchSol balance mismatch
60340x1792NothingToClaimNothing to claim
60350x1793InvalidInstructionInvalid instruction
60360x1794InvalidAccountInvalid account
60370x1795MissingSignerMissing signer
60380x1796AccountNotWritableAccount not writable
60390x1797InvalidProgramInvalid program
60400x1798InvalidMarkerInvalid marker
60410x1799WrongFeeRecipientWrong fee recipient
60420x179aInvalidTokenAccountInvalid token account
60430x179bAlreadyInitializedAlready initialized
60440x179cPoolConfigRejectedPool config rejected
60450x179dCurveCompleteCurve complete
60460x179eWrongCreatorWrong creator
60470x179fInvalidHoldersShareInvalid holders share
60480x17a0InvalidFeeToInvalid fee to
60490x17a1InvalidQuoteInvalid quote
60500x17a2UnsupportedQuoteMintUnsupported quote mint
60510x17a3InvalidQuoteParamsInvalid quote params

Contact

Listing forgeit.fun coins in your terminal, bot or data product? Write to [email protected] or @forgeitfun on X.

Security reports: [email protected].