Genesis命令

Launch Pool

您将执行的操作

从 CLI 运行完整的 Launch Pool 生命周期:

  • 添加带分配额和时间窗口的 Launch Pool bucket
  • 配置可选的罚金、归属和白名单
  • 存入、提取、转换和领取代币

摘要

Launch Pool 在窗口期收集存款并按比例分发代币。本页涵盖完整的 Launch Pool 生命周期——从创建 bucket 到领取代币。

  • 分发方式:按比例——您的存款份额决定您的代币份额
  • 命令bucket add-launch-pooldepositwithdrawtransitionclaim
  • 可选功能:End behavior、存款/提取罚金、奖励计划、领取归属、白名单
  • 报价代币:默认为 Wrapped SOL——存入前请先包装 SOL

超出范围

Presale bucket、unlocked bucket、Genesis 账户创建、finalize、前端集成、代币经济建模。

跳转至: 添加 Bucket · 存入 · 提取 · 转换 · 领取 · 完整生命周期 · 常见错误 · 常见问题

添加 Launch Pool Bucket

mplx genesis bucket add-launch-pool 命令向 Genesis 账户添加一个 Launch Pool bucket。

Add a launch pool bucket
mplx genesis bucket add-launch-pool <GENESIS_ADDRESS> \
--allocation 500000000000000 \
--depositStart 1704067200 \
--depositEnd 1704153600 \
--claimStart 1704153601 \
--claimEnd 1735689600

选项

标志简写描述必需
--allocation <string>-a基本单位的基础代币分配额
--depositStart <string>存款开始的 Unix 时间戳
--depositEnd <string>存款关闭的 Unix 时间戳
--claimStart <string>领取开始的 Unix 时间戳
--claimEnd <string>领取关闭的 Unix 时间戳
--bucketIndex <integer>-bBucket 索引(默认:0)
--endBehavior <string>格式:<destinationBucketAddress>:<percentageBps>,其中 10000 = 100%。可多次指定
--minimumDeposit <string>每笔交易的最低存款额(基本单位)
--depositLimit <string>每用户最大存款额(基本单位)
--minimumQuoteTokenThreshold <string>bucket 成功所需的最低报价代币总额
--depositPenalty <json>罚金计划 JSON
--withdrawPenalty <json>提取罚金计划 JSON(与 depositPenalty 格式相同)
--bonusSchedule <json>奖励计划 JSON
--claimSchedule <json>领取归属计划 JSON
--allowlist <json>白名单配置 JSON

JSON 选项格式

罚金计划(存款或提取):

Penalty schedule format
{"slopeBps":0,"interceptBps":200,"maxBps":200,"startTime":0,"endTime":0}

奖励计划

Bonus schedule format
{"slopeBps":0,"interceptBps":0,"maxBps":0,"startTime":0,"endTime":0}

领取归属计划

Claim schedule format
{"startTime":0,"endTime":0,"period":0,"cliffTime":0,"cliffAmountBps":0}

白名单

Allowlist format
{"merkleTreeHeight":10,"merkleRoot":"<hex>","endTime":0,"quoteCap":0}

示例

  1. 基本 Launch Pool:
Basic launch pool
mplx genesis bucket add-launch-pool <GENESIS_ADDRESS> \
--allocation 500000000000000 \
--depositStart 1704067200 \
--depositEnd 1704153600 \
--claimStart 1704153601 \
--claimEnd 1735689600
  1. 带 end behavior 和最低存款额:
With end behavior
mplx genesis bucket add-launch-pool <GENESIS_ADDRESS> \
--allocation 500000000000000 \
--depositStart 1704067200 \
--depositEnd 1704153600 \
--claimStart 1704153601 \
--claimEnd 1735689600 \
--endBehavior "<DESTINATION_BUCKET_ADDRESS>:10000" \
--minimumDeposit 100000000
  1. 带领取归属:
With claim vesting
mplx genesis bucket add-launch-pool <GENESIS_ADDRESS> \
--allocation 500000000000000 \
--depositStart 1704067200 \
--depositEnd 1704153600 \
--claimStart 1704153601 \
--claimEnd 1735689600 \
--claimSchedule '{"startTime":1704153601,"endTime":1735689600,"period":86400,"cliffTime":1704240000,"cliffAmountBps":1000}'

存入

mplx genesis deposit 命令在存款窗口期间将报价代币存入 Launch Pool bucket。如果使用 SOL 作为报价代币,请先包装。

Deposit into launch pool
mplx genesis deposit <GENESIS_ADDRESS> --amount 10000000000 --bucketIndex 0

选项

标志简写描述必需
--amount <string>-a基本单位的报价代币金额(例如 lamports)
--bucketIndex <integer>-bLaunch Pool bucket 的索引(默认:0)

示例

  1. 包装 SOL 并存入 10 SOL:
Wrap and deposit
mplx toolbox sol wrap 10
mplx genesis deposit <GENESIS_ADDRESS> --amount 10000000000 --bucketIndex 0

提取

mplx genesis withdraw 命令从 Launch Pool bucket 提取报价代币。仅在存款期间可用。

Withdraw from launch pool
mplx genesis withdraw <GENESIS_ADDRESS> --amount 5000000000 --bucketIndex 0

选项

标志简写描述必需
--amount <string>-a要提取的报价代币金额(基本单位)
--bucketIndex <integer>-bLaunch Pool bucket 的索引(默认:0)

转换

mplx genesis transition 命令在存款期结束后执行 end behavior,将收集的报价代币转移到目标 bucket。

Transition end behaviors
mplx genesis transition <GENESIS_ADDRESS> --bucketIndex 0

选项

标志简写描述必需
--bucketIndex <integer>-bLaunch Pool bucket 的索引

注意事项

  • 必须在存款期结束后调用
  • 仅在 bucket 配置了 end behavior 时才需要

领取

mplx genesis claim 命令从 Launch Pool bucket 领取基础代币。用户按其存款比例获得代币。

Claim from launch pool
mplx genesis claim <GENESIS_ADDRESS> --bucketIndex 0

选项

标志简写描述必需
--bucketIndex <integer>-bLaunch Pool bucket 的索引(默认:0)
--recipient <string>领取代币的接收地址(默认:签名者)

示例

  1. 领取到自己的钱包:
Claim to self
mplx genesis claim <GENESIS_ADDRESS> --bucketIndex 0
  1. 领取到其他钱包:
Claim to another wallet
mplx genesis claim <GENESIS_ADDRESS> --bucketIndex 0 --recipient <WALLET_ADDRESS>

完整生命周期示例

Complete launch pool lifecycle
# 1. Create the Genesis account
mplx genesis create \
--name "My Token" \
--symbol "MTK" \
--totalSupply 1000000000000000 \
--decimals 9
# (copy GENESIS_ADDRESS from output)
GENESIS=<GENESIS_ADDRESS>
# 2. Timestamps
NOW=$(date +%s)
DEPOSIT_END=$((NOW + 86400))
CLAIM_START=$((DEPOSIT_END + 1))
CLAIM_END=$((NOW + 31536000))
# 3. Add a launch pool bucket with end behavior
mplx genesis bucket add-launch-pool $GENESIS \
--allocation 500000000000000 \
--depositStart $NOW \
--depositEnd $DEPOSIT_END \
--claimStart $CLAIM_START \
--claimEnd $CLAIM_END \
--endBehavior "<UNLOCKED_BUCKET_ADDRESS>:10000"
# 4. Add an unlocked bucket to receive SOL
mplx genesis bucket add-unlocked $GENESIS \
--recipient $(solana address) \
--claimStart $CLAIM_START \
--allocation 0
# 5. Finalize
mplx genesis finalize $GENESIS
# 6. Wrap SOL and deposit
mplx toolbox sol wrap 10
mplx genesis deposit $GENESIS --amount 10000000000 --bucketIndex 0
# 7. After deposit period, transition
mplx genesis transition $GENESIS --bucketIndex 0
# 8. Claim tokens
mplx genesis claim $GENESIS --bucketIndex 0
# 9. Revoke mint authority
mplx genesis revoke $GENESIS --revokeMint

常见错误

错误原因修复方法
Deposit period not active当前时间在 depositStartdepositEnd 之外使用 genesis bucket fetch 检查时间戳
Claim period not activeclaimStart 之前领取等待领取开始时间戳之后
Withdrawal period ended存款窗口关闭后尝试提取提取仅在存款期间可用
No wrapped SOL存入原生 SOL 而不是 Wrapped SOL先运行 mplx toolbox sol wrap <amount>
Below minimum deposit存款金额低于 minimumDeposit增加存款金额以满足最低要求
Exceeds deposit limit用户总存款超过 depositLimit减少存款金额——您已达到每用户上限
End behavior not configured在未配置 end behavior 的 bucket 上运行 transitionTransition 仅在配置了 --endBehavior 的 bucket 上需要
Deposit period not ended在存款关闭前运行 transition等待 depositEnd 时间戳之后

常见问题

Launch Pool 中的代币如何分发? 代币按比例分发。如果您存入了池中总报价代币的 10%,您将获得该 bucket 基础代币分配的 10%。

存入后可以提取吗? 可以,但仅在存款期间有效。存款窗口关闭后,将无法再提取。

什么是 end behavior? End behavior 在存款期结束后将收集的报价代币从 Launch Pool 转发到目标 bucket(通常是 unlocked bucket)。您必须调用 genesis transition 来执行它们。

什么是 claim schedule? Claim schedule 为代币领取添加归属机制。代币不是一次性全部发放,而是根据配置的 periodcliffTimecliffAmountBps 逐步释放。

如果 minimumQuoteTokenThreshold 未达到会怎样? 如果总存款未达到阈值,该 bucket 不会成功,存款人可以收回其资金。

可以将 end behavior 拆分到多个目标吗? 可以。多次指定 --endBehavior,使用不同的目标地址和百分比(以基点为单位,总计 10000)。

术语表

术语定义
Launch Pool根据存款份额按比例分发代币的 bucket 类型
End Behavior在存款关闭后将收集的报价代币转发到目标 bucket 的规则
Transition执行 end behavior 的命令——必须在存款期后显式调用
Claim Schedule控制代币随时间逐步释放的归属配置
Deposit Penalty对存款收取的费用,以基点配置,可选基于时间的斜率
Withdraw Penalty在存款期间对提取收取的费用
Bonus Schedule对早期或特定时间存款的额外代币分配
Allowlist基于 Merkle 树的访问控制,限制谁可以存入
Basis Points (bps)百分之一的百分比——10000 bps = 100%,100 bps = 1%