跳至主要內容
進階

Lightning Pool 流動性市場

了解 Lightning Pool 流動性拍賣市場,如何買賣閃電網路通道租賃和入站容量。

12 分鐘

什麼是 Lightning Pool?

Lightning Pool 是 Lightning Labs 開發的非託管流動性市場, 允許節點運營者買賣通道租賃。需要入站容量的節點可以購買, 有閒置資金的節點可以出租獲取收益。通過拍賣機制實現價格發現。

非託管設計: Pool 使用鏈上多簽交易和時間鎖確保安全, 資金始終在用戶控制之下。

市場參與者

Pool Market Roles

Buyers (Need Inbound Capacity):

Types:
• Merchants: need to receive customer payments
• Exchanges: need to process user withdrawals
• New nodes: need to build routing capability
• LSP: need to provide channels for users

Goals:
• Get stable inbound capacity
• Ensure channel peer is reliable node
• Purchase liquidity at reasonable price

Sellers (Provide Liquidity):

Types:
• Routing nodes: have idle funds
• Liquidity providers: professional operators
• HODLers: want to earn yield

Revenue Sources:
• Channel lease fees (primary income)
• Routing fees (additional income)
• Time value of funds

拍賣機制

Batch Auction Mechanism

Auction Cycle:
Every ~10 minutes a batch clearing occurs

Timeline:
• Submit phase: participants submit orders
• Clearing phase: match buy/sell orders
• Execution phase: open matched channels
• Settlement phase: on-chain tx confirmation

Price Discovery (Uniform Clearing Price):

Buyer bid: max rate willing to pay
Seller ask: min rate willing to accept

Clearing Rules:
1. Sort buy/sell orders by price
2. Find supply/demand equilibrium
3. All matched orders use uniform price
4. Buyer never pays more than bid
5. Seller never receives less than ask

Example:
Buyer A bid: 500 ppm (matched, pays 400)
Buyer B bid: 450 ppm (matched, pays 400)
Buyer C bid: 350 ppm (not matched)
------- Clearing Price 400 ppm -------
Seller X ask: 300 ppm (matched, gets 400)
Seller Y ask: 380 ppm (matched, gets 400)
Seller Z ask: 450 ppm (not matched)

通道租賃

Lease Duration and Rates

Lease Duration Options:
┌───────────────┬────────────┬──────────────┐
│ Duration      │ Blocks     │ Approx       │
├───────────────┼────────────┼──────────────┤
│ 2016 blocks   │ 2016       │ ~2 weeks     │
│ 4032 blocks   │ 4032       │ ~4 weeks     │
│ 8064 blocks   │ 8064       │ ~8 weeks     │
└───────────────┴────────────┴──────────────┘

Rate Calculation:

Rate unit: per million satoshi per block (ppm/block)

Formula:
Total fee = capacity(sats) * rate(ppm) * blocks / 1,000,000

Example:
• Capacity: 10,000,000 sats (0.1 BTC)
• Rate: 500 ppm/block
• Duration: 2016 blocks
• Total fee: 10,000,000 * 500 * 2016 / 1,000,000
           = 10,080,000 sats (~0.1 BTC)

APY (Annual Percentage Yield):
APY ≈ rate * 52560 (blocks per year) / 1,000,000

帳戶系統

Pool 帳戶

鏈上多簽地址,資金由用戶和 Pool 協調者共同控制。 用於支付拍賣費用和結算交易。

帳戶過期

帳戶有過期時間,過期後用戶可以單方面取回資金。 確保資金不會被永久鎖定。

批次執行

多個通道開設可以在一筆交易中完成。 減少鏈上費用,提高效率。

Sidecar 通道

為第三方購買通道。適合 LSP 為用戶購買入站容量。

使用 Pool

Pool CLI 命令:

# 初始化 Pool
pool accounts new --amt 1000000 --expiry_blocks 4032

# 查看帳戶餘額
pool accounts list

# 提交買單(購買入站容量)
pool orders submit bid \
  --amt 5000000 \           # 需要的容量
  --rate_fixed 500 \        # 願意支付的費率
  --lease_duration_blocks 2016

# 提交賣單(出租流動性)
pool orders submit ask \
  --amt 10000000 \          # 提供的容量
  --rate_fixed 400 \        # 要求的最低費率
  --lease_duration_blocks 2016

# 查看訂單狀態
pool orders list

# 查看租賃
pool leases list

# 取消訂單
pool orders cancel <order_nonce>

# 查看市場統計
pool auction snapshot

節點評級

Pool Node Rating System

Rating Factors:
1. Historical uptime
2. Channel stability
3. Routing success rate
4. Connectivity
5. Community reputation

Tiers:

Tier 1: Highest quality nodes
• High uptime
• Stable routing history
• May charge higher rates

Tier 2: Good nodes
• Acceptable uptime
• Value-for-money option

Unrated: New nodes or insufficient data
• Buyer can choose whether to accept

Buyer Can Specify:
• Only accept nodes above certain tier
• Specify preferred node pubkeys
• Or accept any node

費用結構

Pool Fees

Auction Fees:
• Execution fee: 0.1% of matched amount (both sides pay)
• On-chain fee: shared based on tx size

Account Operation Fees:
• Open account: on-chain tx fee
• Deposit funds: on-chain tx fee
• Withdraw funds: on-chain tx fee
• Renew account: on-chain tx fee

Example Total Cost Calculation:

Purchase 0.1 BTC inbound capacity, 2016 block lease

Lease fee: ~0.01 BTC (assuming 500 ppm)
Execution fee: ~0.00001 BTC
On-chain fee: ~0.0001 BTC
────────────────────────
Total cost: ~0.0101 BTC

Receive: 0.1 BTC inbound capacity x 2 weeks

注意: 租賃到期後,通道不會自動關閉。雙方可以繼續使用通道, 但賣方不再有義務維持在線。

相關資源

下一步: 了解 流動性廣告 ——Core Lightning 的去中心化流動性市場。

已複製連結
已複製到剪貼簿