AMM & Beyond — How to Unlock The Powers of Kashi Lending & Margin Trading

This post was originally published on SushiSwap


Sep 28 · 9 min read

We know there are many updates coming to the Sushi ecosystem and with all of the hype surrounding our AMM upgrade, Trident, we thought it was no time like the present to take a deeper look at Trident’s infrastructure, BentoBox, and its first product, Kashi Lending & Margin Trading.

One-click leverage available on Kashi now!

A Breakthrough in AMM Expansion — Kashi

Sushi is building rapidly to look beyond the constructs of an AMM-only focus. From our community contributions, we have developed a lending market with now over $1B in assets, where you can create a lending pair from an un-restricted combination of pairings and borrow tokens from a never-before-seen range of risk tolerances. Kashi isolates the risk of lending and borrowing to each individual pair within itself. The ability to isolate risk in individual pairs means that Kashi can allow users to lend and borrow assets that wouldn’t be feasible on pool-based lending platforms. Because the markets are isolated, the risks are, therefore, also isolated, unlike pool-based strategies, where high-risk tokens are restricted from being speculated on due to their potential to collapse the entire protocol, because the risk is not isolated.

The ability to create any new lending market, allows for the creation of thousands of lending markets for any token, and the ability to leverage short on an unlimited variety of tokens.

Lending Protocol for Leveraging Long/Short

Long and short exposure is one of the best use cases of a money market protocol. In the past, it was time consuming and capital inefficient to obtain leverage through the use of borrowing. First, you would have to visit a lending protocol, then engage with an AMM to borrow an asset. Next, you would swap the borrowed asset for collateral, and finally need to borrow again to “lever up.” Multiple platforms result in exuberant fees, and that doesn’t really spell out convenience, does it?

Kashi does things a little differently: One-click leverage. You can do this by selecting the option box: “Swap borrowed token X for token Y collateral” to leverage up from 0.25x to 2.0x. Check out the screengrab below to see what we’re talking about.

Let’s take the simple example of what traditionally CeFi traders may know as going long. If you wanted to open a long position on xSUSHI against USDC for example, you would engage in the Borrow USDC with xSUSHI Collateral pair.


Now let’s take a look at how we want to place our order.

We are going to use capital that has been deployed to the BentoBox to improve capital efficiency. At the top we have values of 0 as we haven’t opened a position yet. Click on the Borrow button. Repay will be used after to close your position. Next, we enter the amount of xSUSHI we wish to put up as collateral for our loan or position. We will go through some of the different scenarios with leverage to show different levels of exposure and risk.

Let’s start off with the conservative position of minimum leverage. We are only going to utilize some of the xSUSHI we have in the BentoBox for this example, so we will input 10 for xSUSHI. Please note, that any xSUSHI used as collateral could be up for liquidation, so please be mindful of your leverage amount, size of position, collateral backing, and price swings. Only use the amount of collateral (in this case xSUSHI) on the line that you are willing to risk in the event of a liquidation.

With 10 xSUSHI used as collateral, we will start off with the lowest leverage available, 0.25x. This will enable us to borrow $82.01. We want to go long on xSUSHI though, so we want to ensure we have “Swap borrowed USDC for xSUSHI collateral” selected. This will then swap the $82.01 to 8.23 xSUSHI. We now effectively have our 10 xSUSHI as collateral, plus the newly borrowed 8.244 xSUSHI for a total of 18.23 xSUSHI ($179.65), to give us the desired long exposure to xSUSHI. Should xSUSHI now increase in price by $1.25 from our entry point, we would gain $22.78 in USD value. At this point, let’s decide to take profit and close the position.

In the same pair selected, we now click on Repay (next to Borrow). As we have all of our assets in the BentoBox, we are going to repay USDC from there. We need to pay back our loan of $82.01, but we have converted this to xSUSHI. So after repaying the 8.23 xSUSHI which is now worth $22.78 more, that becomes our profit.

These are not exact figures, as we need to take into consideration slippage, LP fees, gas fees, and borrowing APR %. With a position of this size, it may not make sense to do this on the Ethereum Mainnet, but on Polygon where the gas fees are considerably less. If on mainnet, you may wish to increase the position size to make the fees worth it.

Short Position

Now, let’s look at opening a Short position. We will use the Borrow UNI with USDC Collateral pair. As we are going Short this time, we believe that borrowed asset will go down in value against USDC, so we have the USDC is on the other side as our collateral. Essentially, we want exposure to USDC while the borrowed asset declines in USD value.

So we put up $100 USDC as our collateral, and we feel bearish on UNI, so we are going to take a 2x leverage position. We are going to select “Swap borrowed UNI for USDC collateral”, effectively taking on the repayment conditions to be UNI. By Clicking 2x, we increase the borrowed amount to over 8 UNI, so ~$332.00 in total value. We will receive the USDC into BentoBox as we selected to help with gas efficiencies. As we think the price will drop from our entry at $29.20 on UNI, we decide to close out at $25.00. Once UNI hits that price, we decide to Repay. At this point, ~8 UNI at $25 = $200.00. So when we go to repay the loan of ~8 UNI with our $332.00 USDC, we will have ~$132.00 remaining, giving us a profit of $32.00 on that position.

These are not exact figures, as we need to take into consideration slippage, LP fees, gas fees, and borrowing APR %. With a position of this size, it may not make sense to do this on the Ethereum Mainnet, but on Polygon where the gas fees are considerably less. If on mainnet, you may wish to increase the position size to make the fees worth it.

With Sushi’s existing AMM ecosystem, we are very fortunate to have the ability to easily integrate swapping mechanisms into margin trading tools. This has ultimately bred what is now Kashi: Isolated lending with margin leverage.

But wait… there’s more to it!

A New Equation: The Three Variables of Kashi Lending

#1: Isolated Risks

Current lending protocols adopt pool-based strategies. However, there are unsought risks involved when all lenders deposit their assets into one pool. In the case of a drastic price movement or a hack, the pool would lose all of its money, and so will you. Kashi comes in to solve exactly that with isolated markets. The Kashi markets are in pairs like ETH-USDT, but on Kashi, there are also other markets like ETH-USDC, and if something happened to that pair, the assets lent in the ETH-USDT pair would not be affected by the USDT-ETH pair. As such, the isolation in markets allows for the isolation of risks.

Furthermore, users are able to determine their own risk profiles by creating their own markets. This method creates an experience that is customizable and reduces hurdles. A user can, for instance, seek a higher returns for borrowed out assets if they provide newer tokens as collateral, because lending markets containing newer, more scarce tokens generally offer higher interest rates to the lender. It is important to note, however, that when dealing with these newer tokens, you also increase your risk exposure, since newer tokens have a higher rate of default. On the other hand, if a user lends more battle-tested forms of collateral, the interest rate will be lower, but less risky.

A novel concept, we know, but just in case it wasn’t clear! The following is a screen capture of how it will look when you go to create your isolated-risk lending pairs. It’s important to note that at the time of writing, you can only create pairs which use Chainlink oracles for their price feeds.

#2: Elastic Rates

Kashi is also leading the innovation behind lending interest rate models. Most lending protocols have some variation of stable interest rates, which means that their way of calculating the debt of borrowers doesn’t change, no matter what other platform contributing factor there may be. On Kashi, however, interest rates are not stable — they’re elastic. This means that the closer a token gets to the extremes of utilization, the faster the interest rate increases or decreases. In other words, the market interest rate is found while having high utilization of capital.

The target utilization rate on Kashi is 80%, meaning you can borrow up to 80% of the pool’s total collateral. Kashi’s interest model, however, is not a single point deflection. There is a transition between 60% to 80% of utilization. When approaching 80% utilization, the interest rate will increase at a quicker rate — this is good for lenders, but perhaps bad for borrowers. In that case, we would see less borrowing but more lending, and the imbalance will shift the utilization down in the range. Vice versa with the utilization dropping below 60–80%, the interest rate will slowly decline.

This model is based on the

#3 Flexible Oracles:

Oracle feeds are the backbone of DeFi. Adequate oracle feeds prevent price manipulation, and improve upon the overall security of protocol users. Without oracles, users would be unable to use assets created on separate platforms, and platforms would basically be required to perform without the benefit of network effects.

Kashi’s oracle requirements are slightly more nuanced compared to other protocols, in part because Kashi generates network effects on such a large scale. In order to allow users to create any market, Kashi had to be created with the scalability of allowing many different oracles. On Kashi, when a pool is created, the user chooses from the oracles available to access the data of their relevant assets. After launching with Chainlink oracle feeds, TWAP oracle feeds will be the next option unlocked in the UI.

Kashi’s oracle feeds are intended to be customizable to enable users to add infinitely many tokens. Any oracle that conforms to Kashi’s oracle standards may be implemented.

Closing thoughts

Thanks to our community’s incredibly valuable contributions and support, Sushi is evolving beyond an AMM. Let’s tap into this adventure together, build cool stuff, and grow, as we always do!

Special contributions to this article were provided by Tangle & Kakumei 💌

Sushi is building a comprehensive DeFi ecosystem with AMM, leverage & margin trading platform, token launchpad and NFT artist platform. Follow our socials to keep up with our product launches and find out more on how you can make the most of your cryptocurrency assets with Sushi’s secure and powerful DeFi tools!

Exchange | Kashi | Docs | Discord | Twitter | Telegram | YouTube | Tutorial | Github

Leave a Comment