Module 07 — Token Creation
Create and manage tokens on the BASIS factory. Earn permanent 20% of net trading fees on every token you deploy.
Prerequisites
- Wallet funded with USDB (→01), client initialized (→02)
- Understand hybrid multiplier and floor mechanics — this is your most important creation choice
- Optional: register an agent identity so your token attribution is on-chain
Next steps after creation
- Run a launch event? Activate surge tax (creator-only, time-decaying)
- Locking team allocations? Use vesting schedules to signal long-term commitment
- Building a prediction market? Use the prediction market flow instead — Predict+ tokens are created differently
- Want to compound your creator advantage? Read Module 12 Strategy 4: Creator's Edge
- Find your token in your portfolio:
getTokensByCreator()
Why Create a Token
Creating a token makes you a revenue-generating business on the platform, not just a trader.
What you get as creator:
- Permanent 20% of net trading fees — on every buy and sell, by any user, forever. No action required after creation. (= 0.1% of Stable+ trade volume, 0.3% of Floor+ trade volume)
- Reward phase control — set a volume threshold where early buyers earn reward shares. Buy it up yourself to capture them, or share it with your community.
- Surge tax authority — activate time-decaying extra fees during launch events. All surge basis points go to your dev portion.
- Stacking foundation — your token is collateral-eligible. Buy your own token → borrow USDB → deploy elsewhere (see Strategy 4: Creator's Edge).
- Earns airdrop points — one-time at creation, ongoing from your token's volume.
If your token does $10,000 in daily volume, you earn a cut of that every day without further action. Volume compounds. Fees compound. The creator role is structural.
How It Works
Factory contract → creates the token → sets you as permanent dev → token trades on the DEX immediately.
Two-phase lifecycle:
-
Reward phase (optional) — set by
usdbForBonding. Lasts until cumulative trading volume hits your threshold. Early buyers earn reward shares claimable viaclaimRewards(). Once the volume threshold is hit,hasBondedflips totrueand the reward phase ends permanently. Max threshold: 150,000 USDB. -
Standard AMM — all trading continues on the AMM. Creator fees (20%) keep flowing forever.
Pitfall: Do not ignore the reward phase on newly launched tokens you want to buy. Reward phase buys earn bonus airdrop points and better pricing. Once the threshold is hit, that window closes permanently — it never reopens.
Frozen launch — optionally start trading locked. Only whitelisted wallets can buy until you call disableFreeze(). Useful for presales, controlled early access, or OTC allocation before public launch.
Actions
Create Token
Method: client.factory.createTokenWithMetadata(options)
Recommended over bare createToken. Handles image upload to IPFS via Pinata and metadata registration in one call. Token symbols must be CAPITALISED.
JavaScript:
const { BasisClient } = require("basis-sdk-js");
const client = await BasisClient.create({ privateKey: "0xYourPrivateKey..." });
const result = await client.factory.createTokenWithMetadata({
symbol: "MYTKN",
name: "My Awesome Token",
hybridMultiplier: 50n,
startLP: 1000n,
description: "My awesome DeFi token on Basis",
imageUrl: "https://example.com/my-logo.png",
website: "https://myproject.com",
});
console.log("Token:", result.tokenAddress);
console.log("Image:", result.imageUrl);
console.log("Metadata:", result.metadata.url);
Python:
from basis_sdk import BasisClient
client = BasisClient.create(private_key="0xYourPrivateKey...")
result = client.factory.create_token_with_metadata(
symbol="MYTKN", name="My Awesome Token",
hybrid_multiplier=50, start_lp=1000,
description="My awesome DeFi token on Basis",
image_url="https://example.com/my-logo.png",
website="https://myproject.com",
)
print("Token:", result["token_address"])
Returns: { hash, receipt, tokenAddress, imageUrl, metadata }
Parameter Reference
| Parameter | Required | Limits | Description |
|---|---|---|---|
symbol | yes | CAPITALISED only | Token ticker. "MYTKN" not "mytkn". |
name | yes | — | Token full name |
hybridMultiplier | yes | 1–90 or exactly 100 | Token type and stability. See decision table below. Do not use 91–99. |
startLP | yes | 100–10,000 | Virtual liquidity depth. NOT deposit capital — creator pays nothing for it. Sets price sensitivity per dollar only, not token type. Higher value = deeper pool = less price movement per trade. |
description | no | — | Platform description text |
imageUrl | no | — | Auto-resized to 512×512 WebP |
website / telegram / twitterx | no | — | Social links — see Module 03 for X/Twitter linking |
frozen | no | default: false | If true, only whitelisted wallets can trade until disableFreeze() is called |
usdbForBonding | no | 0–150,000 USDB | Volume threshold for reward phase. 0 = skip reward phase entirely. |
autoVest | no | default: false | Creator's own token purchases vest on a schedule instead of unlocking immediately |
autoVestDuration | no | required if autoVest=true | Vesting period in days |
gradualAutovest | no | — | true = linear unlock over duration. false = cliff unlock at end. |
Fee: Check getFeeAmount() before creating — currently 0 in Phase 1 but may change.
Earns: One-time airdrop points.
Requires: SIWE authentication (auto-handled by BasisClient.create — see Module 16).
Understanding startLP
startLP sets the price depth — how much capital is needed to move the price. It does not affect token type or the floor mechanism. Think of it as the zoom level on the price chart.
| startLP | $100 buy moves price | $1,000 buy moves price | Best for |
|---|---|---|---|
| 100 | Very large move | Extreme move | Micro-cap, small wallets |
| 1,000 | ~$0.10 | ~$1.00 | Most tokens (default) |
| 5,000 | ~$0.02 | ~$0.20 | Larger expected volume |
| 10,000 | ~$0.01 | ~$0.10 | High-volume, smooth price |
A $100 buy into a 1,000 LP token has the same percentage price impact as a $1,000 buy into a 10,000 LP token. Scaling LP up means more capital is required to create visible movement — which can signal credibility and attract larger trades at launch.
Manage Token (Post-Creation)
Disable Freeze
Opens a frozen token to public trading. Irreversible — once called, freeze cannot be re-enabled.
await client.factory.disableFreeze(tokenAddress);
Whitelist Wallets (frozen tokens)
Add wallets that can trade while the token is frozen. Each wallet gets a max buy cap.
await client.factory.setWhitelistedWallet(
tokenAddress,
["0xWallet1...", "0xWallet2..."],
maxUsdbPerWallet, // bigint, 18 decimals
"presale round 1" // label/tag
);
Remove from Whitelist
await client.factory.removeWhitelist(tokenAddress, "0xWallet...");
Claim Creator Rewards
Claim your accumulated 20% dev fee share in USDB. Can be called at any time.
const { hash, receipt } = await client.factory.claimRewards(tokenAddress);
Note:
claimRewards()also claims reward-phase buyer rewards for addresses that participated in the reward phase. The creator's 20% dev fee and early-buyer reward shares are both claimable through this method.
Configure Taxes
Tax rates are set on creation and adjustable after. The dev rate and buyback rate operate on the tax portion of the trade, not the total trade value.
Limits:
- Dev tax rate: 15–40% (of the tax portion)
- Buyback rate: 0–20% (of the tax portion)
Read methods:
// Effective tax rate for a specific user on a specific token (basis points)
const rate = await client.taxes.getTaxRate(tokenAddress, userAddress);
// Base rates for all token categories
const bases = await client.taxes.getBaseTaxRates();
// Returns: { stasis, stable, default, prediction } — each in basis points
// Current active surge tax rate (0 if none active)
const surge = await client.taxes.getCurrentSurgeTax(tokenAddress);
Surge Tax
A time-decaying extra fee that creators activate manually. Used for launch day events and managing early sell pressure. All surge basis points go to the creator's dev portion.
Activate:
await client.taxes.startSurgeTax(
startRate, // bigint, basis points (e.g., 500n = 5%)
endRate, // bigint, basis points (can be 0)
duration, // bigint, seconds (minimum 3600)
tokenAddress
);
The tax decays linearly from startRate to endRate over duration seconds.
Check remaining quota first:
const remainingSeconds = await client.taxes.getAvailableSurgeQuota(tokenAddress);
// 0 means quota exhausted — wait for older windows to roll off
Surge tax limits by token type:
| hybridMultiplier | Max Surge Tax | Max Total Fee (base + surge) |
|---|---|---|
| 1 (most volatile Floor+) | 15% (1500 BP) | 16.5% |
| 45 (mid Floor+) | 8% (800 BP) | 9.5% |
| 90 (stable Floor+) | 1% (100 BP) | 2.5% |
| 100 (Stable+) | 0.5% (50 BP) | 1.0% |
| Predict+ | Surge disabled | 1.5% (base only) |
Surge rules:
startRate≥endRate- Minimum duration: 3,600 seconds (1 hour)
- Quota: maximum 7 days of active surge per rolling 30-day window
- Only the token creator can start or end a surge
- Predict+ tokens cannot use surge tax
Tip: Surge tax is automatically reflected in
getAmountsOut()trade previews. Always preview before executing — the preview includes active surge in the effective price calculation.
Read Methods
| Method | Returns | Description |
|---|---|---|
client.factory.getTokenState(addr) | { frozen, hasBonded, totalSupply, usdPrice } | Current token state |
client.factory.getTokensByCreator(creator) | string[] | All tokens created by wallet (includes Predict+ tokens). See Module 10 for portfolio-wide queries. |
client.factory.isEcosystemToken(addr) | boolean | Is this a valid BASIS token? |
client.factory.getFloorPrice(addr) | string | Current USDB floor price |
client.factory.getClaimableRewards(addr, investor) | bigint | Claimable USDB rewards for an address |
client.factory.getFeeAmount() | bigint | Current creation fee in BNB wei |
client.taxes.getCurrentSurgeTax(addr) | bigint | Current surge rate in basis points (0 if none) |
client.taxes.getAvailableSurgeQuota(addr) | bigint | Remaining surge-eligible seconds this window |
client.taxes.getTaxRate(addr, user) | number | Effective tax rate for a user in basis points |
Reading hybridMultiplier on-chain:
const multiplier = await client.publicClient.readContract({
address: tokenAddress,
abi: [{"inputs":[],"name":"hybridMultiplier","outputs":[{"name":"","type":"uint256"}],"stateMutability":"view","type":"function"}],
functionName: 'hybridMultiplier',
});
// 100n = Stable+ or Predict+, 1-90 = Floor+
Choosing Your Token Type
The most important decision at creation. Pick the wrong type and your mechanics work against your goals.
| Goal | Token Type | hybridMultiplier | Notes |
|---|---|---|---|
| Maximum value accrual, price only rises | Stable+ | 100 | Up-only mechanics. 0.5% base fee. Best for utility/service tokens with high transaction frequency. |
| Price discovery + downside protection | Floor+ (stable) | 70–99 | Real price movement but floor rises fast. Best for community/brand tokens. |
| Balanced floor + trading appeal | Floor+ (balanced) | 30–69 | Moderate floor growth, noticeable price action. Good for general trading tokens. |
| Maximum price action, minimal floor | Floor+ (volatile) | 1–29 | Most volatile Floor+. Floor still rises but slowly. Appeals to speculators. |
| Prediction market token | Predict+ | 100 (Stable+ subtype) | Created via prediction market flow, not standalone factory. Earns from market volume. |
Do not use values 91–99. They are technically valid but disallowed by convention — there is no meaningful difference between a 91 Floor+ and a Stable+. Use 1–90 for Floor+ or exactly 100 for Stable+.
Stable+ — The Utility Token
Best when users repeatedly buy to use something, then the agent/service sells back to USDB. The ratchet mechanic (all slippage retained, price never drops) rewards high transaction frequency.
Use when: Services, subscriptions, API access, pay-per-use tools.
Avoid when: Speculative tokens — there's no exciting price discovery to attract traders.
Floor+ — The Community Token
Best for projects where holders need confidence against dumps. The floor rises on every buy-sell cycle. Whale dumps create dips that look like buying opportunities rather than death spirals.
Use when: Communities, brand tokens, fan tokens, loyalty programs.
Key window: Near launch, the gap between spot and floor is smallest — highest leverage ratio, lowest buyer risk, strongest structural buy signal. Market your launch to coincide with this window.
Predict+ — The Engagement Token
Created as part of a prediction market. The token earns from all market trading volume. Surge tax is disabled for Predict+ tokens.
Use when: Monetising domain expertise, running information markets, driving engagement around predictions. See Module 13 for full creator strategy.
Fees
| Action | Fee |
|---|---|
| Token creation | getFeeAmount() — currently 0 in Phase 1 |
| Trading (ongoing) | ~0.5% (Stable+) or ~1.5% (Floor+) of trade value; creator earns 20% of net trading fees (= 0.1% of Stable+ volume, 0.3% of Floor+ volume) |
| Surge tax | Additional time-decaying % added to creator's portion |
The 20% creator fee is calculated on the net fee portion of every trade. It accrues automatically and is claimed via claimRewards().
Errors
| Error | When | Fix |
|---|---|---|
"invalid multiplier" | createTokenWithMetadata() | Must be 1–90 or exactly 100. Do not use 91–99. |
"cannot be above 150k" | usdbForBonding exceeds maximum | Set between 0 and 150,000 USDB. Triggers when the value is above the cap. |
"invalid starting LP" | startLP out of range | Must be 100–10,000 |
"No WL for freeze" | Buying a frozen token without whitelist | Creator must call setWhitelistedWallet() first |
"Overcapped on WL buying" | Whitelisted wallet hit its cap | Creator must raise the wallet's cap |
"surge already active" | startSurgeTax() called while surge running | Wait for current surge to expire |
"quota exceeded" | startSurgeTax() with no quota remaining | Wait for older surge windows to roll out of the 30-day window |
"duration too short" | startSurgeTax() duration < 3600 | Minimum 3,600 seconds (1 hour) |
"Dev rate out of range [15-40]" | Tax configuration | Dev rate must be 15–40% |
"Buyback rate out of range [0-20]" | Tax configuration | Buyback rate must be 0–20% |
For the full alphabetical error index across all modules, see Module 18 — SDK Reference.
What Next
After creating a token, the typical creator flow:
- If frozen: Call
setWhitelistedWallet()for presale participants, thendisableFreeze()when ready for public trading. - Activate surge tax for launch day to manage early sell pressure and boost creator fees. Check
getAvailableSurgeQuota()first. - Buy your own token during the reward phase to earn reward shares — or configure
usdbForBondinglow enough that you capture most of it yourself. - Monitor state with
getTokenState()— watchhasBondedto know when the reward phase has ended. - Claim accumulated fees regularly with
claimRewards(). - Stack on top — Creator's Edge strategy: buy your own Floor+/Predict+ token → borrow USDB → deploy across Stable+, lending, and predictions. You earn 20% creator fees from other users' volume on top of your stacked positions. See Module 12 for the full stacking strategies module.
See Also
- Module 04 — Trading: Understand how your token will trade and how creator fees route
- Module 05 — Lending: Borrow against your own token (Creator's Edge stack)
- Module 08 — Predictions: Create a Predict+ market token instead — different flow, similar economics
- Module 09 — Vesting: Lock team/investor allocations on a schedule
- Module 11 — Token Mechanics: Hybrid multiplier formula, floor math, surge tax, reward phase internals
- Module 12 — Strategy & Stacking: Creator's Edge — stack creator fees on top of borrow/lend/leverage paths
- Module 18 — SDK Reference: Full
client.factoryandclient.taxesmethod signatures