What is Funding Farming in MagicTradeBot?

Funding Farming is an automated trading strategy designed to earn funding fees by simultaneously opening hedged Spot and Futures positions on symbols with positive funding rates. The strategy aims to capture funding payments while minimizing directional market exposure, making it essentially delta-neutral or low-risk with respect to price movements.


🔹 Purpose of Funding Farming

  1. Automates Funding Fee Collection

    • The bot identifies symbols with positive funding rates and opens corresponding hedged trades.
    • Earns incremental funding payments from the futures market without relying on directional price moves.
  2. Delta-Neutral / Low Directional Risk

    • Hedging Spot and Futures positions reduces exposure to price swings.
    • Focuses profits on funding payments rather than market direction.
  3. Designed for Capital Efficiency

    • Best suited for stable, liquid symbols
    • Sensitive to funding rate changes and liquidation thresholds

Documentation: Funding Farming Mode User Guide


🔹 Key Requirements

  • Spot and Futures trading must be enabled
  • Not supported on wallet-based exchanges (e.g., Hyperliquid)
  • Activation: Set TradingMode in General settings to "funding-farming"

🔹 Strategy Characteristics

Feature Description
Directional Exposure Low (hedged positions)
Capital Intensity High (requires sufficient spot and futures capital)
Risk Sensitivity Sensitive to funding rate changes and liquidation thresholds
Symbol Selection Prefer stable, highly liquid assets (e.g., BTC, ETH)

🔹 Trade & Symbol Selection

  1. Maximum Concurrent Positions (max_open_trades)

    • Recommended: 1–3 trades for conservative setups
  2. Symbol Selection Pool (max_symbols_to_pick)

    • Example:

      • 5 → pick top 5 symbols by funding rate
      • 10 → broader selection for flexibility

🔹 Capital Allocation

Parameter Example Notes
Spot Order Size (spot_order_size) $5,000 Full value for hedged spot exposure
Futures Order Size (future_order_size) $2,500 Typically smaller than spot to maintain hedge balance

🔹 Risk & Liquidation Protection

  • Emergency Close Threshold (liquidation_percent)

    • Closes both Spot and Futures positions if price nears the liquidation point
    • Example: 5 → positions closed when within 5% of liquidation

🔹 Funding Rate Filters

  • Minimum Funding Rate (funding_rate_threshold)

    • Sets the positive rate required to enter a trade
    • Example: 0.03 → only symbols with ≥3% funding rate are considered
    • Higher threshold → more selective, higher potential yield

🔹 Timing & Execution Windows

Parameter Example Purpose
open_trade_before 120 min Opens hedged position before funding snapshot
close_trade_after 30 min Closes trade after funding payment is captured
  • Allows precise positioning to maximize funding fee capture

🔹 Best Practices

  • Focus on highly liquid symbols like BTC, ETH, and top-cap alts
  • Monitor funding rate volatility to avoid unexpected losses
  • Avoid overlapping funding windows across multiple symbols
  • Always test in simulation before live deployment

✅ Key Takeaways

  • Funding Farming automates collection of positive funding payments using Spot + Futures hedging
  • Strategy is delta-neutral, reducing market direction risk
  • Requires careful capital allocation and monitoring of funding rates and liquidation thresholds
  • Best used on stable, liquid crypto symbols for consistent funding yields

📎 Related Topics