Basis Trading With dYdX

    Matthew Fiebach

    Key Takeaways

    • Basis trading on dYdX involves selling a perp that trades at a premium with a positive funding rate and hedging the exposure, typically with a long spot position.
    • The trade can be deployed with perps trading at a discount, but there may be added complexity in executing the short leg.
    • Though traders mitigate their price exposure risk, the trade has fees and potential slippage at open and close that could lead to losses.
    • Hourly funding rates can be highly volatile and change rapidly. When the funding rate goes against a trader, they must decide if it is temporary or will continue against them, potentially causing losses.
    • dYdX’s implementation of multiple collateral types, a spot market, and a lending market could help the DEX attract basis trading volume and siphon market share from centralized trading venues.

    Many successful trading strategies originating in TradFi have been adapted for use with crypto-native instruments such as perpetual futures (perps). Among these strategies, one particularly promising market-neutral trade has garnered notable popularity: Basis trading. Trading the basis on perps offers the potential for positive returns while mitigating many risks typically associated with crypto assets. Executing the trade on decentralized perpetual futures exchange dYdX presents even more opportunity given the DEX’s relatively high volume, nascency, and barrier to entry for traditional market makers. Further, trading on dYdX is non-custodial, providing considerable value given the risk of using a centralized custodian.

    Basis trades rely on delta hedging, fully offsetting a long position with an equal short position. By doing so, traders achieve delta neutrality, meaning that changes in the underlying asset price should not result in any net loss. Delta-neutral trades are one subset of market-neutral trades.

    While market-neutral trades have been used successfully in other financial markets, their application to the world of cryptocurrencies is still relatively unexplored. When executing market-neutral trades in the crypto space, dYdX presents benefits and drawbacks compared to its centralized counterparts like Deribit and Binance.

    Trade Mechanics

    Basis trades, also known as cash-and-carry trades, are delta-neutral strategies that have their origins in traditional expiring futures. However, they exhibit unique characteristics when applied to perpetual futures. Deployed on dYdX, basis trades involve selling a perp that trades at a premium and has a positive funding rate. This exposure is then hedged by purchasing an equivalent amount of the underlying asset, typically in the spot market.

    Using this strategy, traders can generate revenue from funding payments while maintaining a net zero exposure to price changes in the underlying asset. This trade can also result in further profits from the basis if the perp and spot prices converge closer to price parity at the time when the trade is closed.

    Although more complex, it is possible to execute basis trades when the perp trades at a discount and the funding rate is negative. This involves purchasing the perp on dYdX and offsetting the exposure by shorting the underlying asset elsewhere. The short leg can be carried out by borrowing OTC or using platforms such as Aave, Euler, or Compound. To be profitable, the cost of borrowing must be less than the funding payments from the perp, which fluctuate hourly, adding to the complexity of the trade. Many markets on lending platforms only offer variable funding rates, further complicating matters.

    In addition to the aforementioned strategies, traders can also use traditional futures with expiries on Deribit, CME, or Binance for the offsetting leg of the trade while simultaneously being either long or short the perp on dYdX dependent upon the expected direction of funding.

    Funding Rates

    The funding rate is a mechanism that helps push the price of a perpetual future toward parity with the spot price. If the price of a perp is trading at a premium to spot, the funding rate will be positive, resulting in long positions paying shorts. Conversely, when the perp trades at a discount, the funding rate will be negative, resulting in short positions paying longs.

    The premium or discount is determined by the consensus bias among traders with an appetite for leverage. For example, when there is more demand for leveraged long positions than short positions because there is high confidence in the market, traders may be willing to pay a premium for that leveraged exposure. This results in the perp trading at a premium, a positive funding rate, with traders who are long paying funding to traders who are short.

    Basis trades on dYdX perps do not require that the price of the perpetual future eventually returns to parity with the spot price. The trader receives funding payment revenue while the basis exists in their favor.

    In a two-sided marketplace where many traders look to capture basis and funding payments, funding rates historically tend to oscillate around zero for more liquid assets.

    The funding rate on dYdX can be seen as a premium or discount of the perp price relative to an index price calculated every minute. The average (TWAP) over the hour is divided by eight to calculate the hourly funding rate. The index price is the median asset price from a basket of CEXs.

    If a dYdX perp trades at a 0.01% average premium to the index price over eight hours, longs will pay shorts 0.01% over the eight funding periods (ignoring the interest rate). It is somewhat like a traditional future that expires every eight hours and automatically rolls over without fees.

    There is also an interest rate component set at 0.01% per eight hours, or ~11% annualized, added to every premium as part of the funding rate calculation.


    There are several significant risks associated with basis trading. Funding rates can be highly volatile and change rapidly, requiring traders to monitor their positions closely. Additionally, opening and closing the position will result in fees and potentially slippage, which may lead to losses.

    Therefore, it can be prudent for traders to accept some funding payments against their position if they believe that, over extended periods, the funding rate will remain in their favor. When the funding rate turns against a trader's open position, each trader will have to decide whether this is a temporary dislocation that will eventually revert back in their favor or if this is the formation of a new trend in the funding rate. As such, it will be necessary for basis traders to conduct statistical analysis on historical funding rate data.

    The return from the funding payments and basis must outweigh the fees and slippage. Traders who execute this trade manually face a greater risk than those who utilize automated systems. The chart below helps highlight the volatility of funding rates.

    Basis trading on dYdX carries the risk of not being able to meet a margin call, especially if the trader is using leverage. A margin call may result if

    1. The basis rapidly expands
    2. The price moves against the perp position in favor of the other leg

    If the basis expands significantly in less than eight hours, the trader may need to add margin to keep the position open on dYdX since they will not have received their “fair share” of funding payments yet. Similarly, if the asset's price starts moving in the opposite direction of the perp leg, the trader must continuously add USDC collateral or risk liquidation. This risk is intensified as the use of leverage is increased. However, the potential returns on the basis trade are also increased when leverage is increased.

    Despite the fact that the trader's non-perp position offsets unrealized losses, they still need to add USDC margin to keep the position open. The two legs of the trade are executed on separate exchanges, and thus traders cannot use cross-margin. Basis trading on other exchanges like Binance could somewhat mitigate this risk. On Binance, traders may be able to use their long spot position, which is increasing in value in this scenario, as collateral against their short perp. This removes the need to add collateral and improves capital efficiency.

    Changes to a token or the market environment may impact funding rates. For instance, proof-of-stake assets tend to trade more often with negative funding rates as those staking may want delta-neutral exposure while capturing a carry from staking rewards. It is worth keeping an eye on the underlying and understanding its token mechanics and ecosystem.

    Funding rates also tend to move with sentiment. When the total crypto market cap trends upward, perps tend to trade with premiums, and vice versa when markets trend lower. Additionally, the large number of scalp traders on dYdX results in positive or negative news about a crypto asset potentially swinging the funding rate immensely

    Picking a Perp and Backtesting

    There are two significant factors when choosing a pair to trade: Volume and historical funding rates. When trading with larger size, it may make sense to only trade the most liquid pairs to limit potential losses due to slippage when opening or closing a position. Smaller traders might prefer lower volume pairs that may have less attention on them and thus more opportunity.

    All basis traders should attempt to find pairs that have historical funding rates that stay relatively consistent, which they expect to stay true in the future. It is generally easier to trade pairs that have a positive funding rate, as longing spot is simpler than getting short exposure outside of perps.

    Active management of positions and rotating between high funding rate pairs on small time frames can be effective for the highest volume traders who maintain 0 or low trading fees. However, for most traders, a more passive approach using historical data will be simpler, mitigate some risks, and provide more potential for profit.

    FIL and YFI are interesting examples to back-test as both pairs have maintained high positive funding rates on average over the last 90 days, although longer time frames reveal a different story.

    On the 1D, 7D, 30D, and 90D time frames, leaving a short perp long spot position on YFI or FIL would have been highly profitable. The same is true even over the last six months. However, since Jan 1, 2022, the trades would have seen times of large drawdowns. For example, opening a FIL perp basis trade in Jan 2022 would have experienced two months of continuous drawdowns resulting in a peak of -2% net PnL on the perp leg’s notional before eventually having the funding rate revert back into the trader’s favor.

    This is likely a result of a sentiment shift among traders from more negative to more positive, and thus, traders across dYdX flipping from mostly seeking shorts to longs.

    Attracting Basis Traders to dYdX

    To attract more basis traders to dYdX, adding multiple collateral types is crucial for increasing capital efficiency. Allowing traders to use their spot assets as collateral can prevent perps from trading at a significant premium. However, adding more collateral types presents technical concerns and risks for the exchange. With a slow rollout and conservative limits on OI, dYdX could safely explore the possibility of multiple collaterals.

    A partnership with a spot market or the addition of dYdX’s own spot market could provide significant benefits for basis traders. By allowing the execution of both legs in one transaction, it could attract more volume and create a better user experience for traders. Likewise to a spot market, a lending market partner integration would be extremely valuable for traders looking to execute basis trades for perps at a discount. Voltz would potentially be a good partner, given that fixed-rate borrowing is extremely valuable for executing basis trades for negative funding rate perps.

    Paradigm is another valuable potential partner for dYdX, as they already support a significant number of basis traders. Moreover, their partnership with Ribbon Finance, another decentralized protocol, demonstrates their willingness to support protocols. By collaborating with Paradigm, dYdX can leverage their expertise and resources to attract more basis traders and further enhance the platform. Paradigm’s main business is supporting multi-leg traders across multiple venues.

    Finally, many basis traders are excluded from being able to trade on dYdX because of their custodian and/or fund admin. Lobbying in this area could bring otherwise sidelined funds onto the platform for basis trading and more.

    Final Thoughts

    Despite the drawbacks of capital efficiency and needing to use multiple venues, dYdX presents tremendous potential value for basis traders. The collapse of FTX highlighted a prime benefit of dYdX: Self-custody. With the enablement of multiple collateral types, a spot market, and even lending, dYdX could continue its push to siphon market share from centralized trading venues.

    Creating an ideal platform for basis traders will help keep the perp price in line with spot more efficiently. This, in turn, will provide more accurate pricing and open the door to larger capital allocators.

    Basis trading is not without risk. It's the same question every time a trader thinks about deploying the trade on dYdX: How long will the funding rate hold?

    dYdX Grant Disclosure

    dYdX is the leading decentralized exchange for trading perpetual futures. The protocol is built on Ethereum and supports trading almost 40 assets with up to 20x leverage. Due to regulatory restrictions, the exchange’s front end is not available in certain regions.

    This report was made free thanks to the dYdX grants team but maintains a 100% unbiased nature. The grant’s sole influence was on the scope of the report.