Liquidity Caves
The RAVE Cave(s)
Last updated
The RAVE Cave(s)
Last updated
RAVE Caves facilitate trading by providing counterparty and leverage liquidity for quanto traders. Liquidity Providers (LPs) pledge tokens into a respective token Cave and recieve a yeld-bearing kToken representing their share liquidity.
Each token has its own isolated Liquidity Cave that facilitates trades for its respective quanto token.
Caves earn yield in 3 ways:
Execution Fees: A percentage of a position's collateral gets distributed to the respective Cave each time a trade is opened and closed
Borrowing Fees: Traders pay a per-block interest rate based on the amount of leverage borrowed to the respective Cave when a trade is closed
Liquidation Bonus: Remaining collateral from trades liquidated by RAVE's liquidation engine are deposited into the respective Cave
Fees are paid in the respective Cave token and passed directly to Cave LPs.
As Caves accrue tokens from trading fees, the exchange rate of kTokens to Cave tokens increases. That is, an LP now has a claim on a larger quantity of tokens. Users claim Cave yield by burning kTokens to recieve a proportional share of tokens in the respective RAVE Cave.
The diagram below outlines the Trader and Cave relationship. For a given quanto asset, traders borrow leverage from the respective RAVE Cave to trade Perpetual Markets. When a trade is closed, RAVE determines the perpetual market's price change. Price change, as a percentage, acts as a multiplier for Net Exposure due to the quanto fixed swap rate. Tokens are withdrawn from the respective RAVE Cave to settle profitable trades, while losses from unprofitable trades are added to the Cave. At PnL settlement, borrowed leverage is returned and fees are passed to LPs.
As a liquidity provider, Cavers take a certain level of risk. A Cave acts as counterparties to all quanto trades that utilize the Cave's token as collateral. Trader losses are added to the Cave, and trader profit is taken from the Cave. As a result, counterparty trades may result in a loss for a respective Cave. These losses are isolated to the respective quanto asset Liquidity Cave. RAVE implements several risk mechanisms that aim to mitigate platform risks, outlined below.
A liquidity provider may add liquidity to an existing altcoin pool, or create their own altcoin liquidity pool. Creating pools is permissionless, meaning anyone can create a pool. After creating a pool, anyone can provide the corresponding token as LP or create trades, with the corresponding token as collateral.
Liquidity providers can remove liquidity from an existing Cave to claim rewards, up to 25% at a time every two days. The withdrawn kToken balance is burned to claim a proportional share of underlying tokens. It takes 8 days for a user to completely remove liquidity from a Cave, allowing traders in the Cave ample time to close or adjust positions.
Price Impact
The price impact mechanism employed by RAVE plays a critical role in maintaining balance within Caves by adjusting an individual trade's open price. Price impact depends on long and short Open Interest and is incurred only when a trade widens the difference between longs and shorts. This acts as a premium for trades that increase Open Interest skew. Price impact mitigates variance in RAVE by incentivizing traders to balance Open Interest in the pool.
Unlike traditional perpetual decentralized exchanges with deep liquidity of a small basket of tokens, RAVE has a wide array of liquidity pools of individual tokens that facilitate trading. Thus, the price impact factor must robust to ensure pool health and optimal trading execution. Price impact takes into account the size of the trade, the size of the liquidity pool, and the long / short balance to skew the price of each trade.
Dynamic Borrowing Rates
The borrowing fee is the most capital-efficient way of managing capital risk, limiting drawdown risk in volatile markets. RAVE's borrowing rate utilizes a two-kinked interest rate slope, dependent on a Cave's utilization rate. That is, the percentage of the Cave that is taking counterparty risk in all tradable markets.
Much like traditional funding rates, RAVE's borrowing rate is a fee mechanism that minimizes liquidity gaps between open long and short trades over time to prevent overt one sided exposure.
This utilization rate calculates the sum of net exposure for each perpetual market divided by total available Cave liquidity, all denoted in quanto token units. Total available Cave liquidity for each token is determined by the difference between total liquidity and total open interest across all markets. As utilization increases, the borrowing rates become much higher, minimizing risk to liquidity providers.