Launch
Launch or migrate to give your token better quotes, liquidity rewards, and DeFi superpowers.
Baseline supports two launch paths:
- Create: deploy a new token with its own Baseline liquidity pool.
- Migrate: keep the existing token, and migrate liquidity into a Baseline liquidity pool.
Need help or want to brainstorm what's possible with Baseline? Reach out to us in Discord or fill out this form and we'll get back to you.
Create a token
If you're a developer, deploying a token can be done in three easy steps. If you're not a developer, a frontend to launch bTokens will be available in the near future.
- Call
createBTokenon the BFactory contract to deploy the token. The total supply is minted to the caller, and only that caller will be able to create the pool in step 3.
BFactory relay = BFactory(0xc81Fd894C0acE037d133aF4886550aC8133568E8);
// Deploys "Test Token" with ticker "TT" and a total supply of 1M.
// The full supply is minted to msg.sender, and only msg.sender can create its pool.
BToken bToken = relay.createBToken(
"Test Token",
"TT",
1_000_000 ether,
bytes32(0)
);- Approve the Relay contract to transfer the quote asset and bToken. When
createPoolis called, this allows the contract to transfer liquidity from the caller into the Baseline pool.
BFactory relay = BFactory(0xc81Fd894C0acE037d133aF4886550aC8133568E8);
// Assumes the caller wants to seed the pool with their available balances.
uint256 initialPoolBTokens = bToken.balanceOf(msg.sender);
uint256 initialPoolReserves = reserve.balanceOf(msg.sender);
bToken.approve(address(relay), initialPoolBTokens);
reserve.approve(address(relay), initialPoolReserves);- Call
createPoolon the BFactory contract to initialize the Baseline pool and launch the token live.
BFactory relay = BFactory(0xc81Fd894C0acE037d133aF4886550aC8133568E8);
address creator = msg.sender;
// 0.5e18 = 50% of post-protocol fees go to the creator, the rest goes to stakers.
uint256 constant STANDARD_CREATOR_FEE = 0.5e18;
// Total swap fee charged by the pool. 0.01 ether = 1%.
uint256 constant STANDARD_SWAP_FEE = 0.01 ether;
// Assumes the caller wants to seed the pool with their available balances.
uint256 initialPoolBTokens = bToken.balanceOf(msg.sender);
uint256 initialPoolReserves = reserve.balanceOf(msg.sender);
// Set non-zero if you want to have Baseline Options. These options start with
// collateralized supply that can be unlocked by repayment, or through
// increases in floor value.
uint256 initialCollateral = 0;
uint256 initialDebt = 0;
// The market price can be any number above BLV, but we recommend setting it
// relative to a premium of net asset value. Here, we set it to a 5% premium
// to backed circulating supply.
uint256 reserves = initialPoolReserves + initialDebt;
uint256 circ = bToken.totalSupply() - initialPoolBTokens;
uint256 bookPrice = reserves * 1e18 / circ; // WAD
uint256 initialActivePrice = bookPrice * 105 / 100;
// Pass initialBLV as 0 so the protocol auto-calculates the starting floor.
BFactory.CreateParams memory poolParams = BFactory.CreateParams({
bToken: bToken,
initialPoolBTokens: initialPoolBTokens,
reserve: address(reserve),
initialPoolReserves: initialPoolReserves,
initialActivePrice: initialActivePrice,
initialBLV: 0, // use zero to autocalculate BLV
creator: creator,
feeRecipient: creator,
creatorFeePct: STANDARD_CREATOR_FEE,
swapFeePct: STANDARD_SWAP_FEE,
createHook: false,
claimMerkleRoot: bytes32(0),
initialCollateral: initialCollateral,
initialDebt: initialDebt
});
relay.createPool(poolParams);Congratulations! Your bToken is live. You can now:
- Trade the token: https://terminal.baseline.markets
- View token analytics: https://terminal.baseline.markets
- Claim creator fees and edit metadata: https://terminal.baseline.markets/dashboard
Routers (e.g. KyberSwap) and indexers (e.g. CoinGecko and Defined) automatically route and index trades within seconds. The token will also appear under Baseline DEX on CoinGecko and GeckoTerminal.
Migrate a token
Existing tokens can migrate their liquidity to a Baseline pool to unlock better quoting, a guaranteed floor value, and DeFi features such as staking, borrowing and leveraging native to the token itself. Backtested simulations show that tokens on Baseline DEX have better price performance, liquidity growth, supply control and fee accrual than traditional DEX pools.
Migration is possible from any liquidity pool, including Uniswap (V2, V3 and V4), Aerodrome, and other pool designs. At a high level, the project withdraws or migrates liquidity from the existing pool and initializes the Baseline pool with the chosen quote asset and launch parameters. The process takes less than an hour.
Interested in migrating a token? Reach out to us in Discord or fill out this form and we'll get back to you.