Graduation is the moment ACTFUN token transitions from the mining phase into a fully functional trading market. It happens automatically, in the same on-chain transaction as the final mine, the instantDocumentation Index
Fetch the complete documentation index at: https://actfun.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
totalMined reaches mineableSupply. No one has to push a button, call a contract, or wait for an off-chain system to react.
What Triggers Graduation
Inside everymine() call, the contract checks whether totalMined >= mineableSupply after updating state. If that condition is true, it calls _graduate() before returning. This means the miner who fills the last slot pays the graduation cost as part of their own transaction — and they receive their tokens too.
You cannot mine a token that has already graduated. Calling
mine() on a graduated token reverts with "Token has graduated — swap instead!". Switch to the swap interface to trade.What _graduate() Does
When graduation fires, the contract executes three things in sequence:
- Sets
graduated = true, permanently locking out the mining functions. - Mints the 5% LP reserve tokens (
lpReserve) to itself. - Records the AMM’s initial reserves:
tokenReserve = lpReserveandarcReserve = address(this).balance(all ARC accumulated from mining fees).
buyTokens() and sellTokens() are unlocked, and the token trades against its own built-in liquidity pool.
The ARC side of the initial liquidity is the sum of all
feePerMine payments collected during Phase 1, minus any refunds that miners claimed before graduation. Miners who claimed refunds before graduation reduced the pool’s initial depth.The Constant-Product AMM Formula
MINEPAD’s built-in DEX uses the classic constant-product formula the same model as Uniswap v1. At any point in time, the pool maintains the invariantx * y = k, where x is arcReserve and y is tokenReserve.
Buying tokens with ARC
When you send ARC into the pool, the contract calculates how many tokens you receive:arcIn increases, tokensOut grows but at a diminishing rate. Larger buys move the price more than smaller ones.
Selling tokens for ARC
When you sell tokens back to the pool, the contract calculates how much ARC you receive:Worked example: buying tokens
Worked example: buying tokens
Suppose the pool has After the trade:
arcReserve = 100 ARC and tokenReserve = 50,000 tokens. You send 10 ARC.arcReserve = 110 ARC, tokenReserve ≈ 45,455 tokens. The product 110 × 45,455 ≈ 5,000,050 is approximately equal to the original 100 × 50,000 = 5,000,000 — constant-product maintained (small rounding due to integer math).Worked example: selling tokens
Worked example: selling tokens
Using the same pool (After the trade:
arcReserve = 100 ARC, tokenReserve = 50,000 tokens), you sell 5,000 tokens.arcReserve ≈ 90.91 ARC, tokenReserve = 55,000 tokens.Price Discovery and Slippage
Because the AMM uses a fixed formula with no external oracle, the price of a token is determined entirely by the ratio ofarcReserve to tokenReserve at any moment:
buyTokens() and sellTokens() accept a minimum output parameter (minTokensOut and minArcOut respectively). Your transaction reverts if the actual output falls below your minimum, protecting you from front-running and unexpected price moves.
Why There Is No External DEX
Because the AMM lives inside the sameTokenLauncher contract that handled mining, the token needs no external listing, no liquidity migration, and no bridge to another protocol. The pool is always at the same contract address. There is no LP token the pool’s liquidity is permanently locked inside the contract and cannot be withdrawn by anyone, including the creator.
Selling Requires an Approval Step
Selling tokens is a two-transaction process:- Approve Call
approve(launcherAddress, tokenAmount)on the ERC-20 token contract, granting theTokenLauncherpermission to pull your tokens. - Sell Call
sellTokens(tokenAmount, minArcOut)on the launcher.
approve transaction first or sellTokens will revert with an ERC-20 allowance error.
You only need to approve once per sell amount. If you approved more than you sold, the remaining allowance carries over and you may not need to approve again for your next sell — depending on the amount.