Reya: Redefining L2s for DeFi
Solving liquidity fragmentation, MEV, and capital efficiency to reshape DeFi
According to L2 Beat, there are at least 110 Layer 2 solutions and 17 L3s on top of Ethereum. Just like you, I am tired of these general purpose L2s with same applications deployed on them. It is hard to justify need for these L2s when they all attract the same Uniswap, GMX, Aave clones without a significant upgrade in trading experience and the same apps fragment the liquidity across the Ethereum ecosystem.
Furthermore, the airdrop craze that once fuelled excitement around promising L2s like Zk Sync, Starket, and Manta has lost its luster. These highly anticipated projects have failed to create sticky applications leaving users with little reason to stay put in any one particular L2. The constant migration to the next "flavor of the month" has become the norm.
Reya network has a chance to disrupt this status quo. They are developing a Layer 2 to provide best on-chain trading experience. DApps can opt in to use Reya’s built-in protocol modules to get 3.5x improvements in capital efficiency for traders, up to 6x for LPs, gas free transactions, 100ms transactions, and much more. They recently started their unique incentive program which could lead to a airdrop.
Why Reya is Different
Reya has developed a modular but cohesive architecture to solve the most pressing issues in DeFi. The network operates on two key layers: the Chain Layer and the Protocol Layer.
The Chain Layer optimizes speed and throughput, achieving up to 30,000 transactions per second with 100ms block times thanks to Arbitrum Orbit. This layer addresses front-running and harmful MEV by ordering transactions on a FIFO basis.
The Protocol Layer breaks the chain into modular components such as liquidity protocol, derivatives clearing protocol, stablecoin protocol and governance protocol which trading applications can choose to use to achieve unparalleled DeFi capabilities.
Reya network has developed a new pegged constant product mechanism. Uniswap popularized the CPMM (Constant Product Market Making) formula which underlines most DEXs. Essentially, the formula goes: x * y = k (the curve above) , where x and y are the quantities of two assets in a liquidity pool, and k is a constant. This ensures that any trade, regardless of size, maintains the product of the assets’ quantities as a constant. Prices adjust based on the relative supply and demand, providing continuous liquidity but potentially leading to higher slippage for large trades compared to traditional order books. If you are curious how it works in detail, checkout Uniswap V1
Reya used this same idea to develop constant product pegging mechanism to price trade price of a derivative close to the spot price. Whenever someone takes a trade ex: Trader A longs 60 $ETH, the pool acts as a temporary counterparty which makes up the market’s net imbalance: every trader comes in and trades against the pool, and as the pool nets off long and short positions against each other, it retains only a net exposure. So in this case, net exposure is -60 $ETH because pool by default goes short since trader A went long. If Traders B and C comes in and shorts 30 $ETH each, the net exposure becomes 0. So net exposure is long open interest - short open interest and max exposure is maximum amount of $ETH that can be taken as leverage based on pool’s liquidity.
The above formula controls trade price based on how much maximum exposure is available and the current net exposure.
I know that was a lot of math, but the net exposure part is essential and key to this design. If a trade makes net exposure closer to 0, it puts less weight on the pool and give you a better price.
This design leads to the following:
If there is no net exposure the trade price is the spot price
Design disincentivizes trade price to deviate from spot price
Trade price is automatically adjusted based on liquidity and trade size
Funding rate is automatically adjusted
LPs can passively (don’t need to manage price range) offer liquidity at collateralization ratio of less than 100% of nominal
But that is not all, the cherry on top is Cross-Margining. Reya’s passive LP pool acts as a liquidity layer for all Dex’s on top of Reya and each user gets two accounts: Trader margin account and Passive pool margin account. 1 margin account for all DApps on the network. 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.
This allows traders to:
Offset losses from one position with profits from another one as well as leverage all portfolio profits immediately
Offset and reduce margin requirements by recognizing the P&L offset that can happen between positions
Offset both P&L and margin across exchanges by aggregating all positions into a single settlement and clearing layer
Here’s an example to better illustrate this point- Let’s say you want to long ETH/BTC ratio, to do this you can long $ETH in GMX and short $BTC in Hyperliquid (assuming both of these DApps are deployed on Reya) The network would automatically offset gains and loses from both positions since both DApps use Reya’s liquidity layer.
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.
According to Reya’s docs - In simulations using Synthetix orderflow for ETH between April and December 2023, Reya’s liquidity design would have provided an APY of 65% compared with the actual returns of 12% on Synthetix.
If Reya’s design sounds mind blowing to you, read on to learn how to farm it!
How to Farm Reya
Fortunately for us, Reya has posted a detailed incentive program guide which we can use to best position outselves. They use XP, Boosts and Ranks to classify users. The core principle of these metrics is to “reward the absolute size of users’ contribution while still significantly rewarding smaller but consistent contributors.” and “have adaptable incentives mechanisms that allow for increased incentives in the initial stages, and generally when needed in the future”
Experience (XP)
This is the most important metric in the incentive program. The goal is to incentivize liquidity and trading in the initial stages of the network till it reaches a stable point with more active users. There are 4 ways users can earn XPs and the amount changes based on network requirements. LPs get XP to stake assets and to hold them, traders get XPs to take on a trade and balance open interest.
1. Earning XP by Trading
Trade Execution: You earn XP immediately once a trade is executed.
XP Credit: You get 0.5% XP of your traded amount (notional).
Random Boost: Each trade may get a random boost, up to 100x, increasing the XP earned.
2. Earning XP by Network Staking (LPs)
Passive Pool: LPs earn XP by depositing into the passive pool and holding
XP Rate: Earn 0.1% of the nominal value per minute. For instance, for each $1,000 deposited, you earn 1 XP every minute.
3. Earning XP by Holding Exposure
Open Interest (OI): XP is earned based on holding exposure to assets, measured through OI.
XP Rate: Earn 0.01% of the approximate OI per minute. For example, with $10,000 OI, you earn 1 XP per minute.
4. Earning XP by Rebalancing Trades
Rebalancing: Traders earn XP by helping rebalance the passive pool.
Funding Rate: XP is earned based on changes in the funding rate.
Calculation: XP earned = α × standardized price × base × (change in funding rate).
Example: If the funding rate goes from 10% to 40% while you hold a short position of -$10,000, you earn 3,000 XP (assuming α = 10,000).
To earn most XP with least capital, frequently execute small trades. With this strategy, you can take advantage of the immediate XP credit and the potential for random boosts, maximizing your XP for the least amount of capital invested. If you are a good trader, rebalance trades to earn higher XP
A more passive approach would be to just provide LP and hold.
Boost
Boosts are luck based and layered on top of XP accrual system. Since you don’t have much control over them, try to optimize XP accrual and hope to get the highest boost possible.
Boost for trading: For a limited number of trades each day, users can draw a special boost that applied to the notional match XP earned on that trade.
Holding an LP deposit: Every 48h, users can draw a random boost ranging from 1x to 10x which applies to the entirety of their LP deposit.
On the app, you should see the option to turn on boost, simply select it to get boosts.
Ranks
Rank is based on XP relative to other users. The weekly ranking event occurs each Monday at Midday GMT after the RRE. At the Weekly Ranking Event, the top and bottom 10% of wallets per Rank are levelled up or down.
Seasons take place over multiple weeks. Season OG started at the LGE (Liquidity Generation Event) and will end on 30th June 2024. Within a Season, there are weekly ranking events where you can level up or down your Rank. Rewards are determined at the end of the season based on the Season’s snapshot of your Rank, as well as your XP. Thus, the objective is to finish the Season at the highest Rank with the most XP possible.
Reya has a potential to disrupt DeFi with their novel design. Reya is run by a team of DeFi OGs with multiple successful start-ups launched in the past, including Voltz Protocol, which grew to over $30B of notional traded within just 12 months. They have raised almost $10M from VCs, including Framework, Coinbase and Wintermute.
In my opinion, farming Reya is one of the best opportunities available in the market, especially Ethereum ecosystem with just USDC or ETH.