Architecture
KasFun consists of three core contracts:MemeFactory
The central contract. All token creation and bonding curve trading goes through MemeFactory.| Function | Description |
|---|---|
createToken(params) | Create a new token (payable, requires platform signature) |
buy(token, minTokensOut) | Buy tokens with KAS (payable) |
sell(token, tokenAmount, minKasOut) | Sell tokens for KAS (requires ERC-20 approval) |
getTokenInfo(token) | Get token state (reserves, graduated, etc.) |
getCurrentPrice(token) | Get current price in KAS |
getBondingCurveProgress(token) | Get fundraising progress (0–10000 = 0–100%) |
getTokenParamVersion(token) | Get bonding curve parameters (virtualToken, virtualKas, etc.) |
bondingCurve() | Get the BondingCurve contract address |
BondingCurve
A stateless math contract. All functions arepure or view — they don’t modify state. Used by MemeFactory internally and available for external price calculations.
The BondingCurve contract address is not fixed — read it from
MemeFactory.bondingCurve().| Function | Description |
|---|---|
calculateBuyReturnWithParams(...) | KAS in → tokens out |
calculateSellReturnWithParams(...) | Tokens in → KAS out |
calculateBuyCostWithParams(...) | Desired tokens out → required KAS in |
Council V1
Per-token governance contract, activated after a token graduates. Each graduated token can have its own Council with elected members, proposals, and voting.| Feature | Description |
|---|---|
| Elections | Token holders vote to elect Council members |
| Proposals | Council members create proposals for the community |
| Voting | Token holders vote on proposals by locking tokens |
| Tax Config | Community can set token tax through proposals |
Council addresses are per-token. You can find a token’s Council address on its community page at kas.fun.
Token Standards
- All tokens are ERC-20 compatible (transfer, approve, balanceOf, etc.)
- Total supply: 1,000,000,000 (1 billion) tokens per token, all 18 decimals
- Tokens are minted entirely at creation. 80% goes into the bonding curve pool, 20% is reserved.