Perps: 펀딩비, 마진, 청산 회계
도입
Perpetual futures는 만기가 없는 파생상품이다. 만기가 없으므로 mark price가 index price에서 멀어질 수 있고, 이를 조정하기 위해 funding payment가 사용된다. funding은 protocol revenue가 아니라 long과 short 사이에서 이동하는 convergence incentive일 수 있다.
Perps를 DeFi 교육에 넣는 이유는 담보와 가격, 청산, oracle, liquidity가 모두 만나는 영역이기 때문이다. 사용자는 레버리지 포지션을 보지만, 운영자는 margin ratio, funding, insurance fund, liquidation engine, ADL fallback을 함께 본다.
학습 목표
- perpetual futures에서 funding이 index price와 mark price를 수렴시키는 역할을 설명한다.
- margin ratio, maintenance margin, liquidation price를 계산한다.
- perps venue의 CLOB, AMM/LP pool, hybrid 구조가 어떤 risk를 만드는지 구분한다.
개념 설명
funding direction의 입력
maintenance margin보다 낮으면 liquidation
venue와 collateral concentration 확인
loss absorption before ADL
| 개념 | 의미 | 실무 확인 |
|---|---|---|
| Mark price | liquidation과 PnL에 쓰는 가격 | index와 divergence |
| Index price | 외부 기준 가격 | oracle source와 freshness |
| Funding | long/short 간 payment | rate, interval, payer side |
| Margin ratio | collateral / notional | maintenance threshold |
| Insurance fund | deficit absorption | coverage and refill |
코드로 확인하기
export function fundingPayment(notionalUsd: number, fundingRate: number, side: "long" | "short") { const payment = notionalUsd * fundingRate; return side === "long" ? -payment : payment;}export function marginStatus({ collateralUsd, positionNotionalUsd, unrealizedPnlUsd, maintenanceMarginRatio}: { collateralUsd: number; positionNotionalUsd: number; unrealizedPnlUsd: number; maintenanceMarginRatio: number;}) { const equity = collateralUsd + unrealizedPnlUsd; const marginRatio = equity / positionNotionalUsd; return { equity, marginRatio, liquidatable: marginRatio < maintenanceMarginRatio };}fundingPayment는 side에 따라 부호가 바뀐다. marginStatus는 PnL을 담보와 함께 equity로 반영한다. 실제 venue는 cross/isolated margin, fee, partial liquidation, insurance fund, ADL rule이 더 필요하다.
강의 포인트
| 관점 | 확인할 질문 | 증거로 남길 것 |
|---|---|---|
| Price | mark와 index가 얼마나 벌어졌는가 | basis and oracle source |
| Funding | 누가 누구에게 비용을 내는가 | payer side and interval |
| Margin | equity가 maintenance보다 충분한가 | margin ratio |
| Backstop | liquidation 실패를 누가 흡수하는가 | insurance fund and ADL rule |
실무 예시
클라이언트[OPS] 사용자가 10x long position을 열었다. UI가 unrealized PnL만 보여주면 부족하다. funding 비용이 누적되면 가격이 움직이지 않아도 equity가 줄고 liquidation price가 가까워진다. 사용자는 next funding estimate, margin ratio, liquidation buffer를 함께 봐야 한다.
venue 구조도 중요하다. CLOB는 orderbook liquidity와 matching engine이 핵심이고, LP pool 기반 perps는 pool이 trader PnL의 상대편이 될 수 있다. hybrid 구조는 둘 다 가질 수 있다. 어떤 구조든 oracle과 liquidation engine이 잘못되면 손실이 빠르게 커진다.
흔한 오해와 실패 시나리오
| 오해 | 실패 시나리오 | 교정 방식 |
|---|---|---|
| funding은 거래 수수료다 | trader 사이 payment를 revenue로 오해한다 | payer와 recipient를 분리한다 |
| PnL만 보면 된다 | funding과 fee가 equity를 줄인다 | margin ratio에 비용을 반영한다 |
| index price가 항상 안전하다 | source 구성과 staleness가 문제될 수 있다 | oracle policy를 검토한다 |
| insurance fund가 있으면 끝이다 | deficit이 크면 ADL이나 socialized loss가 발생한다 | backstop waterfall을 설명한다 |
실습 과제
- Funding settlement 계산하기: position notional, funding rate, side를 받아 long/short payment를 계산한다.
- Margin engine 만들기: collateral, position size, entry price, mark price, maintenance margin을 받아 liquidation status를 계산한다.
완료 기준
- funding payment와 margin ratio 계산기를 작성했다.
- liquidation, insurance fund, ADL fallback을 포함한 perps 위험 흐름을 설명했다.
근거 자료
- 05 Perps and Derivatives
- Hyperliquid Funding Docs
- GMX Fees and Funding Docs