Problems with on-chain leverage today
Aave/Compound do not allow you to borrow more value than you deposit. Why? Simple logic, there is no way to gaurantee you ever pay back the borrowed assets. Not just that, but due to risk of illiquidity at the time of liquidation, there needs to be a margin of safety.
Bentobox improves on this by isolating the pairs, which means a smaller margin of safety can be used on many pairs. But it still exists.
This margin of safety is pretty high (as much as 20-30% on aave) since it needs to be enough even for black swan events. However this means asymmetric downside during normal circumstances. If I deposit $1000 of A and borrow $800 of B which I sell back to A … if A/B price increases by 10% I make $80 extra. If A/B price decreases 10% I not only lose $80, I also pay an extra fee to liquidators, which under normal circumstances far exceeds the actual cost of liquidating those assets.
Bentobox also allows for stacking of leverage by depositing borrowed assets and borrowing on top of them … but again, the more leverage you stack, the more asymmetric is your downside.
How do CEXes offer clean 10x leverage so easily? Simple, the assets your borrow never actually leave the exchange. If I deposit $1000 worth of A, I can buy $10000 worth of asset B using leverage. The difference is that this $10k is not withdrawable. If my net balance approaches zero, the CEX can liquidate my entire position - the collateral provided to borrow as well as the borrowed coins.
How can this be done on Sushiswap? Suppose I deposit $1000 worth of A. I am allowed to borrow $10000 worth of B, but these tokens need to stay inside a Sushiswap contract. Which means I won’t execute trades myself, since I never get physical delivery of the ERC20 tokens worth $10k. I will instruct this proxy contract to borrow assets and specify what assets I want them traded for and on which dex (presumably Sushiswap only). So I still get a lot of freedom to use those borrowed assets … as long as I only want to use them for dex trades.
Additional functionality such as using those for governance, etc is not possible - although it can be integrated on a case by case basis later. This again is similar to a CEX - if I borrow $10k COVER against $1k BTC, I can’t take the COVER off the exchange to participate in COVER governance.
The main benefit is that users can get higher leverage without a compounding safety margin. They can get safe exposure to assets far exceeding their collateral - without having to do complex operations like iteratively winding out their positions in bentobox. A safety margin will still exist, but this will likely be smaller. It will also be easier to understand.
CEXes can provide even more insane leverage (upto 100x) - by having you trade derivatives that do not require physical movement of tokens. The orderbook for that derivative is restricted to that one exchange. Which means the exchange has greater control when it comes to liquidation - since the exchange itself can act as the fastest actor on its orderbook, liquidating positions against the orderbook at light speed. No one can pull their orders off the book faster than the exchange can decide to match them to process liquidations.
This is a possible approach that could be researched. Basically - you don’t allow anyone on your exchange to make a new trade until all exisiting positions have been unwound. Which means every time a user submits a trade tx - that tx will first check that no liquidations are required first, and only then go through as a trade. This may be prohibitively expensive in gas - which is why it’ll have to be researched first.