Bonding Markets
Sell an ERC-20 token allocation for native HYPE on Elysium, with optional automatic fees.
Use mlab curve to open a two-way linear bonding market on Elysium. Commit tokens you already hold; buyers pay native HYPE, and holders can sell tokens back to the contract.
Unlike a pool, you do not supply a second token or seed HYPE liquidity. Purchases build the HYPE reserve that backs sell-backs. Tokens are transferred, not minted or burned.
Create a Market
You need a standard ERC-20 token on Elysium testnet, enough tokens for the allocation, and native HYPE for gas. Tokens with transfer taxes or rebasing are not supported. Need a token to try it? See Create a test token.
This example allocates 500,000 GURT, an 18-decimal token, starting at 0.0001 HYPE per token and ending at 0.0003 HYPE when sold out. Replace the example token and wallet addresses with yours.
mlab curve create \
--factory 0x43bD454E79f7fD63101377817CbD34111fE4A66A \
--token 0x1171daed16376968bdd3d865318a9a4f3687f328 \
--account 0x0361c685F6bA3Cd66e9e8fE6095C91Ab0b4e5b8E \
--allocation 500000000000000000000000 \
--start-price 100000000000000 --end-price 300000000000000 \
--fee-bps 30 --min-fee-bps 5 --max-fee-bps 100 \
--output json--allocationuses token base units. Check your token's decimals; supported tokens have at most 18.- Prices use HYPE wei per whole token. The price rises linearly as tokens are bought and falls as they are sold back. The end price must be at least the starting price.
- The starting fee is 0.30%, bounded between 0.05% and 1%. Allocation, price endpoints and fee bounds are fixed at creation.
Creation prepares unsigned transactions. Sign and submit each returned transactions[].transaction in order: token approval, then creation. Wait for successful receipts. Your allocation moves into the new contract, and your wallet becomes its manager.
Find the new market address in the receipt's MarketCreated event, or list markets and match your token and manager:
mlab curve list --factory 0x43bD454E79f7fD63101377817CbD34111fE4A66A --output jsonThe factory above is Market Lab's deployed testnet factory. Supply --factory for every on-chain command; only markets registered with that factory are supported. --rpc-url selects another Elysium endpoint.
Inspect, Buy or Sell
The commands below use an existing GURT market. Replace its address with your own market when testing your deployment, and use your own wallet for --account.
mlab curve inspect 0x59675174f1700677e608f86016f1cea764e1abfa \
--factory 0x43bD454E79f7fD63101377817CbD34111fE4A66A --output json
mlab curve quote 0x59675174f1700677e608f86016f1cea764e1abfa \
--factory 0x43bD454E79f7fD63101377817CbD34111fE4A66A \
--side buy --amount 1000000000000000 --output jsonInspection shows the price, allocation, net tokens sold, sell-back reserve, accrued fees and manager. The quote above budgets 0.001 HYPE. Quotes show the trading fee in HYPE: included in the buy payment, deducted from sell proceeds. Gas is separate.
Prepare a 0.001 HYPE buy, or sell 10 tokens with 18 decimals:
mlab curve buy 0x59675174f1700677e608f86016f1cea764e1abfa \
--factory 0x43bD454E79f7fD63101377817CbD34111fE4A66A \
--account 0x0361c685F6bA3Cd66e9e8fE6095C91Ab0b4e5b8E \
--amount 1000000000000000 --output json
mlab curve sell 0x59675174f1700677e608f86016f1cea764e1abfa \
--factory 0x43bD454E79f7fD63101377817CbD34111fE4A66A \
--account 0x0361c685F6bA3Cd66e9e8fE6095C91Ab0b4e5b8E \
--amount 10000000000000000000 --output jsonBuy amounts are maximum HYPE spend in wei; unused HYPE is refunded. Sell amounts are token base units. To quote a sale, use quote --side sell with the same token amount.
Both commands prepare unsigned transactions; sign them with your wallet. Sells include token approval when needed. Default slippage is 0.50% (--slippage-bps 50), and plans expire after 20 minutes. No WHYPE is needed.
You cannot sell more than the market's net tokens sold, even if your wallet holds more. Retained or externally minted tokens do not add HYPE backing. There is no automatic pool migration or withdrawal of unsold allocation in this version.
Automatic Fees
Creation starts trading at the initial fee; it does not start automatic fee updates.
Use mlab curve operator create and mlab curve operator address to create or inspect the dedicated fee operator. It is shared with pool fee jobs. Replace OPERATOR_ADDRESS below with the printed address:
mlab curve authorize 0x59675174f1700677e608f86016f1cea764e1abfa \
--factory 0x43bD454E79f7fD63101377817CbD34111fE4A66A \
--account 0x0361c685F6bA3Cd66e9e8fE6095C91Ab0b4e5b8E \
--operator OPERATOR_ADDRESS --output jsonUse your market and its manager wallet. Sign the authorization, then fund the operator with native HYPE for fee-update gas. The operator can adjust fees, not claim creator fees or withdraw seller backing.
Preview the policy, then remove --dry-run to start the job after confirmation:
mlab curve run 0x59675174f1700677e608f86016f1cea764e1abfa \
--factory 0x43bD454E79f7fD63101377817CbD34111fE4A66A \
--base-fee-bps 30 --dry-run
mlab curve jobs
mlab curve logs JOB_ID --limit 20
mlab curve stop JOB_IDThe daemon measures movement in the curve's on-chain price and adjusts fees within the fixed bounds. It uses the same fee policy and defaults as pools. Keep mlabd running. Stopping the job leaves trading active at the last applied fee; an already-signed update may still settle.
Claim Creator Fees
Fees accrue on both buys and sells. The manager can prepare a withdrawal of accrued fees in native HYPE:
mlab curve claim-fees 0x59675174f1700677e608f86016f1cea764e1abfa \
--factory 0x43bD454E79f7fD63101377817CbD34111fE4A66A \
--account 0x0361c685F6bA3Cd66e9e8fE6095C91Ab0b4e5b8E --output jsonUse your market and manager wallet, then sign the returned transaction. Claiming fees does not withdraw the HYPE reserved for sell-backs.