On Climbing the Stat Arb (CEX/DEX) Leaderboard, Comparative Advantage and Careers, and My Future in Crypto

Note: as in my previous post about arbitrage on Avalanche, there are a lot of concepts in here that may not be familiar to the casual reader. I did my best to make simplifications, define terms in the glossary at bottom, and dive into details when appropriate. You can consider this document directionally correct like Bohr’s model of electron orbitals: useful for teaching but not correct in every detail.

The opportunity

During the 2021 bull run, a few friends and I managed to corner the atomic arbitrage market on the Avalanche blockchain. Unfortunately, our luck eventually ran out and I hung up my spurs.

But something had stayed with me that I couldn’t shake: at the peak of our profits, one of the most successful crypto traders of all time told me, “WTF are you doing messing around with atomic arbs. The competition is insane and there is so much more money in stat arbs.”

He was certainly right about the first point. Because atomic arbs are completed entirely on the blockchain and can be conducted with borrowed capital (flash loans), every 14 year-old chess prodigy on the internet is a potential competitor. However, aside from observing his substantial success, I was never able to confirm the second point myself.

Bored and curious one day, I wrote a script to pull the price of AVAX/USDT from both Trader Joe, the dominant DEX on the Avalanche blockchain, and Binance, the CEX formerly responsible for >50% of volume, and generated the plot below.

“Nothing there,” I thought, “the opportunity must have been arb’ed away.” 

But wait. As an atomic trader, I was used to seeing hundred-dollar, risk-free trades appear like volcanoes jutting out of the Amazon. The few-cent spread I observed between the CEX and the DEX just didn’t register. However, my partner, a real-life HFT guy comfortable with generating millions of dollars in returns with sub-bps opportunities, began salivating.

Trading stat arb is all about grinding for bps. It’s a volume game. If you see a 25 bps spread and know that you pay 23 bps in fees to execute the trade, you are a winner. Multiply that 2 bps by $10M in volume and all of a sudden you have a bot making $2k per day. Easy, right?

If you’ve ever wondered why what seems like the majority of transactions on most blockchains are swaps for random amounts that no human would consciously trade, stat arbs are the reason. There is no human speculator in the world that woke up one day and decided that he would rather have 600.51 JOE than 253.51 USDT.e (note that the USD values reflect the price when I took the screenshot not when the trade was executed; this trader did not lose $7 on this swap). Rather, some trade on another venue pushed the price of JOE/USDT slightly out of equilibrium and this bot realized that it could make a $0.05 profit.

The experiment

In trading, you never really know if you can actually capture the alpha you see. Noticing that an arbitrage opportunity exists is usually the easy part. 

After spending a bit more time analyzing the CEX/DEX spreads, we began tracking a half-dozen bots that appeared to be profiting from “our” trades but had no idea how sophisticated their operations were. However, we believed we had a chance for a couple reasons: 

  1. All of their trades were top-of-block. If you recall from my previous post, competing for backrun atomic arbs on Avalanche requires a network of hundreds of validators but top-of-block generally does not. I had lost access to a validator network, so this was extremely important.
  2. The largest bots only traded the top pairs, e.g. AVAX/USDT, WETH.e/USDT, BTC.b/USDT etc. Competition for CEX-listed but thinly traded tokens like JOE/USDT and STG/USDT seemed weak.

To test our hypothesis as quickly as possible, we pulled together a few hundred lines of python that represented the minimal stat arb bot. Our code contained five basic functions that were separated across five processes:

  1. A CEX listener that subscribed to Binance’s realtime bookTicker websocket feed, which provides best bid and best ask prices and sizes with each update
  2. A DEX listener that processed top-of-block logs and recorded prices for UniswapV2-style pools
  3. An opportunity finder that compared the CEX price and the DEX price and computed if a profitable trade existed net of fees. To size the orders, we simply assumed that we would take all of the liquidity available on the CEX at the best price. This assumption is in some sense the same as the no-arbitrage condition that is frequently assumed in trading. The math for this first version was as simple as:

    if abs(DEX price – CEX price) > 30 bps (DEX fee) + 10 bps (CEX fee) + gas (initially hardcoded to 25% of profits) → trade
  4. A DEX order executor that received the trade parameters, packed them into an order, and fired it to one of the existing routers. 
  5. A CEX order executor that handled the same on the Binance side

Remarkably, we started making money immediately, netting ~$200 our first day on the job. Not bad. We only had 1-2 competitors and each was bidding less than 25% of profits on gas. The proof of concept was complete and we were ready to expand.

How to lose money as a stat arbooooor

Unfortunately, our competitors quickly took notice and our P&L flipped negative.

Stat arb profits are computed via the following simple formula: profit = price_sold_asset * -q_sold_asset + price_bought_asset * q_bought_asset – price_gas_token * q_gas_token

At the risk of stating the obvious, a trade is fired if the expectation value of the profit is greater than 0. However, the assumptions involved in computing the profit don’t actually match the reality of the execution. You can lose money in four different ways trading CEX/DEX arbs:

  • Slippage on the CEX side. This occurs when either a price is stale before it reaches your bot or a competitor fires a transaction that takes the desired liquidity before you can get there.
  • Slippage on the DEX side. A competitor’s transaction lands ahead of yours (either in the same block or a block or more earlier) and pushes the price in an unfavorable direction.
  • Excessive gas bid. You accidentally pay more gas than the transaction is worth. This can occur via rouge PGA, bad profit computations, or incorrect estimates of gas consumption.
  • Revert on the DEX side. A competitor’s transaction lands ahead of yours and pushes the prices beyond your tolerance for slippage, causing your transaction to revert.

While the first three trim a few bps here and there from the bottom line, the last one can really hurt. A reverted transaction on the DEX side means that not only have you wasted a bit of gas (remember the margins on these trades tend to be really small) but that you need to reverse a trade on the CEX side to avoid inventory imbalance. This adds up 2x fees on the CEX side (~20 bps) plus any price impact incurred from reversing the trade during a time when the price is almost always moving against you (say ~20 bps). If you are shooting for 2 bps average profit per trade, this means that a single DEX revert wipes out 20 successful trades on average, but the tails can be much worse. This is the definition of picking up nickels in front of a steamroller.

Given this risk, the obvious remediation is to bid gas more aggressively in order to never revert on the DEX side (note: on EVM blockchains like Avalanche, transactions are generally ordered by gas). This was exactly what our competitors did. 

We came out of the gate bidding 25% of anticipated profits as gas, which was higher than the unstable equilibrium on the chain. After a day or two, our competitors noticed and bumped their bids up and thus us down on the block. We went from winning to losing every transaction.

Aside: there is no Nash equilibrium for stat arb gas auctions, implying negative EV for these trades

If not clear from the last section, our competitors were bidding ~20% of profits for gas to land top-of-block. We increased our bid and they responded. What would happen if we responded in turn? We would almost certainly regain market share at the cost of profit margin. But then what would our competitors do?

At first glance, the equilibrium profits for these trades are $0 because the gas bid should get run up to the value of the arb. However, it’s actually worse than that. Gas bids for stat arbs (and atomic arbs prior to the introduction of Flashbots) resemble the classic dollar auction thought experiment, in which rational participants pay more than par for a dollar bill. This occurs because second (and third and fourth and so on) actually pays for the privilege of losing the auction.

Spoiler: in reality, stat arb is quite profitable, no one actually bids up gas to the profitability of the trade, and we didn’t raise our base gas price big in turn. We didn’t want to signal a race to the bottom with our competitors, so instead we implemented a priority gas auction (PGA) algorithm that would start the gas bid low and ramp as competitors appeared in the mempool.

It’s not actually clear to me why this kind of detente works in stat arb but does not in atomic arb or sandwiches, where the Flashbots tip required to win obvious trades has escalated to essentially 100% of profits (nothing left for the searcher). If anyone knows the answer to this question, please reach out.

EDIT: zkSTONKs presented the following pseudo proof, which answers part of the question. Please reach out if you want to continue the discussion.

A simple answer is that the variance (risk) in atomic arb is lower than in stat arb, so the required ROI is lower for atomic arb. This assumes a risk-averse utility function, which is a common assumption in financial modeling.

Without loss of generality, we can disregard gas fees. We use the earlier formula for profit: `profit = p_a * q_a – p_b * q_b`. Earlier, the quantities were random variables (because the tx might revert). For simplicity, we assume that the quantities are constant, we will just focus on the prices.

We will model the prices as a Geometric Brownian Motion (GBM). We send the trade at time 0 and the trade executes at time `t`. We will use `p_t^i` to denote the (random variable) price of asset `i` at the time `t`. `sigma_i` is a constant, representing volatility.

We can now represent our profit with the formula `profit = p_t^a * q_a – p_t^b – q_b`. For simplicity, we now assume that `p^b = 1`. e.g. asset `b` is USD, so the price is always 1. Because the price of `b` is constant, the volatility of `b`, `sigma_b`, is 0.

So our profit formula is now `profit = p_t^a * q_a – q_b`.

Now, using the formula for the expectation of a GBM, we have `E[profit] = p_0^a * q_a – q_b`. The variance of our profit is `Var(profit) = (p_0^a)^2 * (-1 + exp(t * (sigma_a)^2)) * (q_a)^2`.

Notice that if we’re doing an atomic arb, then `sigma_a = sigma_b = 0`, so Var(profit) is zero.

However if the arb is not atomic, then variance is positive.

Let’s compare an atomic opportunity and a cex-dex opportunity which have the same E[profit]. Because the atomic arb has zero variance, while the cex-dex arb has positive variance, the logarithmic utility of the cex-dex trade is lower. So we are willing to pay less to execute the cex-dex arb, and thus our gas bid should be lower than for the atomic arb.

This proof shows that we would expect a lower gas bid for a a CEX/DEX arb vs. an atomic arb, but it doesn’t establish what that ceiling on the atomic arb should be. In a Flashbots world, the ceiling is indeed the value of the arb, but in a pre-Flashbots world, where the loser paid for a failed transaction, the gas bids could exceed the value of the transaction as in CEX/DEX. Let’s all put our heads together and rigorously figure out why CEX/DEX gas bids are so much lower than they could be.

Priority Gas Auction (PGA)

I believe that all PGA algorithms are essentially the same.

  • Set an initial gas bid
  • Listen to the mempool for transactions that appear to be taking the same arb
  • Resend transaction with a higher gas price
  • Repeat until the block is mined

On Avalanche, depending on how optimized your system is for listening to the mempool and resubmitting transactions, you can expect to get a low single-digit number of resubmits per block.

While this algorithm is simple, it significantly increases the complexity of an arb bot and requires upgrading to a distributed system. The MVP described above ran on a single machine across a handful of cores. However, because transactions are bouncing stochastically around the mempool from all over the world, simply waiting for a transaction with a higher gas price to drift over to your machine and leisurely resubmitting a transaction to the mempool is ineffective. 

Instead, a network of optimized nodes is needed to poll for new transactions as the maximum allowable limit and immediately resubmit arbs to the block proposer. In addition, new subroutines need to be written to keep track of previous transactions and resubmits across the network of nodes. Please see my previous post for a more detailed description of how this works.

Order sizing

The last element required for a passably competitive stat arb bot is an algorithm to compute the order size to maximize the profit. If we assume both that we will never fire deeper than the top level of the CEX orderbook and are trading UniV2-style DEX pools, as we did to start, it is possible to derive a nice analytical solution (derivation omitted because both of these would be terrible assumptions these days).

This computation gets much more complicated as different DEX venues and multiple levels of the CEX orderbook are considered. Unfortunately for those of us who like math, it becomes necessary to swap out clean analytical solutions for binary-search-style algorithms (aka numerical methods, which also include ternary search, Newton’s method, golden section search, and others).

Go son and seek your volume

Once we had built PGA and order sizing into our bot and spent a bit of time optimizing our validator network and DEX strategy, we returned to consistently winning the JOE and STG arbs. This was a nice proof-of-concept, but the volumes were way too low to make profits large enough to justify the effort. 

As mentioned in the introduction, we had built a system that harvested a few bps per trade, but at that point, the total volume on Avalanche was O($10M)/day, meaning that we were capped at somewhere between $2k and $20k/day profits, assuming 100% market share. In reality, our numbers were much smaller because we were limited to STG and JOE. To make all the work worthwhile, we needed to start trading more.

The crown goes to those with the lowest CEX fees

We naively added AVAX, WETH.e, and BTC.b to our bot’s config file to see if we could replicate our success with JOE and STG. We absolutely could not. Every one of our trades ended up behind a competitor (either in a lower position in the correct block or in a later block)

Because the volumes are so much higher with these coins, we moved from playing with the amateurs to the big boys. While a typical JOE/USDT trade would swap mid hundreds to low thousands in notional value at spread worth tens of bps (gross), AVAX/USDT trades not infrequently ran into the tens or hundreds of thousands in notional value.

This meant that:

  • Inventory requirements increased dramatically. It was possible to trade JOE and STG with a few tens of thousands of inventory on each side but these numbers were inadequate for AVAX.
  • The cost of reverts increased dramatically. The net cost of reverting a $100k AVAX/USDT trade is around $400. That really starts to sting when the total daily profits available are only an order of magnitude or so higher.
  • Volumes increased dramatically. While this may sound obvious, this is the topic of this section.

Upon inspection, it was clear that our competitors were simply firing earlier than us. An ordinary Binance account pays 10 bps to both make and take liquidity while a VIP9 account that trades >$4B/month pays only 1.8 bps to take and 0.9 bps to make. Even better fee tiers exist that provide rebates for making for those who contribute >0.15% of Binance’s total volume.

Not only does the 5x reduction in fees significantly increase profits (remember, we were aiming for 2 bps per trade–doing nothing more than improving the fee tier bumps that up to 10 bps), but it allows for firing a trade earlier. Spreads don’t appear out of nowhere. They creep up. If a bot on a basic Binance account requires a 30 bps spread to be profitable, another bot with a better fee tier will almost certainly take that arb at 25 bps.

I won’t go into details here, but getting access to the best Binance fee tier is an essential edge in trading stat arb. There are even teams that run unprofitable CEX arbitrage strategies for the sole purpose of increasing volumes to drop fees.

Aside: maker vs. taker

Looking at the Binance fee tiers, you might be tempted to make rather than take liquidity on the CEX side. Not only would you save on fees, but you would also avoid crossing the spread and in theory get a better price if you assumed that the price would jiggle around a bit and someone would hit your bid/ask shortly after placing it.

This is a reasonable temptation and I suspect that many successful traders run market making stat arb strategies. However, this approach requires a significantly more complex trading system because you need to be able to track every resting limit order, close them out if the price runs in the other direction, and handle inventory more carefully.
We experimented with maker strategies both early in this run and during my first run with CEX arbitrage. My net takeaway is that the maker orders almost always got hit eventually, but without significant investment in order management, the risk of the price running away mitigated the benefits of better pricing and lower fees. Empirically, I saw that a single lost limit order could wipe out weeks of trading profits. In addition, a maker strategy is really pushing the limits of what arbitrage is because of the increased beta exposure required for holding these positions, even short term.

Inventory, futures, and leverage

We have touched on inventory a few times without explicitly defining it. Unlike atomics, to trade stat arbs, you must keep a (fairly large) balance of all the coins you wish to trade in each venue. If the price of AVAX/USDT on the DEX falls below the CEX, you purchase AVAX on the DEX with USDT and do the reverse on the CEX. No-arbitrage conditions guarantee that mean reversion will let you reverse the trade and rebalance your inventory, but there is no telling how long this will take.

In reality, when markets are moving, the capital required to continue trading prior to a mean reverse can be substantial (tens of millions of dollars), so you can do one of two things:

  • Pause trading when inventory is depleted. In the example above, we would eventually run out of USDT on the DEX and AVAX on the CEX. At some point, the arb would reverse and would trade our way back into a balanced inventory. This approach is conservative but leaves a lot of profits on the table because the most profitable periods are where the markets are most irrational and the arbs tend to continue running in the same direction.
  • Rebalance. In the example above, we would transfer half of our AVAX on the DEX to the CEX and vice versa with USDT. This lets us reset our inventory but causes some problems of its own. When to rebalance? What if the market moves while the coins are in transit? What to do with bridged tokens? How to handle CEX/DEX equivalent tokens, e.g. BUSD/USDC?

If you want to be efficient with inventory, the first option is really not viable. You either leave the majority of your profits on the table or end up with a really low utilization rate. Remember that you can get 5% risk free these days (1.5 bps/day), so you want to make a significant multiple of that through a risky strategy like crypto stat arb (holding crypto, counterparty risk, opportunity cost, etc.). To make the math easy, this means you need to turn over your inventory at least once per day to make this worthwhile. With rebalancing, this is trivial (we would frequently turn over O(10)/day) but without most of your inventory would sit idle for the most of the time as you waited for large moves and you would be better off in T-bills.

The second option adds a ton of complexity. Our formerly simple MVP arb bot now has a network of nodes resubmitting transactions, all kinds of computations to check for size and profitability, analytics modules to track profits, and a rebalancing module that monitors positions and shuttles funds back and forth.

You might put this and the previous section together and ask why trade spot at all. Futures offer lower fees, implicit leverage (less inventory requirement), deeper liquidity, tighter spreads, and (usually) better price discovery. This is all true, but because futures cannot be easily exchanged for spot products to enable this inventory shuffle, they make inventory management much more challenging. We never really got over this hurdle, but most stat arb teams do trade futures. If you are one of these teams and want to share how you handled this, please reach out and tell me. I am curious.

A bunch of asides

The following section is a collection of my unstructured thoughts on a few topics that I feel like addressing. We tried/experienced some of these while some were only on our long-term roadmap.

Aside: why not just trade one side

If not apparent, our bot is now getting quite complicated. What started as a simple python script to take a simple trade is now a very complex system. Could it be simplified by just trading the DEX side? ~80% of the time, price discovery originates from Binance.

Some teams do take this approach and avoid a bunch of complicated CEX and inventory management components, but without both legs, this really isn’t arb any longer and you begin to take price risk. I would prefer to have no exposure to crypto prices, but if you are comfortable with this, it is totally possible to go this route.

On that note, there is a great interview with Kyle Davies of 3AC about how they slowly expanded their window of what they considered an arb. First, they started with atomics. Next, they took the GBTC premium. And finally, they bought discounted token presales with lock ups, which really isn’t even close to an arb but rather a random directional bet. The latter two “arbs” blew them up. Do what you will with this information.

Aside: DEX > CEX

Beyond earning the best fee tiers and placing your bot next to the matching engine (AWS Tokyo for Binance), there isn’t a lot to be done on CEX side. Yes, you will run into problems like receiving stale ws messages and needing to create models to determine which are worth trading on, but this is relatively simple compared to the challenges on the DEX side. 

I believe that all the best stat arb traders have made significant investments in understanding blockchains, validators, gossiping, networking, protocols, and the rest of the complexity on the DEX side. This is where the alpha lies.

Aside: bridged tokens are a PITA

When I discussed finding more volume earlier, I mentioned starting to trade WETH.e/USDT and BTC.b/USDT not ETH/USDT and BTC/USDT, which don’t actually exist on the Avalanche blockchain. There are dozens of blockchains out there with reasonable DEX volumes and likely hundreds of various bridged versions of tokens whose prices need to be arbed into equilibrium.

However, these arbs tend to be annoying, finicky, and risky to trade directly due to rebalancing and inventory management problems. If you are trading BTC.b/USDC on the DEX against BTC/BUSD on the CEX and inventory runs out on one side, you need to track the cost/risk of bridging BTC.b to the Bitcoin blockchain and transferring the BTC to Binance and the same for the USDC/BUSD swap, whose autoconversion was paused shortly after we started trading. This added complexity in addition to assuming the tail risk of a bridge hack led us to mostly trade bridged tokens without rebalancing, but an opportunity exists for those who dare.

Aside: hedging and inventory management

Everything I’ve described so far about inventory management has been naive: reverse failed DEX trades, trade instruments quoted in stables, accept price movements. But profits can increase significantly at the cost of significant complexity by optimizing each of these.

As mentioned earlier, the cost of reversing a failed DEX trade is large. If you had a POV on the correct inventory to hold into the future, you could avoid the failed DEX penalty and simply hold the “incorrect” inventory until it was more cost effective to dispose of or the trade naturally reversed. While we never did this, I believe that a very sophisticated inventory management system is required for larger traders that may be moving millions of dollars per swap for whom simply reversing a trade is not acceptable.

Trading instruments quoted in stables makes inventory management much easier: a balanced portfolio should have 50% tokens and 50% stables across the CEX and DEX. Trading instruments quoted in crypto makes tracking much more difficult but opens up more opportunities. Once one does this, your code responsible for inventory management and rebalancing is almost certainly more sophisticated than that responsible for trading and likely evolves into a very complex convex optimization program.

Finally, it is worth mentioning hedging. We traded unhedged for two reasons:

  • we were willing to lose the inventory we had put up
  • stat arb trading is naturally self hedging; what I mean by this is that inventory requirements grow with crypto prices and vice versa

However, larger traders, some of whom hold hundreds of millions of dollars in notional inventory, almost certainly need to hedge. Adjusting a hedge across every instrument after every trade is likely not feasible, but coins can be broken into baskets and general beta exposure hedged out at the end of each trading day. In addition, funding rates for tokens tend to be negative on average, so hedges can add a small return to a portfolio at the cost of more complexity and the risk of needing to add funds if crypto prices increase significantly.

Aside: you will be constantly dealing with random crypto problems trading stat arb

Trading atomic arbs is pretty nice. Aside from potentially losing money on a gas auction to capture a top-of-block arb (limited to the gas value in your EOA) or getting hit with a Salmonella-style attack, there is basically no way to lose money. We left our atomic bot running for months after we had mentally checked out and while it didn’t make much, we knew that it wouldn’t lose any money and occasionally picked up a nice trade.

Stat arb is not like that. Every week something happens in crypto. A few such examples in our run:

  • SVB collapsed, causing USDC to lose its peg
  • Binance stopped redeemed BUSD 1:1 for USDC
  • The STG team tried to shift to a new contract only to reverse their decision a few weeks later
  • Binance paused withdrawals
  • The GMX oracle got manipulated into quoting bad prices

Each of these events can cause you to lose enormous chunks of your inventory if not caught early. Trading stat arb is a full-time job in a way that atomics are not from purely a risk management perspective. Instead of a single (admittedly fairly complicated) system that can essentially only accumulate profits, you have a collection of systems, each of which can wipe out weeks of profits in seconds with a single failure.

Aside: stat arb profits are Pareto distributed (as in atomics)

Throughout this post I’ve been speaking in means, but this is not how trading profits are distributed. While it would be nice to make 2 bps on every trade and consistently trade $10M/day, volumes respond to events. JOE might rip for 3 days, yielding 90% of the profits, and then die for 3 months while the action bounces around to other tickers. And digging into those JOE trades, 90% of those may have only yielded a 1 bps at small sizes but a handful captured 100 bps at $10k notional, delivering the P&L for the day.

The lesson is that it is very important to capture the tails. An arb bot that just trades the trunk won’t make any money. Be ready for the weird venues, the weird coins, and the special opportunities.

Aside: on the value of being first to a venue

On a related note, new venues often offer the best opportunities to profit. The figure below shows the best price of AVAX/USDT on Trader Joe plotted against the best bid and ask on Dexalot, an on-chain CLOB launched on its own subnet. You can see that at times the bids and asks were totally crossed for minutes at a time and one could manually click through arbs like the old Ether Delta days.

And the fun didn’t stop there. Dexalot offers market-making reward for liquidity providers, so it was possible to make tens of thousands of dollars per month in ALOT alone quoting much wider than Binance and taking both the spread and the tokens.

Aside: on RFQs

Several venues, e.g. 1inch, Hashiflow, etc., offer off-chain quotes. The general structure is that permissioned partners quote prices for a number of assets at the top of each block that can be read through their APIs (generally not on-chain), but there is a bit of variability. After studying price feeds from several of these for a few weeks, I concluded that they always quote 1-2 bps wider than the best CEX price. They are great venues for traders willing to pay that price for a CEX quote on-chain, but their liquidity providers are sophisticated and there didn’t seem to be much of an opportunity to arb stale quotes.

Aside: routing

On a DEX, the best price for a token is rarely through its most direct pool during times of market volatility. The figure below shows the synthetic best bid and best ask for QI both through the QI/USDT Trader Joe pool and the Yield Yak (autorouter) API. You’ll notice that during this time period, you can frequently get a better price through a route like QI → AVAX → USDT.

The same applied to lesser extent on the CEXes, but the price improvement tends to close much more quickly. The plot below shows the best bid on Binance via either a direct (d) or routed (r) path. You can see that at various times selling AXAX → {ETH,BTC} → USDT can earn you a few cents over AVEX → USDT directly. Given the slim margins involved in stat arb trading, a few bps here and there through optimized routing make a big difference.

Comparative advantage and careers

This arc may be my last in crypto. I’ve spent the last 6 years trading crypto on and off. Coding up my initial bots involved a few hundred lines of shoddy Python to profit from the massive price differentials quoted across mainstream exchanges for mainstream tokens. Hunting down these opportunities required nothing more than a bit of intuition and appetite for risk. But the bar has continued to rise. To be competitive, our most recent bot required substantial modifications to the validator software, constructing and evaluating a graph of thousands of tokens, math accurate to 18 decimal places, and robust reliability and error catching, all written in super optimized Rust code.

While it’s been fun learning all of this, the core skills needed to contribute to an arb bot in this day and age have drifted pretty far from my personal core competencies, which I believe lie at the intersection of AI and product management. And in retrospect, from a purely EV perspective, I do think that this little crypto side quest may have hurt compounding value into my primary occupation (I have been a PM working on speech and language, called AI now, at Meta and Google since this crypto odyssey began) more than it helped my bank account.

That said, I wouldn’t have done anything differently (well… maybe I would have sold all my crypto at the 2021 top). I am quite proud of what I accomplished in crypto, but the distraction has certainly come at a cost. As I wind down my activities here, it has been interesting to refocus on my career and see how far some of my peers have come while I was distracted by grinding for bps.

My takeaway and lesson for my primary self is to intentionally pick one thing and focus on it until the facts that drove the decision changed. In the immediate future, that thing is building speech and language interfaces to AR glasses at Meta. Stay tuned for the future.

Thoughts on the future of crypto

I’ve thought a lot about crypto through a product lens over the past few years. This was mainly selfish as I thought that it would have been really smart to raise a round and go full time in 2021 if we were able to somehow pivot our trading revenue to product revenue. However, despite a significant greed incentive, I really failed to figure out what kind of product could be built in crypto.

In my mind, crypto has strong product-market fit in 2 areas:

  • BTC store of value
  • DeFi

BTC as a store of value is quite Lindy at this point and I believe not going away. However, there really isn’t much to be done. The BTC community might even say that more strongly: there shouldn’t be anything to be done. Yes, ETFs shipped and now boomers can add an allocation to their retirement with one fewer click, but I don’t see how a product company could innovate on the core BTC value proposition.

DeFi is newer and a more obvious place to focus. There are a ton of super smart people analyzing every detail of every transaction and building new products to make swaps faster, cheaper, more secure, and so on. But beyond appreciating the optimizations in abstract, I’m not sure what problem these projects are solving. Uniswap is by far the most popular DeFi protocol and boasts barely more than 100k DAUs after years of operation. If 100k is the ceiling, is it reasonable/impactful to focus on building a piece of trading infrastructure that might only reach a fraction of that?

You can see this lack of PMF by selecting a random block on any blockchain and trying to figure out what problems ordinary users are solving.

https://etherscan.io/txs?block=19051715

In the example above, you see hundreds of arbs and swaps, a few transfers, and no games, NFTs, ledger writings, data transfers, or any of the activities that are supposedly enabled by a decentralized blockchain. It’s possible that crypto will enable a new breed of consumer or enterprise products in the future, but I don’t see a clear path at present and will hold off building myself until I do.

Glossary

bps: basis points = 1/100th of a percentage point

CEX: centralized exchange like Binance, FTX, or Coinbase. These organizations record trades on their internal ledger and do not actually write them to the blockchain unless a customer withdraws or deposits funds.

DEX: decentralized exchange like Trader Joe, Uniswap, or Curve. These smart contracts live on the blockchain and enable users permissionlessly make and take liquidity.

Making liquidity/maker orders: placing a limit order at a price worse than the resting best price. The net effect is to increase the depth of the order book (amount of liquidity) available on the exchange.

Stat arbs: in finance, statistical arbitrage generally refers to any trade where a pair of assets should statistically move in a certain way. However, there are degrees of *should*. TradFi traders might reason that Meta and Google are both in the ads business, so if Meta is relatively expensive and Google is relatively cheap, they should short the former and long the latter. However, this is a weak argument. Perhaps Meta is just a better business or Google has structural problems. A stronger stat arb thesis is that Royal Dutch Shell used to be traded on both American and European exchanges. If the shares were trading at different prices on each, nearly risk-free profits are available to those who close the spread. This is what stat arb means in a crypto setting. AVAX may be trading at slightly different prices on Binance and on various blockchains.

Taking liquidity/taker orders: placing a market order or a limit order at at the resting best price. The net effect is to reduce the depth of the order book (amount of liquidity) available on the exchange.