Create → Bond → Migrate: the end‑to‑end flow for launching ERC20 bond tokens on Base.
Phase 1: Token Creation
deployBondkitToken()
on the Factory contractPhase 2: Bonding Curve Trading
S = S_final × (R/R_target)^exponent
Phase 3: DEX Migration
migrateToDex()
when target is reachedsqrtPriceX96
🏭 Factory Contract
deployBondkitToken()
- Creates new token clonegetImplementationAddress()
- Returns template addresssetAllowedQuoteAsset()
- Admin function to whitelist assets📜 Implementation Contract
🪙 Token Clones
🔍 Event Indexer
📊 Analytics Engine
🌐 REST API
/tokens
- List all tokens/tokens/{address}
- Token details/tokens/{address}/transactions
- Trade history/tokens/{address}/ohlcv
- Chart data/users/{address}/portfolio
- User holdingsRole | Responsibilities | Permissions |
---|---|---|
Creator | Deploy token, set parameters, initiate migration | Full control until migration |
Traders | Buy/sell during bonding, trade on DEX | Standard trading rights |
Fee Recipient | Receive trading fees | Passive income only |
Migration Admin | Execute migration when ready | One-time migration right |
LP Providers | (Post-migration) Add liquidity to Uniswap | Standard LP rights |
Aggressiveness | Exponent | Price Behavior |
---|---|---|
0 | 1.00 | Linear (constant price) |
25 | 0.80 | Gentle curve |
50 | 0.67 | Moderate curve |
75 | 0.57 | Steep curve |
100 | 0.50 | Very steep (square root) |
Parameter | Type | Range/Format | Impact |
---|---|---|---|
name | string | 1-50 chars | Token display name |
symbol | string | 2-10 chars | Trading symbol |
finalTokenSupply | uint256 | > 0 | Total mintable tokens |
aggressivenessFactor | uint8 | 0-100 | Curve steepness |
targetEth | uint256 | > 0 | Migration threshold |
feeRecipient | address | Valid address | Receives fees |
lpSplitRatioFeeRecipientBps | uint256 | 0-10000 | LP fee share (basis points) |
migrationAdminAddress | address | Valid address | Can trigger migration |
Action | Parameters | Validation |
---|---|---|
Buy | minTokensOut , ethAmount | Slippage protection |
Sell | tokenAmount , minEthOut | Balance check, slippage |
Migrate | None | Target reached, admin only |
Constant | Value | Description |
---|---|---|
Trading Fee | 5% | Applied to all trades |
Decimals | 18 | Standard ERC20 decimals |
Min Target | 0.1 ETH | Minimum viable target |
Max Aggressiveness | 100 | Maximum curve factor |
Scenario | System Response |
---|---|
Buy exceeds target | Partial fill, refund excess |
Insufficient liquidity for sell | Transaction reverts |
Migration before target | Transaction reverts |
Non-admin attempts migration | Transaction reverts |
Double migration attempt | Transaction reverts |
Zero address operations | Transaction reverts |