# How ETH-BTC trading is >350% more capital efficient on Reya Network

### TLDR;

- Reya Network is the worlds first L2 optimised for trading. To achieve this it has financial logic built into the design, with a Derivatives Clearing Protocol at its heart. This non-custodial building block does many things, including on-chain margining that creates safe trading conditions while optimizing for capital efficiency.
- In particular Reya Network’s margin system is the first on-chain protocol that has a holistic view of a traders portfolio, recognizing that losses from different positions might offset each other. This means it has the ability to
*reduce*margin requirements when holding offsetting positions in highly correlated assets. - As an example, trading the ETH-BTC spread, where we take a view on the future of the ETH-BTC ratio independently of market conditions, can be >350% more capital efficient on Reya Network than other venues.
- This feature unlocks highly efficient relative value trades on-chain, the next level of sophistication in trading: will ETH-BTC converge or diverge? Which of ARB-MATIC will take the forefront of L2s? Reya Network lets traders take positions on each of these with a fraction of capital.

# Bringing decentralization to clearing

Reya Network brings core financial infrastructure on-chain. At its heart is a Derivatives Clearing Protocol. At a basic level, this creates a system of collateral pools that exchanges can plug into seamlessly, leveraging the most advanced features of on-chain clearing while streamlining the deployment of derivative markets in a transparent and non-custodial manner.

The Derivatives Clearing Protocol is completely non-custodial. What this means is that when a trader deposits margin as collateral, no one holds your money — i.e. there’s no “FTX risk” of someone behind the scenes doing something they shouldn’t! Instead, the funds from opposing sides of a trade are deposited directly into a collateral pool managed by the smart contract. The smart contract will then ensure that traders keep appropriate collateralization levels (enough money to cover potential losses), as well as transfer funds from losing margin accounts to winning ones. Ultimately, to ensure the safety and solvency of the pool as a whole, it lets liquidators to take on positions in margin accounts that are at risk of default.

Reya Network’s Derivatives Clearing Protocol is groundbreaking in that:

- it is completely generalizable for linear instruments;
- it is completely flexible in the underlying risk models;
- it has a holistic view of portfolios, allowing for reduced margin requirements when positions offset each each other due to co-movement;
- as a consequence, it unlocks highly efficient relative value trades, in the ETH-BTC case increasing capital efficiency by >350%.

Documentation explaining the full mechanisms of the Derivatives Clearing Protocol will be released separately. For this post, let’s understand how the capital efficiency is enabled.

# Enabling margin savings with cross-margining

Derivatives clearing is based on a margin system, which aims at estimating the possible losses a trader may suffer. Notably, Reya Network’s margin system has a holistic view of a traders portfolio. This means when setting margin requirements, it takes into account that certain positions in a portfolio can win when others lose, in effect reducing the aggregate losses that a portfolio as a whole can suffer. As a result, a trader would need to deposit less capital as guarantee for those aggregate losses. This is why cross-margining is sometimes known as portfolio margining.

This feature enables very capital efficient relative value (long-short) trades. While it is completely fair to trade on whether a given token will go up or down, whether a given project is winner or a loser, more often than not, true trading opportunities are in betting on whether two projects will converge of diverge relative to one another. By longing one and shorting the other, a trader stands to gain precisely with those movements — irrespective of whether the market as whole goes up or down.

For example, a trader may think the ETH-BTC ratio will go up, meaning the ETH price will get closer to the BTC price, because they’re bullish on all the dapps on Ethereum! But that trader may not be sure whether the bull market is here or not, and if the prices themselves will go up or down. To capitalize on this view, the trader could go long ETH and short BTC at the same notional amount, say $1m. As the following table summarizes, the trader wins *always* as long as the ETH/BTC ratio goes up, bull market or not. Each cell shows the potential returns when the price of ETH and BTC go up or down by 10% or 20%.

The cells in green represent scenarios where ETH’s return surpasses BTC’s, and so the ratio goes up; the ones in red represent the opposite. For example, if ETH goes up 10% and BTC goes down -10%, the ETH price gets closer to BTC and the ETH-BTC ratio goes up by (approx.) 20%:

If you look at the table, you’ll find that a long-short strategy can earn 20% in this scenario. But the same could be accomplished even if only the price of ETH moved up, while BTC were stable (ETH +20%, BTC 0%), or BTC collapsed while ETH held its ground (ETH 0%, BTC -20%), or even in a full bear market, but ETH just lost less ground than BTC (ETH -10%, BTC -30%).

The cool thing about Reya Network’s margin system is that it knows this — a trader is *hedged* against the price level, and only wins or loses with the change in the ratio. The amount of money it will require a trader to deposit into the smart contract will be much smaller for the same notional amount.

# Trading the ETH-BTC spread — where do the margin savings come from

Ultimately the margin savings come from the fact that ETH and BTC don’t move independently, but rather tend to move up or down together. But if you hold a long position on one of them while holding a short one on the other, the losses in one actually offset the other: the short position inverts the PnL, and loses money when both prices go up and vice versa. The resulting PnL for you portfolio will be much smaller, corresponding to the difference in how much each of them goes up or down.

To illustrate, we can compare a long ETH — short BTC portfolio against a long ETH only of the same nominal ($10,000). The graph below shows clearly how over the second half of 2023, BTC’s PnL partially offsets or cancels ETH’s, *partially hedging* the price level movements: the spread’s PnL is generally lower that the long ETH only. In essence, this is the basis for margin reduction.

In other on-chain protocols, this effect is not taken into account. Instead, each of the ETH and BTC positions will be margined separately. If you are trading at 20x leverage, then they would require 10% of nominal because it would recognize that your long ETH can lose 5% when the market goes down, and you short BTC can lose 5% when the market goes up. But this is clearly inefficient — as you can see, your positions should offset.

How can we estimate the margin savings enabled then by Reya Network? This is where a bit of math comes in. Let $q_{\mathrm{ETH}}$ be the margin requirement for an ETH position, and $q_{\mathrm{BTC}}$ be the one for BTC. Isolated margining (mandatory in other on-chain protocols, but optional on Reya Network), would set the margin requirement for the long-short portfolio as

Reya Network, on the other hand, will let you cross-margin your positions, in which case it will set the margin requirement as

where **ρ **is a conservative estimate of the ETH-BTC correlation: a statistical measure of how much ETH and BTC move together.

We can see the evolution of the ETH-BTC correlation (for the math nerds, the historic EWMA correlation estimate).

In the last two years, the ETH-BTC correlation was bigger than 84.4% more than 90% of the time. Let us use this for an estimate in how much you can save be cross-margining: we will plug in this correlation value into the formula above, while assuming that the isolated margin parameters are the same, say 5% of nominal (20x leverage). The ratio between the isolated and cross-margined requirements is

In fact, the cross-margined requirement is *lower* than the isolated margin requirement for each asset separately! This illustrates the partial hedge effect: look back at the graph of returns above comparing the spread to a long ETH only portfolio.

To get an idea of how effective Reya Network’s cross-margining is, we ran a backtest for the last 2 years:

- computed the individual ETH and BTC margin requirements using an historical VaR+ES margin model,
*scaled to cover one-day variations*(so that margin requirements would be larger than those set in the Protocol); - we set the correlation parameter at the 10th percentile of the previous two years;
- we compared the margin requirement for the long-short portfolio with the
*subsequent*one day return of the portfolio.

The target is that the margin requirement cover at least 99.5% of the one-day subsequent returns. As we can see in the graph below, there were only two days over a two-year period where this didn’t happen, so-called hit days. This gives a ‘hit ratio’ of .3%; meaning the cross-margined margin requirements would have covered losses in all but 2 days — showing that it works really well at preserving the solvency of the protocol.

Now maths aside — what’s the overarching impact here? The portfolio margining in Reya Network unlocks a capital efficient way of trading relative value trades, on-chain. Will ETH-BTC converge or diverge? Which of Celestia — Eigen will take the forefront in DA? Traders can now take positions on these views with a fraction of the capital required previously.