Perps 매칭 구조: CLOB, AMM, Oracle Price
도입
Perps는 하나의 상품처럼 보이지만 venue architecture에 따라 위험이 크게 달라진다. CLOB 기반 venue는 orderbook depth와 matching engine이 핵심이고, AMM/LP pool 기반 venue는 pool이 trader PnL의 상대편이 될 수 있다. Hybrid 구조는 orderbook과 vault liquidity를 함께 쓴다.
이 강의는 "어느 perps가 더 크다"를 다루지 않는다. 그런 순위와 volume은 기준일마다 바뀐다. 대신 matching, oracle, liquidation, backstop 구조가 사용자와 protocol에 어떤 실패 상태를 만드는지 본다.
학습 목표
- CLOB, AMM/LP pool, hybrid perps venue의 risk surface를 구분한다.
- mark price, index price, oracle price가 liquidation과 PnL에 쓰이는 방식을 설명한다.
- insurance fund와 ADL fallback을 venue architecture 관점으로 비교한다.
개념 설명
Matching
- CLOB orderbook
- AMM/LP pool
- hybrid routing
Price
- index price
- mark price
- oracle freshness
Risk engine
- margin ratio
- liquidation queue
- funding pressure
Backstop
- insurance fund
- ADL
- LP loss absorption
| 구조 | liquidity source | oracle dependency | backstop |
|---|---|---|---|
| CLOB | maker orderbook | index/mark calculation | insurance fund, ADL |
| AMM/LP pool | pooled liquidity | oracle and pool skew | LP pool and fees |
| Hybrid | orderbook plus vault | route-specific | insurance, LP, socialized rule |
코드로 확인하기
export function markIndexDivergence(markPrice: number, indexPrice: number) { const divergenceBps = ((markPrice - indexPrice) / indexPrice) * 10_000; return { divergenceBps, fundingPressure: divergenceBps > 0 ? "longs-pay" : divergenceBps < 0 ? "shorts-pay" : "neutral" };}export function backstopAction({ marginDeficitUsd, insuranceFundUsd }: { marginDeficitUsd: number; insuranceFundUsd: number;}) { if (marginDeficitUsd <= 0) return "none"; if (insuranceFundUsd >= marginDeficitUsd) return "insurance-fund"; return "adl-or-socialized-loss-review";}첫 함수는 mark/index divergence가 funding pressure의 기초가 됨을 보여준다. 두 번째 함수는 liquidation이 실패했을 때 손실이 어디로 가는지 판단한다.
강의 포인트
| 관점 | 확인할 질문 | 증거로 남길 것 |
|---|---|---|
| Liquidity | 누가 trader의 상대편인가 | orderbook depth or LP pool |
| Price | liquidation에 어떤 가격을 쓰는가 | mark/index/oracle config |
| Backstop | deficit이 어디로 이동하는가 | insurance and ADL policy |
| UX | 사용자가 어떤 비용을 예측해야 하는가 | funding and liquidation warning |
실무 예시
클라이언트[OPS] 사용자가 20x short position을 열었다. CLOB venue에서는 orderbook depth가 얇아지면 exit slippage와 ADL risk가 커질 수 있다. LP pool venue에서는 pool skew와 oracle update가 trader PnL과 LP 손익을 함께 움직인다.
따라서 perps dashboard는 PnL만 보여주면 안 된다. funding estimate, mark/index divergence, liquidation price, insurance fund status, ADL likelihood를 함께 보여야 한다.
흔한 오해와 실패 시나리오
| 오해 | 실패 시나리오 | 교정 방식 |
|---|---|---|
| perps는 모두 같은 구조다 | backstop과 liquidity risk를 잘못 평가한다 | venue architecture를 분리한다 |
| mark price만 보면 된다 | index와 괴리가 funding squeeze로 이어진다 | divergence를 계산한다 |
| insurance fund가 항상 충분하다 | extreme move에서 ADL이 발생한다 | deficit waterfall을 둔다 |
| LP pool은 passive yield다 | trader PnL의 상대편이 될 수 있다 | pool skew와 loss path를 설명한다 |
실습 과제
- Perps venue 구조 비교표 만들기: CLOB, AMM/LP pool, hybrid 구조를 liquidity source, oracle dependency, liquidation backstop으로 비교한다.
- Mark-index divergence 계산하기: mark price, index price, position side를 받아 funding pressure와 liquidation warning을 반환한다.
완료 기준
- CLOB, AMM pool, hybrid 구조를 matching, liquidity, oracle, backstop 기준으로 비교했다.
- mark/index divergence가 funding과 liquidation에 미치는 영향을 계산했다.
근거 자료
- 05 Perps and Derivatives
- Hyperliquid Docs
- GMX Liquidity Docs