$MORGOON — code that runs without an operator.
A bonding curve token on Solana. Buys mint MORGOON along an exponential curve. Sells burn MORGOON and return SOL from reserves. No owner. 21,000,000 cap.
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
bonding_curve
Method
Pool-proof bonding curves are a 2024–2025 design pattern emerging on Solana, built on Token-2022's transfer hook extension. The idea: combine a bonding curve (mint on buy, burn on sell, math-derived price) with a transfer rule that rejects every program-owned destination — so no third party can ever spin up a Raydium, Orca, or Meteora pool for the token. The curve is structurally the only market, not by convention but by mint config.
The pattern is only a few months old in production. We're taking it and trying a memecoin spin on it: fair launch, 21M asymptotic cap, dynamic sell fee against late dumps, and self-deprecation that locks the program at 99% of supply. The math, the mechanics, and the contract details are below.
How It Works
Read the technical specificationThe math, the mechanics, and what the contract actually does
The curve
We use a saturating exponential bonding curve. The total amount of MORGOON that has been minted at any point is a function of the cumulative SOL that has flowed into the contract:
totalMinted(sol) = K · (1 − e^(−sol/S)) K = 21,000,000 (asymptotic supply cap) S = 650 SOL (curve scale — half-life parameter)
Early SOL mints proportionally more MORGOON than late SOL. As cumulative SOL grows, mint rate slows; the supply asymptotically approaches K but never exceeds it. After ~6·S ≈ 3,900 SOL has flowed in, supply is at 99.75% of cap.
Marginal price
The instantaneous price (SOL per MORGOON) at any cumulative-SOL position:
price(sol) = S · e^(sol/S) / K
The price is monotonically increasing. Every SOL pushed into the curve raises the price for the next buyer. Sells reverse the position and lower the price.
Buy mechanics
The buy instruction does the following, atomically:
- Receive solIn lamports from the buyer.
- Deduct flat 1% buy fee → routed to the dev wallet.
- Add the remaining SOL to the curve reserve (the program-controlled vault).
- Compute
mintFor(cumulativeSolBefore, netSol)— the number of new MORGOON tokens to mint. - Mint those tokens directly to the buyer's token account via the config PDA.
- Update curve state: cumulativeSol, totalMinted, buyCount, totalFees.
If the slippage check fails (tokens minted < the buyer's minTokensOut), the entire transaction reverts.
Sell mechanics
The sell instruction is the inverse of buy:
- Receive tokensIn MORGOON from the seller.
- Compute
burnFor(currentTotal, tokensIn)— the SOL to release.burnFor(currentTotal, tokensIn) = S · ln((K − currentTotal + tokensIn) / (K − currentTotal))
- Burn the seller's tokens (supply decreases).
- Deduct dynamic sell fee on the SOL amount → dev wallet. Fee is 1% by default; once supply exceeds 80% of cap, it ramps linearly to a maximum of 2% at 99% of cap. Capped at 2% — the seller never sees a higher rate.
fill_pct = total_minted / K sell_fee_bps = 100 if fill_pct < 0.80 100 + 100 * progress if 0.80 ≤ fill_pct < 0.99 200 if fill_pct ≥ 0.99 where progress = (fill_pct − 0.80) / 0.19
- Transfer the remaining SOL from the reserve vault to the seller.
- Update curve state.
Sells always work as long as the seller actually owns the tokens and the curve state is consistent — by construction, the reserve is always sufficient.
Self-deprecation
When totalMinted ≥ 0.99 · K, the program flips the on-chain selfDeprecated flag to true. From that point forward, the buy instruction reverts unconditionally. The mint authority is the program PDA, so even after self-deprecation, no human can mint a single additional unit. Sells continue to function as long as reserves remain.
Pool-proof transfer hook
The mint is configured with a Token-2022 TransferHook extension pointing at a small companion program. On every transfer_checked call, Token-2022 invokes the hook. The hook enforces a single rule:
source_owner.owner == SystemProgram AND destination_owner.owner == SystemProgram
In Solana, a normal user wallet (Phantom, Solflare, hardware wallet) is owned by the System Program. Any program-derived address — Raydium pool authority, Orca whirlpool, Meteora DLMM, future AMMs we've never heard of — is owned by its own program. So this single check rejects every AMM, lending market, and smart-contract-wallet integration, while permitting wallet-to-wallet transfers.
Mint and burn don't trigger transfer hooks — they're separate Token-2022 instructions — so the buy and sell flows are unaffected. The hook only fires on direct token transfers, which is exactly where rogue pools and predatory routing would attempt to insert themselves.
Authorities & verification
- Mint authority: Config PDA — derived from the program ID. No upgrade key, no multisig, no human signer.
- Freeze authority: None (set to
nullat initialize). - Update authority: None — config struct has no setters after initialize.
- Verification: The deployed BPF binary lives on-chain at the program ID. Anyone can fetch it via
solana program dumpand disassemble or run it through a BPF analyzer.
FAQ
Why a bonding curve instead of a Raydium/Meteora pool?
Can someone open their own Raydium / Orca pool for this token?
What stops the dev from rugging?
Where does the fee go and why is the sell fee dynamic?
Why is there a hard cap at 21M?
Is the contract audited?
What chain is this on?
Can I sell at any time?
totalMinted(sol) = K · (1 − e^(−sol/S))