コンテンツにスキップ

AMM Design (CPMM)

免責事項: このホワイトペーパーは英語版が正式な文書となります。他言語の翻訳は参照用です。


PIPO uses a Constant Product Market Maker (CPMM) for warrant price discovery and liquidity provision. This is the same proven model used by Uniswap, adapted for structured product characteristics.


x × y = k
Where:
x = Warrant token reserve in pool
y = USDC reserve in pool
k = Constant product (invariant)
Spot Price = y / x (USDC per Warrant)
Example:
x = 100,000 warrant tokens
y = 35,000 USDC
k = 3,500,000,000
Spot Price = 35,000 / 100,000 = $0.35 per warrant

User wants to buy warrants with Δy USDC:
New y' = y + Δy
New x' = k / y' = k / (y + Δy)
Warrants received = x - x' = x - k/(y + Δy)
Example:
Buy with $1,000 USDC:
├── Initial: x=100,000, y=35,000, k=3.5B
├── New y' = 35,000 + 1,000 = 36,000
├── New x' = 3,500,000,000 / 36,000 = 97,222
├── Warrants received = 100,000 - 97,222 = 2,778
├── Effective price = $1,000 / 2,778 = $0.36
└── Price impact = ($0.36 - $0.35) / $0.35 = 2.9%
User wants to sell Δx warrants:
New x' = x + Δx
New y' = k / x' = k / (x + Δx)
USDC received = y - y' = y - k/(x + Δx)
Example:
Sell 2,000 warrants:
├── Initial: x=100,000, y=35,000, k=3.5B
├── New x' = 100,000 + 2,000 = 102,000
├── New y' = 3,500,000,000 / 102,000 = 34,314
├── USDC received = 35,000 - 34,314 = $686
├── Effective price = $686 / 2,000 = $0.343
└── Price impact = ($0.35 - $0.343) / $0.35 = 2.0%

Each warrant series has its own pool:

┌─────────────────────────────────────────────────────────────────┐
│ PIPO AMM POOLS │
├─────────────────────────────────────────────────────────────────┤
│ │
│ SPACEX-CALL-200B-Q42025 │
│ ┌──────────────────────────────────────────────┐ │
│ │ Warrants: 500,000 | USDC: 175,000 | k: 87.5B │ │
│ │ Price: $0.35 | TVL: $350,000 │ │
│ └──────────────────────────────────────────────┘ │
│ │
│ SPACEX-CALL-180B-Q42025 │
│ ┌──────────────────────────────────────────────┐ │
│ │ Warrants: 300,000 | USDC: 150,000 | k: 45B │ │
│ │ Price: $0.50 | TVL: $300,000 │ │
│ └──────────────────────────────────────────────┘ │
│ │
│ SPACEX-PUT-150B-Q42025 │
│ ┌──────────────────────────────────────────────┐ │
│ │ Warrants: 200,000 | USDC: 30,000 | k: 6B │ │
│ │ Price: $0.15 | TVL: $60,000 │ │
│ └──────────────────────────────────────────────┘ │
│ │
└─────────────────────────────────────────────────────────────────┘
// Simplified pool creation
contract PIPOPoolFactory {
function createPool(
address warrant, // Warrant token address
uint256 initialWarrants, // Initial warrant supply
uint256 initialUSDC // Initial USDC liquidity
) external returns (address pool);
}

Liquidity providers deposit both warrant tokens and USDC in the current pool ratio:

LP Deposit Process:
├── 1. LP has USDC to deposit
├── 2. Platform mints warrants at current ratio
├── 3. Both assets deposited to pool
├── 4. LP receives LP tokens representing share
└── 5. LP earns fees proportional to share
LP Token Value = (Pool TVL × LP Share)
Example:
├── Pool TVL: $350,000
├── Total LP tokens: 1,000,000
├── User LP tokens: 50,000
├── User share: 5%
└── User value: $17,500

LP positions are subject to impermanent loss:

IL = 2 × √(price_ratio) / (1 + price_ratio) - 1
Example (price doubles):
├── Price ratio = 2
├── IL = 2 × √2 / (1 + 2) - 1 = -5.7%
└── LP loses 5.7% compared to just holding

Fee TypeRateRecipient
Base trading fee0.30%LP + Protocol
LP share0.25%Liquidity providers
Protocol share0.05%Platform treasury
Fee Calculation:
├── Trade: $1,000 USDC for warrants
├── Fee: $1,000 × 0.30% = $3.00
├── LP receives: $2.50
├── Protocol receives: $0.50
└── User receives warrants worth $997

┌─────────────────────────────────────────────────────────────────┐
│ TRADE SETTINGS │
├─────────────────────────────────────────────────────────────────┤
│ │
│ Slippage Tolerance: [0.5%] [1%] [2%] [Custom: ___%] │
│ │
│ Transaction Deadline: [10 min] [30 min] [1 hour] │
│ │
│ Note: Transaction will revert if: │
│ • Price moves more than slippage tolerance │
│ • Deadline passes before execution │
│ │
└─────────────────────────────────────────────────────────────────┘
function swap(
uint256 amountIn,
uint256 amountOutMin, // Slippage protection
uint256 deadline // Time protection
) external {
require(block.timestamp <= deadline, "Expired");
uint256 amountOut = getAmountOut(amountIn);
require(amountOut >= amountOutMin, "Slippage exceeded");
// Execute swap
}

┌─────────────────────────────────────────────────────────────────┐
│ PRICE IMPACT CURVE │
├─────────────────────────────────────────────────────────────────┤
│ │
│ Price Impact │
│ │ │
│ 10% │ ● │
│ │ ● │
│ 8% │ ● │
│ │ ● │
│ 6% │ ● │
│ │ ● │
│ 4% │ ● │
│ │ ● │
│ 2% │ ● │
│ │ ● │
│ 1% │ ● │
│ │ ● │
│ 0.5% │ ● │
│ └──────────────────────────────────────────────────────── │
│ $100 $500 $1K $5K $10K $25K $50K $100K │
│ Trade Size │
│ │
│ Pool TVL: $350,000 │
│ │
└─────────────────────────────────────────────────────────────────┘

Reserve CPMM can be enhanced with concentrated liquidity:

Concentrated Liquidity Benefits:
├── Higher capital efficiency
├── Lower slippage for same TVL
├── Custom price ranges for LPs
└── Better suited for bounded products (warrants)

AMM prices anchored to oracle:

Oracle-AMM Deviation Check:
├── Calculate: deviation = |AMM_price - Oracle_price| / Oracle_price
├── If deviation > 10%: Display warning
├── If deviation > 20%: Increase fees
├── If deviation > 30%: Pause trading
└── If deviation < 5%: Green status

Fees can adjust based on market conditions:

Dynamic Fee Factors:
├── Volatility: Higher vol → Higher fees (protect LPs)
├── Volume: Higher volume → Potentially lower fees (reward activity)
├── Deviation: High deviation → Higher fees (arbitrage protection)
└── Time to expiry: Closer to expiry → Slightly higher fees

New Warrant Series Launch:
├── 1. Oracle Committee approves series
├── 2. Platform determines initial price (fair value estimate)
├── 3. Platform seeds pool:
│ ├── Mints initial warrant supply
│ ├── Deposits USDC to set price
│ └── k = initial_warrants × initial_usdc
├── 4. Pool opens for trading
├── 5. External LPs can add liquidity
└── 6. Price discovery begins
SPACEX-CALL-220B-Q22026 Launch:
├── Initial warrant supply: 1,000,000 tokens
├── Target price: $0.20 (20% probability)
├── Initial USDC: 200,000
├── k = 1,000,000 × 200,000 = 200,000,000,000
├── Opening price: $0.20
└── Initial TVL: $400,000

MetricTargetAlert Threshold
TVL> $100K< $50K
Daily Volume> $10K< $1K
Price Impact (10K)< 3%> 10%
LP Token PriceStable> 5% drop/day
┌─────────────────────────────────────────────────────────────────┐
│ POOL HEALTH DASHBOARD │
├─────────────────────────────────────────────────────────────────┤
│ │
│ Pool: SPACEX-CALL-200B-Q42025 │
│ │
│ Status: 🟢 Healthy │
│ │
│ Metrics: │
│ ├── TVL: $347,500 (🟢 above target) │
│ ├── 24h Volume: $45,200 (🟢 healthy) │
│ ├── Price Impact (10K): 2.8% (🟢 acceptable) │
│ ├── Oracle Deviation: 3.2% (🟢 aligned) │
│ └── LP Returns (30d): +4.2% (🟢 positive) │
│ │
│ Liquidity Providers: 47 │
│ Largest LP: 12.5% of pool │
│ │
│ [View Trades] [Add Liquidity] [Pool Analytics] │
│ │
└─────────────────────────────────────────────────────────────────┘

const pool = await pipo.getPoolState('SPACEX-CALL-200B-Q42025');
// Response
{
poolAddress: '0x...',
warrantReserve: 500000,
usdcReserve: 175000,
k: 87500000000,
spotPrice: 0.35,
tvl: 350000,
volume24h: 45200,
fees24h: 135.6,
lpTokenSupply: 1000000,
lpTokenPrice: 0.35
}
const tx = await pipo.addLiquidity({
pool: 'SPACEX-CALL-200B-Q42025',
usdcAmount: 10000,
minLpTokens: 28000, // Slippage protection
deadline: Math.floor(Date.now() / 1000) + 600
});
// Response
{
txHash: '0x...',
lpTokensReceived: 28571,
warrantsDeposited: 14285,
usdcDeposited: 10000,
shareOfPool: 2.86
}