CrabLab

Joseph Clark
Opyn
Published in
4 min readAug 2, 2022

A calculator for your crab

🦀CRABLAB 🦀

In this post:

  • How does crab return move with ETH return?
  • How does crab return move with implied volatility?
  • What is the expected apy of crab?
  • What is the expected transaction cost of crab?

Crab is a volatility strategy built on opyn’s squeeth. The crab contract is short oSQTH and long ETH so that the two forces offset as closely as possible.

As the price of ETH changes, the crab contract changes its mix of oSQTH and ETH by trading one for the other. Between these adjustments the payoff of crab looks like this.

The crab return

The crab return is highest if ETH moves sideways (like a crab).

The crab payoff equation

The return to crab between hedges is a combination of squeeth funding and ETH return:

Crab return = funding — (ETH return)²

If funding is 0.29% (find this on the trade tab at opyn.squeeth.com) and the ETH return over a day is 3% we can calculate the crab return

Crab return = 0.29% -(3%)² = 0.2%

(check on the Today Crab sheet in CrabLab for an example)

Crab yield estimated from squeeth data

Crab apy

The expected return for crab is the funding minus the expected squared eth return.

E(Crab return) = funding — E((eth return)²)

The expected value of a squared thing is the variance of the thing minus the squared expected value (check out the reason here or have a look at the Expected value of r² tab in CrabLab for a demonstration).

This means that the expected APY on crab excluding transaction costs is

E(Crab apy) = 365*funding — (variance of eth )

If I think the annualized volatility of eth is actually 90% (and transaction costs are negligible) my expected apy is

E(Crab apy) = 365*0.29% — 0.9² = 24.85%

Crab history

CrabLab has a historical explorer on the Yesterday Crab tab to show how actual squared ETH returns compare to a funding rate since 2016.

We might compare a funding rate at 0.3% (around 100% implied volatility) in the red line to a 1 month moving average of squared ETH returns. In periods where the funding line is higher, crab would make money.

Crab yield vs hedge cost 30 day moving average

Note that this is not a backtest because the funding rate would have changed over this history with expectations of volatility. Also we would have paid transaction costs on the hedge.

Crab vega

The crab strategy has an exposure to implied volatility through its position in oSQTH. The sensitivity to implied volatility is called vega. The vega of oSQTH is calculated with

oSQTH vega = 2 * (implied volatility)* (funding period)

(we get this by calculating the first derivative of the oSQTH pricing function with respect to volatility)

If implied volatility is 120% we have

oSQTH vega = 2 * (1.2)* (17.5/365) = 0.115

This means that if implied volatility goes up by 10% oSQTH will lose around 1.15%.

CrabLab has a return calculator to show how time and implied volatility and time impact returns.

Simulating crab returns over one hedge period

Transaction costs

Whenever the price of ETH moves you have to adjust the amount of ETH for the hedge. These transactions typically cost money in gas, slippage, or other trading costs.

The size of the crab hedge is twice the ETH return between hedges (see derivation here).

There’s a simple formula to estimate the transaction costs:

E(transaction cost) = 2*(volatility)/sqrt(365) * sqrt(2/pi)*(slippage)

So if volatility is 80% and the slippage to trade oSQTH to ETH is 0.5% the expected costs is

E(transaction cost) = 2*(0.8)/sqrt(365) * sqrt(2/pi)*(0.005) = 3.3bps

This means if the funding rate is 0.3% your effective funding rate after transaction cost will be 3.3bps lower on average, or 0.267%

Summary

We at @opyn_ like crab because it is a very simple implementation of short volatility.

You pay squared returns. You get funding. You pay the change in implied volatility. Transaction costs are proportional to eth returns.

You make money if one is larger than the other. Simple!

--

--