Skip to main content
CLOB DEX Perpetual connectors enable trading perpetual futures on decentralized exchanges with on-chain order books. These platforms combine the transparency and self-custody benefits of DeFi with the leverage and derivatives features of traditional futures markets.

How CLOB DEX Perpetual Connectors Work

Decentralized perpetual exchanges bring derivatives trading on-chain:

On-Chain Leverage

Trade perpetual contracts with leverage while maintaining custody of your assets

Transparent Settlement

All positions, liquidations, and funding rates are publicly verifiable on-chain

Non-Custodial Margin

Your margin and collateral remain in your wallet, controlled by smart contracts

Permissionless Access

Trade without KYC, geographical restrictions, or account approval

Key Features

Access leveraged trading without custody risk:
  • Leverage typically 5-50x (varies by exchange)
  • Smart contract-managed margin
  • Transparent liquidation logic
  • No withdrawal restrictions

Connection Requirements

1

Prepare trading wallet

Set up a dedicated wallet for perpetual trading:
  • Generate new wallet for trading only
  • Fund with collateral tokens (USDC, USDT, etc.)
  • Ensure sufficient native tokens for gas
Perpetual trading with leverage carries liquidation risk. Never use your primary wallet or allocate more than you can afford to lose.
2

Configure blockchain connection

Set up RPC endpoint for the DEX’s network:
  • Choose reliable RPC provider
  • Consider latency for liquidation protection
  • Configure backup endpoints
3

Connect in Hummingbot

Use the perpetual connector ID:
connect [exchange_name]_perpetual
Enter your wallet private key when prompted.

Exchange Sponsors

These decentralized perpetual exchanges actively support Hummingbot:
Connector ID: derive_perpetualHigh-performance perpetual DEX on Lyra chain.Features:
  • On-chain perpetual order book
  • Sub-second trade execution
  • Multiple collateral types
  • Up to 50x leverage
  • Low gas fees on L2
  • Integrated spot and perps
Network: Lyra Chain (Optimistic Rollup)Exchange Documentation
Connector ID: dydx_v4_perpetualLeading decentralized perpetual exchange on dedicated chain.Features:
  • Fully decentralized L1 blockchain
  • Professional trading interface
  • Deep liquidity
  • Up to 20x leverage
  • Zero gas fees
  • Fast finality (1-2 seconds)
  • Cross-margined positions
Network: dYdX Chain (Cosmos-based)Exchange Documentation
Connector ID: hyperliquid_perpetualNative perpetual DEX with on-chain order book.Features:
  • Purpose-built L1 for derivatives
  • 100+ perpetual markets
  • Up to 50x leverage
  • Zero gas for makers
  • Native oracle integration
  • Sub-second execution
  • Vault strategies
Network: Hyperliquid L1Exchange Documentation

Other Supported Exchanges

The following CLOB DEX perpetual exchanges are maintained through governance:

Injective Helix Perpetual

Connector ID: injective_v2_perpetualFully decentralized perpetual exchange on Injective.Features:
  • Layer-1 blockchain optimized for DeFi
  • Zero gas fees for trading
  • Instant trade finality
  • Cross-chain collateral
  • MEV-resistant architecture
  • Up to 20x leverage
Network: InjectiveExchange Documentation

Supported Features

CLOB DEX Perpetual connectors support advanced derivatives features:
FeatureSupport
Limit ordersYes
Market ordersYes
Leverage adjustmentYes
Position trackingYes
Funding rate dataYes
Liquidation priceYes
Cross marginYes (exchange dependent)
Isolated marginLimited
Stop-loss ordersSome exchanges
Reduce-only ordersYes
Gas estimationYes
Leverage limits and margin modes vary by exchange. Most DEX perpetuals use cross-margin by default.

Understanding On-Chain Liquidations

Liquidations on DEX perpetuals differ from CEX:
Liquidation Mechanics
  • Triggered by smart contracts when maintenance margin breached
  • Executed by liquidator bots (often with incentives)
  • May experience delays during network congestion
  • Gas price spikes can delay liquidation protection
  • Insurance funds may be smaller than on CEXs
Liquidation Protection Strategies
  1. Lower leverage - Use 2-5x instead of maximum available
  2. Monitor gas prices - High gas can delay order placement
  3. Cross-margin risk - Entire account at risk if one position liquidated
  4. Reliable RPC - Fast connectivity critical for position management
  5. Keep extra margin - Buffer beyond minimum maintenance requirement

Gas Fees and Performance

Gas costs affect perpetual trading profitability:
High-performance custom blockchains:Examples: dYdX Chain, Hyperliquid, InjectiveAdvantages:
  • Zero or very low gas fees
  • Fast finality (1-3 seconds)
  • Optimized for trading
  • No congestion issues
Tradeoffs:
  • Smaller ecosystems
  • Bridge dependency
  • Less battle-tested security

Funding Rates on DEX Perpetuals

Funding mechanics are transparent and on-chain:
On-Chain Funding
  • Calculated by smart contracts using oracle prices
  • Typically settled every 8 hours
  • Payments automatically debited/credited to positions
  • Historical rates publicly queryable
  • No exchange discretion or manipulation
# Example: Calculating funding impact
position_size = 10000  # USDC
funding_rate = 0.01  # 1% (annualized ~10%)
funding_period = 8  # hours

# Funding cost per period
funding_cost = position_size * funding_rate
print(f"Funding per 8h: ${funding_cost}")  # $100

# Account for gas on funding settlement (if applicable)
gas_cost = 0.05  # $0.05 on L2
total_cost = funding_cost + gas_cost
print(f"Total cost: ${total_cost}")

Security Considerations

Smart Contract RiskCLOB DEX perpetuals rely on smart contracts:
  • Contract bugs can lead to loss of funds
  • Oracle failures can cause incorrect liquidations
  • Upgradeable contracts may change behavior
  • Insurance funds may be insufficient for large events
Always:
  • Research exchange audit history
  • Start with small positions
  • Understand the specific risks of each platform
  • Monitor protocol health and TVL

Configuration Example

Example configuration for a CLOB DEX perpetual connector:
connector: hyperliquid_perpetual
market: BTC-USD
leverage: 5
order_amount: 0.01
order_refresh_time: 30
gas_price_multiplier: 1.3  # Higher for faster execution

Comparison: CEX vs DEX Perpetuals

AspectCEX PerpetualDEX Perpetual
CustodyCustodialNon-custodial
LeverageUp to 125xUp to 50x
LiquidityVery highGrowing
Gas feesNoneYes (varies)
SpeedFastestFast (1-3s)
KYCRequiredNot required
TransparencyLimitedFull
Smart contract riskNoYes

Next Steps

CLOB DEX Spot

Explore decentralized spot connectors

CLOB CEX Perpetual

Compare with centralized perpetuals

Wallet Setup

Configure wallets for DEX trading

Risk Management

Learn risk management strategies

Build docs developers (and LLMs) love