Anvora is a prelaunch-only bonding-curve market protocol on Solana with built-in revenue sharing. A creator launches a market; traders buy the market’s token on a bonding curve during a fixed trading window; once the window has closed, anyone can settle the market, and settlement pays the creator 95% of the SOL left in the curve. Holders who stake their tokens earn a pro-rata claim on the market’s revenue — the staker share of every sell fee, anything deposited into the market, a share of the protocol’s fee withdrawals when they are pointed at that market, and rewards committed for settlement. Each is credited to whoever is staked when it arrives; a commitment, at settlement.
Each market mints its own token — named and tickered by its creator, 9 decimals — as a standard, hookless Token-2022 (metadata extensions only), so it stays fully composable. Revenue isn’t tied to simply holding the token — holders opt in by staking, and rewards accrue to the staked positions the program custodies on-chain.
The creator picks a slug, a name and ticker, metadata and a duration (5 minutes to 30 days, enforced by the program) and calls create_market; the input rules are under Program reference. The program mints the curve token and opens the window, at once or at a start time the creator schedules up to 7 days ahead, and the duration counts from that opening.
While the window is open, anyone can buy from — or sell back to — the bonding curve. Price moves deterministically with supply: every buy raises it, every sell lowers it. Both directions are slippage-guarded. Holders can also stake their tokens to start earning the market's revenue share — a one-way commitment: staked tokens are locked, and unsellable, until the market is settled.
Once the window ends, settle is permissionless — anyone can close the market. Unsold curve tokens are burned and the SOL left in the curve is split (see Fees). What the rewards vault already holds was assigned when it arrived, so those claims were already open. The one thing settlement assigns is the committed rewards: to whoever is staked at that instant, or, with nobody staked, back to their depositors as refunds. Staked tokens unlock here. If the creator goes inactive, a third-party caller earns a small bounty for settling, so markets can never stay locked.
Anyone can deposit SOL into the RewardsVault at any time, during the market as well as after it. Each deposit is split immediately between whoever is staked at that instant, pro-rata to their staked tokens — so it needs at least one staker, and late arrivals never claim what came in before them. SOL meant for the stakers of settlement is committed instead (see Staking & rewards).
After settlement the curve is closed for good. Its reserves are zeroed, the market is Settled, and buy and sell revert with MarketClosed; nothing migrates to a DEX. The tokens holders kept stay ordinary Token-2022 tokens in their wallets. Settlement revokes the mint authority, so no token can be minted again; no freeze authority was ever set; and the metadata update authority is the market PDA, which no instruction of the program uses, so the name, ticker and URI never change. What remains is the revenue side: claims, unstaking, and deposits for whoever is still staked.
All fees live on-chain in the program — the platform cannot change them per market. Basis points below are the exact program constants.
| Action | Fee | Where it goes |
|---|---|---|
| Create market | 0.1 SOL, flat | Paid once by the creator, plus the usual Solana network fee. Part of it is rent for the accounts the instruction opens — the market, the mint and its metadata, the curve vault, the stake vault and the rewards vault — which stays locked in those accounts. The rest goes to the protocol treasury as the creation fee, all of it: there is no referral cut. Measured on live markets of program 2.0.0, the rent came to 0.0092–0.0095 SOL and the creation fee to 0.0905–0.0908 SOL. The price is fixed either way: a longer name or URI costs more rent and leaves the protocol less, never the creator more. |
| Buy | 0% | Buys are free of protocol fee by design — entries are favoured. |
| Sell | 2.5% of gross proceeds | 1% goes to the market’s stakers in proportion to their stake, paid into the RewardsVault as the sale happens — or, when nobody is staked, held on the market and paid to the creator at settlement · 1.5% to the protocol, accrued on the market and swept to the treasury at settlement. |
| Deposit or commit rewards | 0% | The protocol takes no cut of a deposit_rewards or a commit_rewards: all of it is for the stakers. |
| Settlement | 5% of the SOL left in the curve | Creator 95%, protocol 4%, and a 1% bounty to whoever signs the settle. The creator’s share does not depend on who that is, and a creator settling their own market collects the bounty too. |
The bounty keeps the system live without punishing creators who act: settle your own market and you collect it yourself. Two smaller flows land at settlement as well — the staker share of sells collected while nobody was staked goes to the creator, and a creator cut too small to leave their wallet rent-exempt is folded to the protocol rather than failing the settle. Affiliation referral cuts (see below) come out of the protocol’s own share, so they never reduce the creator, staker or caller amounts above.
create_market derives the creation fee as 0.1 SOL minus the rent-exempt minimum of each account it creates, computed from the accounts’ sizes rather than their balances, so pre-funding one cannot shrink it. The first market to name a referrer also opens that referrer’s vault, and its rent (0.0009 SOL) comes out of the fee the same way; a vault that already exists costs nothing. Rent is set by the network per byte, currently 5,080 lamports per byte on mainnet and devnet alike, so these figures follow the network’s rate.
Pricing follows a constant-product curve over virtual reserves (x · y = k): each market starts from the same fixed parameters, so every curve behaves identically and the price path depends only on net buying. The math runs entirely on-chain; the charts and previews on this site re-implement the same formulas for display.
| Token standard | Token-2022 — standard & hookless (metadata extensions only) |
| Name / ticker | Chosen by the creator — ticker 2–3 characters |
| Decimals | 9 |
| Total supply per market | 1,073,000,000 tokens, minted in full at create_market |
| Sellable on the curve | 1,073,000,000 tokens — the whole supply sits in the curve vault, nothing is held back |
| Initial virtual reserves | 1,073,000,000 tokens / 30 SOL |
| Unsold tokens at settle | Burned, and the mint authority revoked — no token can be minted after settlement |
Revenue is shared with stakers, not passive holders. A holder opts in by calling stake, which moves their tokens into the per-market stake vault (a Token-2022 token account at the PDA ["stake_vault", market], whose authority is the market PDA) and opens a StakePosition on first stake. Staking is one-way until the market is settled: unstake is refused before settlement, so a staker cannot ride the rewards and then exit ahead of everyone else. After settlement the lock is gone: stake still works, and a position opened then can be unstaked at once. close_stake_position reclaims the position’s rent once it is empty and fully claimed.
Two streams fund the pool: the staker share of every sell fee (1% of each sell, paid into the vault as the sale happens, or held for the creator when nobody is staked) and whatever anyone deposits via deposit_rewards (during the window and at any time after, always split on arrival). Two more reach it: 10% of every protocol fee withdrawal, paid to the stakers of the market the FeeSplit names, and commit_rewards, SOL promised to whoever is staked when the market settles. Neither a deposit nor a commitment carries a protocol fee.
A commitment (0.1 SOL minimum per call) moves its SOL into the rewards vault at once and cannot be taken back. It is accepted until settlement, after the window has ended too, and with nobody staked yet. settle_market then assigns the committed total to whoever is staked at that instant, so a position opened at the last moment shares in it like any other. If settlement finds nobody staked, each depositor gets their commitment back, with the account’s rent, through close_reward_commitment.
Distribution uses a per-token reward accumulator (fixed-point): every deposit raises the accumulator by deposit ÷ total staked, and a staker’s claim is their staked amount times the accumulator delta since their last checkpoint, floored to lamports once at credit time. The part of a deposit too small to move the accumulator is carried into the next one, so nothing is lost there. The floor is not carried: each time a position is credited, the fraction of a lamport it leaves behind stays in the vault, unclaimed.
Apart from commitments, revenue is assigned the moment it arrives, to whoever is staked at that instant, and claim_rewards is open in both phases — what a late staker misses is everything that came in before them, not the claim itself. Because rewards track an explicit staked balance custodied by the program — rather than a transfer hook watching every wallet — the market token is a plain, fully composable Token-2022.
The protocol supports referral attribution. Referral cuts are always carved from the protocol’s own share — creators, stakers and the curve are never diluted. There is a single payout point:
create_market) earns 1% of the SOL left in the curve at settle, taken from the protocol’s settlement share.On-chain, the program only enforces that a referrer is not the creator themselves — who the referrer is, and how attribution is tracked, is the app’s responsibility. The cut is not sent to the referrer’s wallet at settle: it is credited to a referral vault, a PDA derived from the referrer’s key alone, which they drain whenever they like with claim_referral_rewards. Settle is permissionless, so no address a creator did not author may sit in its critical path — a poisoned referral link would otherwise be able to freeze a market at closing time.
FxmpWaFwkyqWug7hmPTaHWWqZTqevSunr3q9WJp5MYvDThe program can still be upgraded. Its upgrade authority is a Squads multisig that needs 2 of its 3 members to approve any change, so no one person can change the program alone. An approved upgrade takes effect immediately; there is no waiting period.
| Instruction | Args | What it does |
|---|---|---|
accept_protocol_authority | — | Step 2 of the rotation — the staged key co-signs to take effect (Ownable2Step handshake). |
buy | token_amount, max_sol_cost | Buy tokens from the bonding curve with SOL. Slippage-guarded by max_sol_cost. |
claim_referral_rewards | — | A referrer drains their referral vault to any wallet they choose. The vault is a PDA of their own key, credited at every settle of a market they referred. |
claim_rewards | — | Staker claims their pro-rata share of everything assigned to them since their last claim. Open during the market as well as after it. |
close_reward_commitment | — | After settlement, a depositor closes their RewardCommitment and gets its rent back, plus the commitment itself if the market settled with nobody staked. |
close_stake_position | — | Close an emptied StakePosition and reclaim its rent — only once it holds no stake and no unclaimed rewards. |
commit_rewards | amount | Anyone commits SOL to whoever is staked when the market settles (0.1 SOL minimum). Irrevocable: the SOL moves into the rewards vault at once, and settle_market assigns the committed total. Accepted until settlement, after the window has ended too, and with nobody staked yet. No protocol fee. |
configure_fee_split | — | Protocol authority sets, or moves, the market whose stakers receive the 10% share of each fee withdrawal. Withdrawals are refused until it has run once. |
create_market | args | Launch a market: mints the curve token (a standard, hookless Token-2022), opens the trading window (at once, or at a scheduled start_ts), and records the creator's referrer for affiliation. Charges the flat creation cost: rent for the accounts it opens, the rest to the protocol (see Fees). Input rules are below. |
deposit_rewards | amount | Deposit SOL into the RewardsVault for stakers. Split immediately between whoever is staked at that instant, during the window or after it — so it is refused when nobody is staked. No protocol fee. |
initialize_protocol_treasury | — | One-time protocol setup — creates the singleton treasury PDA (program upgrade authority only). |
rotate_protocol_authority | new_authority | Step 1 of the two-step authority rotation — stages a new protocol authority that must be accepted before it takes effect. |
sell | token_amount, min_sol_output | Sell tokens back to the curve. Slippage-guarded by min_sol_output; the sell fee applies. When someone is staked, the staker share is paid into the rewards vault as the sale happens, so it is claimable straight away; when nobody is, it is held on the market for the creator. The protocol share accrues on the market until settlement. |
settle_market | — | Close the market once the window ends. Permissionless: burns unsold tokens, revokes the mint authority and splits the SOL left in the curve between creator, protocol, caller and the creator's referral vault. It also sweeps the protocol's accrued sell fees to the treasury and pays the creator the staker share collected while nobody was staked. The only reward it assigns is the committed total, to whoever is staked at that instant, or, with nobody staked, it makes the commitments refundable; every other entitlement was fixed when the money arrived. |
stake | amount | Stake market tokens into the per-market stake vault to earn the revenue share. Opens a StakePosition on first stake; works during the window and after settlement. One-way until settlement: staked tokens cannot come back out before it, and can at any time after. |
unstake | amount | Withdraw staked tokens back to your wallet, settling any accrued rewards into the position first. Refused until the market is settled — staking is a commitment for the length of the market, not a position you can time. |
withdraw_protocol_fees | — | Protocol authority withdraws accrued protocol fees from the treasury. 10% of each withdrawal is paid to the stakers of the market the FeeSplit names, split on arrival like a deposit; with nobody staked there it is held back for the next withdrawal. |
The program checks each field of args and reverts the whole transaction if one fails:
slug | 1–32 characters of a–z, 0–9 and hyphens, not starting or ending with a hyphen. A seed of the market PDA, so unique per creator. |
name | 1–32 bytes of UTF-8, with no surrounding whitespace, no control characters, and no zero-width, bidirectional, soft-hyphen or byte-order marks. |
symbol | 2–3 characters of uppercase A–Z and digits, starting with a letter. |
metadata_uri | Starts with https:// or ipfs://, at most 128 bytes of printable ASCII, no spaces. Written into the mint's metadata and the MarketCreated event, not the market account. |
start_ts | None opens trading in the same transaction. A time must be after the chain clock and at most 7 days ahead of it, measured when the transaction lands. |
end_ts | end_ts − start_ts must be 5 minutes to 30 days. For an immediate launch start_ts is the chain clock when the transaction lands, so keep a margin from both bounds: signing delays the landing, and the chain clock can lag wall time. |
referral | The default key for none, and never the creator. The referral vault account is required exactly when a referrer is named. |
FeeSplit | Singleton. The market whose stakers receive the 10% share of protocol fee withdrawals, the share held back while nobody was staked there, and the running total routed. |
Market | One per market — curve reserves, trading-window timestamps, status, total staked, the reward accumulator, the sell fees awaiting settlement (the protocol share, and the staker share collected while nobody was staked), the committed rewards total, and the creator's referrer. |
ProtocolTreasury | Singleton — the protocol authority key, plus a staged pending authority for the two-step rotation. It keeps no fee counter: the protocol's fees are its SOL balance above rent, part of which may be owed to stakers (the share FeeSplit holds back). |
ReferralVault | One per referrer, shared across every market they referred — holds their settle cuts until they claim them. |
RewardCommitment | One per (market, depositor). What that depositor has committed to the market's stakers; their later commitments add to it. |
RewardsVault | One per market — the SOL revenue pool stakers claim from, created up front so revenue can be deposited during the window. |
StakePosition | One per (market, wallet) — the owner's staked amount, reward checkpoint and pending (claimable) rewards. |
| ProtocolTreasury | ["protocol_treasury"] |
| Market | ["market", creator, slug] |
| Mint | ["mint", market] |
| Curve vault | [market, token_2022_program, mint] (Associated Token program) |
| RewardsVault | ["rewards_vault", market] |
| StakeVault | ["stake_vault", market] |
| StakePosition | ["stake_position", market, owner] |
| ReferralVault | ["referral_vault", referrer] |
| FeeSplit | ["fee_split"] |
| RewardCommitment | ["reward_commitment", market, depositor] |
| Event authority | ["__event_authority"] (Anchor) |
15 of the 17 instructions emit an Anchor event — one event each, and this is what powers the live charts and feeds on this site. The other 2 emit nothing at all: close_stake_position and initialize_protocol_treasury, by design — follow them by reading the accounts, because no event is ever coming. The 15:
FeeSplitConfiguredMarketBuyMarketCreatedMarketSellMarketSettledProtocolAuthorityRotatedProtocolAuthorityRotationProposedProtocolFeesWithdrawnReferralRewardsClaimedRewardCommitmentClosedRewardsClaimedRewardsCommittedRewardsDepositedStakedUnstakedThe 40 custom errors the program defines (codes start at 6000, Anchor convention):
| Code | Name | Message |
|---|---|---|
6000 | InvalidSlug | Slug must be 1-32 characters of lowercase letters, digits and hyphens, and cannot start or end with a hyphen. |
6001 | InvalidMetadataUri | Metadata URI must start with https:// or ipfs://, be at most 128 bytes, and contain only printable ASCII. |
6002 | InvalidMarketEnd | The market end timestamp must be after the trading start. |
6003 | MarketDurationTooShort | The market duration is shorter than the minimum allowed. |
6004 | MarketDurationTooLong | The market duration is longer than the maximum allowed. |
6005 | InvalidQuantity | The quantity must be greater than zero. |
6006 | MathOverflow | Arithmetic overflow. |
6007 | MarketClosed | The market trading window has not started or is already closed.Returned once the market is settled. Before trading opens, buy and sell return MarketNotStarted (6034) instead. |
6008 | MarketExpired | The market trading window has expired; only settlement is allowed now. |
6009 | MarketAlreadySettled | The market is already settled. |
6010 | MarketSettledRequired | The market is not settled yet. |
6011 | MarketNotEnded | The market cannot be settled before the end timestamp. |
6012 | InsufficientCurveLiquidity | Not enough liquidity remains in the curve. |
6013 | SlippageExceeded | The slippage limit was exceeded. |
6014 | InvalidRewardsVault | The provided rewards vault does not match the market. |
6015 | NoFundsAvailable | No funds are currently withdrawable. |
6016 | NoClaimAvailable | No revenue is currently claimable. |
6017 | NoStakersToReward | No tokens are staked, so a deposit has no one to distribute to. |
6018 | VaultBalanceMismatch | The vault balance is inconsistent with the recorded reserves. |
6019 | InvalidStakePositionOwner | The provided stake position owner does not match the signer. |
6020 | InvalidStakePositionMarket | The provided stake position market does not match the market. |
6021 | Unauthorized | Signer is not authorized to perform this action. |
6022 | ProtocolUpgradeAuthorityRequired | Only the program upgrade authority can initialize the protocol treasury. |
6023 | RewardAccountingError | Reward accounting invariant violated.Never raised by this version: the reward accumulator wraps by design. The variant stays so the codes after it keep their numbers. |
6024 | InsufficientStake | Cannot unstake more than the staked amount. |
6025 | StakeStillActive | Cannot close a stake position that still has staked tokens. |
6026 | UnclaimedRewards | Cannot close a stake position with unclaimed rewards. |
6027 | SelfReferral | A referrer cannot be the same wallet as the referred user. |
6028 | InvalidReferrer | The provided referral vault does not match the market's creator referrer. |
6029 | CreationCostBelowRent | The fixed creation cost is lower than the rent of the accounts being created. |
6030 | InvalidWithdrawDestination | The withdrawal destination cannot be one of the program accounts this instruction already holds. |
6031 | InvalidTokenName | Token name must be 1-32 bytes, without surrounding whitespace or characters that alter how it renders. |
6032 | InvalidTokenSymbol | Token symbol must be 2-3 characters of uppercase letters and digits, starting with a letter. |
6033 | MetadataAuthorityInvalid | The market PDA could not be set as the mint metadata update authority. |
6034 | MarketNotStarted | Trading on this market has not opened yet. |
6035 | InvalidMarketStart | A scheduled trading start must be in the future. |
6036 | MarketStartTooFar | The trading start is scheduled further out than the maximum allowed delay. |
6037 | InvalidFeeSplitMarket | The provided market is not the one the fee split names. |
6038 | WithdrawalTooSmallToSplit | The withdrawal is too small to carry the stakers' share; it would route zero. |
6039 | RewardCommitmentTooSmall | A reward commitment must be at least 0.1 SOL. |
The full Anchor IDL (interface definition — everything the tables above are generated from) is available as JSON. Use it with Anchor’s TypeScript client to integrate against the program directly:
import { Program } from "@coral-xyz/anchor";
import idl from "./anvora.json";
const program = new Program(idl, provider);
// program.methods.buy(tokenAmount, maxSolCost)…