Drift Protocol

A Complete Guide to Decentralized Perpetuals & Margin Trading
Guide
Updated Oct 28, 2025
Trade perpetuals on-chain with variable funding, isolated and cross margin modes, and deep liquidity.

This guide covers how Drift works, core concepts (funding, mark price, margining), step-by-step trading instructions, and security best practices.

Quick stats
Markets • TVL • 24h Vol

What is Drift Protocol?

Drift is a decentralized protocol for perpetual futures and margin trading. It focuses on capital efficiency, predictable funding rates, and composability with other DeFi primitives (vaults, oracles, and liquidations).

Core Components

Perpetual markets
Continuous futures markets settled on-chain using a mark price that tracks an aggregated oracle.
Funding mechanism
Funding transfers between long and short positions to keep mark price aligned with spot price; variable rates respond to market pressure.
Margining & liquidation
Supports isolated and cross-margin. Liquidations are executed against liquidity pools with incentives for liquidators to keep markets solvent.

How to Open a Position

1. Connect wallet

Use MetaMask, WalletConnect, or a hardware wallet. Ensure you have base collateral (USDC, USDT, or supported stablecoins).

2. Deposit collateral

Deposit to your margin account. Choose cross or isolated margin depending on risk appetite.

3. Select market & leverage

Pick a market (e.g., BTC-PERP), set size and leverage, and preview the estimated liquidation price.

4. Submit order

Use limit or market orders. Orders are settled on-chain; monitor funding and maintenance margin.

Funding & Mark Price Explained

The mark price is typically derived from a TWAP or oracle to prevent manipulation. Funding pays or receives a periodic fee: when mark is above spot, longs pay shorts; when below, shorts pay longs. Funding aligns incentives and keeps the perpetual price tethered to the underlying index.

Risk Management Tips

  • Avoid excessive leverage; use stop-loss orders where possible.
  • Prefer isolated margin for experimental or high-volatility trades.
  • Keep collateral denominated in stable assets to reduce P&L volatility on collateral.

Developer Snippets

// Example: fetch open positions const positions = await driftClient.getOpenPositions(walletAddress);

FAQ

How often is funding paid?

Funding intervals vary by market (commonly 1 hour). Check market parameters before trading.

What triggers liquidation?

When maintenance margin is breached; liquidators can close positions partially or fully to restore solvency.

Are funds custodied?

No — Drift operates non‑custodially; users maintain control via wallet signatures and on‑chain account management.

Advanced Topics

Explore liquidity mining, vault strategies, MEV protection in settlement, and integrations with on‑chain lending for collateral leverage.

  • Vault-backed liquidity for reduced slippage
  • Oracle smoothing and volatility guards
  • Protocol governance and parameter tuning