The Finer Details of Funding Arbitrage
About a year ago, we first toyed with the idea of funding arbitrage with perpetuals.
Since then, we have added multiple posts talking about the trade and tangent topics. One discusses the value proposition of the strategy and where the compensation comes from.
We also implemented a fully systematic perpetuals arbitrage bot evolving the ideas from there:
https://hangukquant.thinkific.com/courses/qt410 *
*Use the code deltaneutral to get 400USD off your purchase, valid till March 25.
Today we want to talk about some of the finer details and extensions of implementing the trade.
Stacked EVs
We begin with the assumption that everyone is aware of funding differentials and the strategy profiting from positive swap cash flows. If not, please refer to previous posts. The discussions will be relevant for both systematic and manual implementations.
We begin with a table like this. On the left most column, we have the asset, then we have n exchanges. We put a fr’X’, to say that the funding rate has been standardized to account for variable intervals. Our point of interest are pairs with large delta (max - min), where we long/short the min/max members.
Already a couple of extensions here to note. Typically, an exchange can offer different quote assets, USDC/USDT/USDE and so on. If we opt to arb on pairs that are not quoted on the same thing, we are taking an implicit triangular arbitrage. Often, this is the best thing to do. For instance, you can compare prices
BTCUSDT, BTCUSDC, USCUSDT
and see that valuations are misaligned. These valuations are often not so out of whack that you can trade them locally, but stacking them on cross venue arbs can boost yields. In that case, you need a price oracle that helps you convert between valuations. For instance on binance you need their oracles on USDCUSDT, on paradex you need the PYTH oracle for USDCUSD and so on.
Basically, my point is you can stack funding, triangular and price arbitrage in the same trade. However, in manual implementations, its probably best to stick to just the same quoted asset; humans are terrible at high dimensional decision making.
A side note; as much as you can stack orthogonal ideas with funding, funding itself - is often a key feature in perpetuals market making (it is stacked onto others).
Breakevens
From the pair-options, you should have arbitrage pair(s) in mind. Say, we are interested in going long REQUSDT/binance and REQ/hyperliquid.
You need a table of fees, which would differ by persons (tier list) and by exchanges. The delta (rate differentials) is the source of positive cash flows. We still have to trade into the position.
Based on exchange incentive, the sum of cross maker and taker fees are not symmetrical (since local distances between maker-taker fees are unequal). This creates a bias for where you want to submit maker orders. An additional factor is that orderbook liquidity is not symmetrical. Depending on where you execute, you may get better price basis. The sum of these two effects is your cost of entry.
As a rule of thumb, you will be compensated for diffusing liquidity, so you are likely to do maker-illiquid and taker liquid executions.
Breakevens is the duration/number of cash flow intervals (say 8hr) required to cover the cost of entry.
This is an important figure, and since you are paid future differentials, its good to have multiple estimators. I have added ~, say historical, and ^, say regressor model predicted breakevens.
So far, we have determined what pair, and where to submit quotes. How?
Execution
If you are systematic, you have the luxury of computing some of these high frequency basis on tick. You can even pick up pure price arbs this way, when liquidity gets out of whack. For the most part, you are targeting arbs that are structural and last at least in the order of minutes. Your job is to ensure that conditions last in the seconds to minutes you are putting on the position.
The big idea was stacked EV, which is our pnl. The equation is pnl-cost, and breakevens reduce dimensionality of the problem, which is important if we are doing things manually.
This is on the finer details, the iterations that make us more clinical. Again, systematic or not, similar rules apply. In the best scenario, if we have target positions and we can bootstrap a market-maker engine to acquire inventory, we are all set. In the general case, we will do maker-taker. If automated, we can dynamically choose the maker leg - otherwise the typical rule-of-thumb works.
We have to determine
target position size
max order size
min order size
dynamic order sizing rule
For each point, we will raise a few points that are most pertinent. Target size is a function of risk appetite, leverage cost and capital. Edge consideration is your size relative to market size (e.g. open interest).
The max order size is a function of liquidity on the taker exchange. Once the maker order is filled, the taker hedge incurs (linear or quadratic) price impact. The size cap is placed to reduce price impact.
The min order size is a function of the target size, a lower aggression bound to accumulate inventory.
Anything in between is dynamic; if we are working with smaller amounts of capital, we can place a size that has least market impact (only takes liquidity from bba on taker). Another heuristic, if we are executing manually, is to just chunk it up as first order approximation.
If we want to be really aggressive, we can work backwards from choosing a threshold breakeven. It is easier to explain this forward, so I’ll do that. Assume we pick x$ short that got filled, and we want to hedge long. Then the effective taker price is a notional weighted sum over the price depths; I explained it in the referenced post:
This affects the maker-taker basis, which in turn affects breakevens. We can work back from breakevens to determine how aggressive we want to be.
To swap out an existing trade for new pair, the breakevens have to account for exit cost basis (whatever your execution penalty is).
Risks
The exogenous risks include counterparty risk, hack risk so on and so forth. These are not too interesting to comment on, and are both difficult to account for, and profiles of the premia business. It’s feature not bug.
More interesting is endogenous risk, such as margin risk. These are most often results of underestimating market volatility and complacency. A sharpe of >10 is not uncommon here, it is volatility that is expensive.
High sharpe and expensive vol (low capital efficiency) is the perfect recipe for zealous trading. It is the simplest, and yet the biggest outlier threat to messing things up. LTCM, mortgage crisis, natgas OptionsSellers - we can’t help ourselves. The madness of man escape the finest of models.
The primary operation risk is margin risk. Whatever positions we have put on, it is a good idea to transfer margin from +pnl exchanges to -pnl exchanges. This is still vulnerable to crash risk factor, due to network congestions that make margin transfer unavailable precisely when we need it most.
One way to alleviate crash risk factor is with beta hedging. This itself has multiple options. Assume betas obtained from single-factor risk model.
One is such that the selection of pairs is that any exchange venue has roughly
neutral beta exposure. This is easier when there are a number of exchange venues you are targeting, since there are naturally more pairs to select from to satisfy this constraint. The cost is reduced search space.
Another is just carrying out the portfolio construction as usual, and then beta hedging with majors to be beta neutral. Since the hedging is carried out per venue, the total portfolio hedges also cancel out and we maintain delta neutral. The cost is extra capital.
Other tacky variants exist, such as doing BTC/{…} pairs that target funding. The cost is delta risk.
If we do these right, mostly our portfolio risk is pretty solid. We can still have worst case risk engines, that take care of idiosyncratic risk. It is reasonable that single positions can disrupt equilibriums, especially in crypto.
We can dump inventory preemptively when we cross certain margin thresholds, as opposed to triggering liquidations. The benefit is that we can gradually liquidate our inventory - the exchange won’t have the courtesy to be as nice.
Adjacents
Last but not least, there are other forms of funding arbitrage that can be looked at. We have particularly focused on perpetuals arbitrage; other forms include (taken from 0xLightcycle’s Tweet):
1. Same Exchange - Short Perp Long Spot
2. Same Exchange - Short the Quarterly Long Spot
3. Same Exchange - Borrow/Short Spot, Long Perp
4. Two Exchanges - Short Perp on One, Long Perp on Other
5. Statarb Factor - Short all the High Funding, Long Low Funding
6. Dynamic Funding Arb
There is a high-level comparison of each arbitrage method there, and I’ll not repeat them here to do you the disfavor of getting to check out his posts.
Another benefit (other than leverage) of perp-perp arbitrage is that there are no long/short constraints, meaning performance is less regime-dependent and relies on structural flow differences across venues. Spot-perp arbitrage is typically alot more profitable in bull markets, relying on price insensitive, leveraged longs that compensate liquidity provision.
I just have two additional points in boosting arbitrage yield.
Often, exchanges offer yield-bearing collateral and margining. For instance, you can hold USDE (temporary) as collateral for trading - and earn yields on Bybit. Synthetic yield bearing collateral is coming to Paradex exchange. (I have sneaked in my referral link)
Last, spot-perp arbitrage is often coupled with the spot leg staked to enhance yields. I believe this is something similar to what Resolv does. For instance, you can buy spot HYPE, short perp HYPE to get funding + stake spot to get stake yields.
The funding arbitrage lectures* implement some of these ideas for perpetuals arbitrage in a fully systematic way.
*Use the code deltaneutral to get 400USD off your purchase, valid till March 25.
Thanks for reading :)