Thanks to Sam and Hameed for feedback.
TL;DR
1-click leverage pool where FRAX users can take a leveraged positions on a variety of tokens without the risk of liquidation.
Motivation
Most stablecoins offer a leveraged position on ETH or other tokens. In Maker this goes as follows: you deposit ETH, borrow DAI and use this DAI to buy more ETH. Now you have increased your ETH exposure, but you also risk liquidation. If the price of ETH falls you can get liquidated.
We want to offer leverage without liquidation risk, you can simply deposit your FRAX, choose to leverage long or short and you will have a non-liquidatable position. The pool will keep your leverage constant, this means you cannot run out of collateral and cannot get liquidated. You can easily exit your position and take out your FRAX plus/minus your gains/loses.
How does this work?
We have three pools filled with FRAX: the long pool, the short pool and the liquidity pool. Users in the long pool have a long position, users in the short pool have a short position and users in the liquidity pool have either a long or short position, depending on if we have more longs or more shorts.
We have an Oracle that gives the price of ETH at certain intervals. You can enter/exit any of the three pools. The price that you enter/exit will be the next oracle price, so you cannot gain an advantage if the price has moved since the last Oracle update, because you always have to wait for the next price.
At every interval we update the positions in the pools based on the price change since the last Oracle update. Suppose you are 100 FRAX long with leverage 2x and the ETH price moved up 1%, you have gained 2% leaving you with a total position of 102 FRAX. If the ETH price fell by 1%, you would have lost 2%, so you would have 98 FRAX left. After this calculation, your leverage is reset at your original leverage. If you are leveraging via Maker your leverage increases when you are losing and decreases when you are winning. We keep it constant, to lower your downside and increase your profits.
How do we keep longs and shorts aligned?
For every long position we need a short position and that is where the liquidity pool comes in. If we have more longs than shorts, the liquidity pool provides the missing short position and vice versa if we have more short positions than long positions. When even the liquidity pool has insufficient liquidity, the leverage of the largest pool is lowered slightly. We want to incentivize taking long positions when we have more shorts and short positions when we have more longs via a funding rate. This funding rate is an interest rate paid from the larger side to the smaller side. The liquidity pool is always on the receiving end of this, so is always earning the funding rate.
Are there trading fees?
To avoid Oracle manipulation we need to charge a small fee. This fee will accrue to the liquidity pool holders, because they are the ultimate counterparty of every trade. This also gives them an extra incentive to contribute to the pool.
Benefits for the FRAX protocol
- FRAX is deposited as collateral, creating demand for FRAX.
- A small percentage of the trading fees or funding rate can go to the protocol.
- FRAX can take short positions on its volatile collateral, moving away from USDC as collateral and opening up the possibility to hold a significant amount of ETH or other tokens without price risk.
Request for feedback & discussion
- Questions? Please ask!
- Would you be interested in using the leverage pool or providing liquidity?