Margin Dex.
Welcome, premium subscribers! Thank you for subscribing. What will be shared today and the days ahead are alpha from our Economics Design's researchers. Please keep these mails secret and do not share them with any one because these alphas are confidential. Enjoy your reading.
TLDR below. This is not financial advice.
General Conclusion
We shared about DEXes before. They are decentralised exchanges to allow for users to trade. The current popular assets being traded are assets at spot prices. A new improvement to that is margin trading. Margin trading is where you can trade more than the value of your asset. For example, you get to trade 10x the value of the asset that you have. Adding margin trading with DEX model is innovative and that is what we want to focus on today.
Margin trading is a small category in DeFi Space. Although this niche does not have too many projects, there are outstanding projects: Kashi (from Sushiswap), dYdX, Perpetual Protocol, and so on.
We recently shared about another perpetual swap mechanism in DeFi. Perpetual Swap had become the first product built on-chain for the derivatives market to achieve impressive trading volume numbers.
In this article, we share two points about Margin DEX:
-
Why Margin DEXes were born
-
The difference between 2 DeFi derivatives Protocols
What Problem Does Margin DEX Solve?
When you trade on centralised exchanges (CEX), you will connect the market through an intermediary (exchange), your money will be managed by the exchange (custodial) whether you want it or not. Because of such a centralised model, CEX exchanges are often the top target for hackers to attack.
Even the Top CEXs in the industry have been hacked, so I don’t think the problem is “was this exchange hacked or not?” but “when?”. In addition to security issues, the CEX exchange also has problems related to user fraud.
Margin DEX was created to solve most of the above problems:
-
Trustless: Users have access to the marketplace without the need for an intermediary.
-
Non-Custodial: Users will be able to control and manage their own assets and do not need to deposit them with any party.
-
Transparency: Everything will be operated through Smart Contract on Ethereum and managed by DAO in the future.
-
Permissionless: Anyone, anywhere or at any time can access and use the platform of Perpetual Protocol without restricting permissions by anyone.
Perpetual Protocol
Perpetual Protocol is a protocol that allows the issuance of perpetual futures contracts of any asset. The goal of Perpetual Protocol is to decentralise futures contracts, allowing anyone, anywhere, anytime to access and use the platform for trading without going through 3rd part.
The core of the Perpetual Protocol is the project’s protocol, which consists of two main parts:
-
Virtual Automated Market Makers (Virtual AMMs): A virtual automated market maker (vAMM) model inspired by Uniswap.
Note: PerpProtocol is looking to move away from VAMM model.
-
Liquidity Reserve: Liquidity Reserve as collateral for Virtual AMMs.
How Perpetual Works
If CEX centralised exchanges use Order Book to connect buyers (Buyer) and sellers (Seller) with each other, on DEX decentralised exchange, the two parties are connected on-chain by Liquidity Pools. Liquidity Pool allows users to Swap Token in a decentralised and unmanaged 3rd party, this technology is called AMM (Automated Market Maker).
While this is a pretty good idea, AMMs are primarily for token swaps and are not applicable to perpetual futures contracts.
So Perpetual Protocol created the Virtual Automated Market Maker (Virtual AMM): It basically uses the same x * y = k formula as Uniswap, with some key features as follows:
-
vAMMs are intended to be used as a mechanism for determining to price, not for Swap Tokens.
-
No real Assets are stored inside the vAMMs themselves. Real Assets are stored in another Pool and managed by Smart Contract.
-
There is no need for liquidity providers to provide liquidity to vAMMs.
-
“k” can be adjusted manually.
vAMM Mechanism
Perpetual Protocol’s VAMM uses the same constant product x * y = k formula as Uniswap. As the “virtual” part of vAMM implies, no real asset pool (k) is stored inside the vAMM itself. Instead, real assets are stored in a smart contract vault that manages all vAMM-enabled collateral. In contrast to traditional AMM, Perpetual Protocol uses vAMM as the price discovery mechanism, but not for spot trading.
-
Before the vAMM is initialised, the creator sets the number of virtual assets stored inside the vAMM . Let’s say $ETH is trading at 3,000 $DAI. For the sake of simplicity, we assume the creator sets the initial state on that vAMM to be 100 $vETH and 300,000 $vDAI.
-
Alice wants to buy 10x Long $ETH with 100 $DAI as collateral:
-
Alice deposits 100 $DAI into the vault of Perpetual Protocol
-
Perpetual Protocol credits 1,000 $vDAI (10x leverage per 100 $DAI) for vAMM.
-
Perpetual Protocol records that Alice currently has 0.33 $vETH and the new state in vAMM becomes 99.67 $vETH and 301,000 $vDAI.
-
Bob sells 10x Short $ETH with 100 $DAI as collateral:
-
Bob deposits 100 $DAI into the same vault.
-
Perpetual Protocol credits -1,000 $vDAI (10x leverage per 100 $DAI) for vAMM.
-
Perpetual Protocol records that Bob shorted 0.33 $vETH and the new state in vAMM becomes 100 $vETH and 300,000 $vDAI.
Funding Rate
The pricing is through vAMM Mechanism, so to combat the possibility of price manipulation, Pepertual Protocol uses an additional Funding Rate, similar to FTX Exchange, to balance the two positions:
Funding payments incentivise arbitrageurs to bring the vAMM price close to the market price.
What Makes Perpetual Different
No vAMM liquidity provider needed
Due to path independence, the vaults will always have enough collateral to pay back all traders trading against the vAMM (assuming all unsecured assets are successfully liquidated before bankruptcy). In other words, the existence of liquidity providers is not required to bring liquidity to the vAMM to work: traders provide liquidity for each order.
Since there is no need for a liquidity provider in the vAMM, there are no impermanent losses.
Kashi
This part details how Kashi works, and how it brings revolutionary innovation to L1. We want to explain the tie-up between BentoBox and its upcoming Dapps, including Kashi. BentoBox is a vault, acting as a decentralised “App Store”, where you can deposit assets inside to activate other Dapps.
As such, Kashi is a Dapp developed on BentoBox, a margin trading platform backed by its lending protocol that allows users to create lending token pairs of varying degrees, however, they assume that profits can be maximised.
How Kashi Works
Model
BentoBox is a vault that securely stores tokens and generates profits from loans, flash loans, and a strategy of generating additional profits for any protocol built on top of it.
Kashi is built on top of BentoBox, which means that Bento holds tokens and Kashi uses those assets to lend, borrow and most importantly leverage transactions with just 1 click.
In the case of Kashi, BentoBox acts as a wallet, separate from your external wallet, helping to optimise transaction times and fees.
With SushiSwap, your BentoBox assets can be used to provide flash loans, even if the same tokens are being farmed in Onsen. This provides additional revenue for you. Even if the assets are not borrowed, you can still use your tokens to earn interest or LP fees on SushiSwap, which means the asset never sleeps.
Get Started
To get started, you just need to add a SUPPY/BORROW pair, which is quite similar to adding liquidity, but with an extra element. In the future, you will need to choose different oracles in addition to the property and collateral, consider whether the property you want to lend has used oracles. So your loan pair should look like this: SUPPLY/BORROW/ORACLE.
Anyone can create a loan pair on Kashi in less than 5 minutes. You just add your assets to your BentoBox vault, select the assets you want to lend, along with the collateral you want to put up, and, in V2, choose your oracle.
The collateral you choose cannot be loaned out, and the oracle you choose is used to provide collateral-to-asset liquidity price data.
Mechanism Design
Kashi’s margin trading solution uses an elastic margin with a target utilisation rate of 70–80% for V1. Various parameters may or may not be selected in the future. This means that Sushi expects more than 70% of a given asset to be used for flash loans at any given time.
If a certain asset has a utilisation rate of less than 70%, the lending rate falls, LPers pull liquidity out of the pool, and that leads to the 70-80% recapitalisation rate that Sushi calculates previously.
This 70% figure is the target percentage of assets borrowed from the total supply. The elasticity of interest will decrease if the currency pair is not used and increase if it is overused.
If 100% of the assets are borrowed, the interest rate will be 20%. This means that LPers are incentivised to keep assets in demand on Kashi, and conversely, the elasticity finds the optimal interest rate for any given combination.
Sushi can also assume that many assets will meet this 70% minimum utilisation rate as many tokens will be available for leveraged shorting that were not previously offered to the brethren. Kashi will not use a strict screening policy on shorted assets, meaning traders have the opportunity to margin to trade higher risk assets at their convenience.
It is important to note that the risk for each lending pair is isolated. This means that high-risk pairs cannot affect other assets traded on the margin on the Kashi platform, which is one of its unique benefits and leads us to the next section.
What Makes Kashi Different
Cheap Gas Fee
BentoBox is a single vault that holds all tokens, and because it uses a master position for assets held, it eliminates countless unnecessary transactions, which reduces overall gas fees for internal token transfers. .
Kashi users can take advantage of this, as it means shorting can be done in a single trade with more than 1-time leverage.
Unique Capital Use Strategy
The Kashi interest rate elasticity is also interesting considering some of the other lending platforms. If the capital utilisation ratio is temporarily below 70%, the reward ratio will not immediately go to zero, but a lower reward can incentivise users to take out those low-demand assets.
On comparable platforms, TVL is sometimes worth several billion dollars, used as collateral but because they lack borrowers the interest is almost zero, which is not good for liquidity providers. account.
As Kashi is built to combine individual pairs of any risk tolerance, Sushi is confident that lending pair liquidity providers will be able to reap the benefits, especially on pairs. not available on the short market so far. Furthermore, the more an asset is used, the higher the interest rate and underutilisation lead to lower interest rates.
This amount of user administration is quite unique to Kashi, anyone can create a pair; It is up to the individual user to decide which assets are safe enough to lend to, but ultimately, the platform risk is segregated from just that trading pair.
Isolated Pairs Feature
For a better understanding, perhaps you should compare Kashi’s lending solution with current platforms on the market. For example, on Compound, pools are not isolated, which means that the protocol is completely affected if one of those properties is set to zero.
So Compound carefully selects which tokens they allow you to use as lending assets, but in reality, the entire pool will be very sensitive to the highest-risk asset. At Kashi, you can create loan pairs with any risk tolerance you like and Sushi pioneers in this category.
The primary purpose of Kashi will be to provide margin trading for a variety of tokens that are not currently widely available for shorting. Not only will you be able to sell more tokens, but you will even be able to take advantage of short. It is assumed that this will result in a higher volume of transactions on the associated swap pool that Sushi recommends doing on SushiSwap.
TLDR:
Both protocols serve in a potentially thriving derivatives market. Despite the common goal, the product architectures of the two protocols are vastly different.
Perpetual Protocol provides star delivery contracts using vAMM Mechanism along with a Funding Rate. Especially when the trader is also LPer for their own position. This gives them higher leverage.
Kashi is similar to a lending protocol but includes loan scalability features. That is, instead of mortgaging and getting a loan and mortgaging to get a new one, Kashi has integrated them into a single transaction. However, since the target collateral utilisation is 70-80%, the maximum leverage is quite low, theoretically x3, and Kashi offers x2 as the largest.