Protocol
Build on Mintvelocity
The token program, the DEX and the bridge take instructions from anyone. Your own tokens with your own hooks, your own pools and bonding curves, your own bridged quote assets: none of it goes through Mintvelocity’s launchpad.
What is open
Three programs make the standard anyone can build on. Each takes its instructions from any signer; the launchpad, the kit and the rest of what Mintvelocity runs on them are callers like any other.
- The token program
create_mintis permissionless: the mint is a keypair that signs, the payer pays the rent. Its arguments are decimals (at most 12), a name (1 to 32 bytes), a symbol (1 to 10), a URI (at most 200), max_supply (0 for unlimited) and four optional authorities - mint, freeze, hook and metadata - each replaceable or revoked for ever with set_authority. The hook is any program but the token program itself; while a hook authority is held, set_hook changes the program or its flags.- The DEX
create_poolis permissionless for an ordinary pool: any two different mints of the standard, any lp_fee_bps from 0 to 9,000. A bonding curve is a pool with virtual reserves, and only its hook program may open one: the DEX wants the hook’s ["hook-authority"] PDA as a signer (CurveNeedsHook otherwise). So any deployed program opens a curve as its own pool hook, and graduates it with finalize_curve.- The bridge
- Launches trade in native SOL; a pool of yours may be quoted in SOL the same way, or in anything you bring in.
The site’s trade path finds a token’s pool as the deepest one quoted in SOL, and its token pages show launches; a pool quoted in anything else, or a second pool of a pair, trades through a client of your own. The indexer records every mint and every pool created, whoever made it.
What you get
- A token hook
- Runs before and after every transfer, mint and burn of the mint, for the callbacks its flags subscribe to. Before a transfer it may answer up to three cuts, each to a holding it named in its registry, write the 64 bytes of hook data every holding keeps, or refuse. It never holds the user’s signature; it answers, and the token program applies the answer.
- A pool hook
- Runs on pool creation, on liquidity and on every swap. before_swap may answer up to three cuts and a burn from the input, after_swap the same from the output, and before_swap may set the swap’s LP fee, up to 9,000 bps; any callback may refuse. It cannot move the reserves. A hook that opens its own pool gets no initialize callbacks for it.
- A partner config
- Paid without a hook: a launch config that names your wallet and its share of the creator fee, 1% to 100% of it, fixed for ever. Every coin launched from it pays you that share of every claim, in SOL; anyone may pay a coin’s fees out at any time, every party at once. The launchpad allows a creator fee of up to 10%.
- Together
- A program that is a pool hook opens the curve, takes its cuts on every trade, refuses what it wants and graduates with finalize_curve; a token hook of yours, or none, goes on the mint; the quote is bridged SOL or an asset you registered. Every piece Mintvelocity’s launchpad is made of is yours to make.
What it costs
Rent for the accounts you create and Solana’s transaction fees. The DEX config may charge a pool creation fee (pool_creation_fee_lamports); it is zero as of this writing. On an ordinary pool, the DEX’s protocol fee: protocol_fee_bps of the quote side of every swap, set in the DEX config and fixed in the pool when it is created, for the pool’s life. The LP fee stays in the pool, for its liquidity providers.
A pool you open keeps 100% of what its hook cuts. Only a curve the launchpad itself opens pays the share model, in which the LP fee (0.3%) and 25% of what the hooks cut go to Mintvelocity; a curve any other program opens is an ordinary pool for the fee.
What stays Mintvelocity’s
Your own launchpad is yours to build: a program that mints on the token program and opens curves on the DEX as its own pool hook, with whatever rules you write into its hooks. What you cannot reuse are Mintvelocity’s own products on the three programs, which third parties use through the site or not at all: the launchpad (launches, the curve it opens as its own pool hook, launch configs and their rule on who may upgrade a custom hook), the kit (holder rewards, max wallet, the creator and early-buyer locks - its init accepts only the launchpad’s caller PDA, so kit rules cannot go on a mint you create), and the companions and their games.
The source is Apache-2.0: re-implement what you want in hooks of your own. A tax hook is the worked example of a token hook that fits a mint you create; a launch on the launchpad with a hook you wrote is the other way in.
The contracts
The instructions, as the SDK builds them. create_mint neither calls the hook nor checks its registry, so a hook that keeps per-mint state prepares its registry before the first transfer; a pool hook’s registry hangs off the pool, whose address is known before it exists. The hook interface itself is the hook crate.
token.createMint(payer, mint, { decimals, name, symbol, uri, maxSupply, mintAuthority, freezeAuthority, hookProgram, hookFlags, hookAuthority, metadataAuthority })token.setHook(hookAuthority, mint, hookProgram, hookFlags)token.setAuthority(authority, mint, 'hook', null) - revoke it, and which program runs is fixedswap.createPool(payer, authority, treasury, baseMint, quoteMint, args)swap.finalizeCurve(hookAuthority(program), bump, pool, baseMint, quoteMint, lpRecipient)bridge.register(payer, underlying, underlyingProgram, { name, symbol, uri })bridge.wrap(user, underlying, underlyingProgram, userUnderlying, amount)
Budgets
- CPI height
- Mainnet allows an invoke height of 5. A launchpad of your own on top of the DEX is at 1, the DEX at 2, the token program at 3, the token hook at 4; a CPI from that hook is 5, the limit. Mintvelocity’s own hooks make no CPIs and emit no events.
- Accounts
- 64 account locks and 64 trace entries per transaction (the limits on mainnet today).
Trust
The programs are upgradeable by Mintvelocity’s key until audited: who holds each one, read from the chain. While that is so their code can change under your pools and mints. The DEX config’s paused flag halts create_pool, swap, add_liquidity and remove_liquidity on every pool, yours included. The bridge config has a flag of its own.
The hook interface is the crate: the callbacks are instructions named after them, their flags and account prefixes are constants the crate’s tests hold to their values, and the registry carries a layout version (1). A hook written against it keeps working as long as the programs do. Mintvelocity reviews nothing you deploy: who can upgrade a hook is the first thing a client should read (hookRiskLabel in the SDK).
Balances and decimals, for integrators
A Mintvelocity holding is an account of the token program, not an SPL or Token-2022 account, so the RPC’s preTokenBalances and postTokenBalances say nothing about it: a terminal reading a trade from the transaction meta sees no token movement at all. The token program emits an event for every balance change instead, as a self-CPI in the inner instructions, and each carries the post-balances of the holdings it touched: Transferred has source_post, destination_post and every hook delta with its holding, owner, amount and post; Minted and Burned have destination_post or source_post and supply_post.
- Decimals
- Per mint, fixed at create_mint, 0 to 12. The launchpad’s tokens are 6; bridged SOL is 9; an LP mint is 9; a free mint is whatever its creator chose. Read them from the mint account with decodeMint, or from the MintCreated event; never hardcode 6.
- The SDK
tokenBalanceChanges(tx, { connection })takes any getTransaction reply and answers preTokenBalances and postTokenBalances in web3.js’s TokenBalance shape plus the holding’s address, one row per holding as changes and the decimals used as decimalsBy. A mint whose decimals it cannot read is a MissingDecimalsError, never a guess.- The API
GET /api/tx/<signature>/balancesanswers the same for any confirmed transaction; 404 for a signature the node has no confirmed transaction for, 400 for a malformed one.
Read next
A mint with your hook and your own pools and curves, with the SDK. Write a hook: the callbacks, the answer, the flags, the registry. The hook protocol and the token program, in full.