rahul

Posted on Mar 24, 2022Read on Mirror.xyz

Katana: Yield hacking on Solana

When Anatoly Yakovenko set out to build Solana, he wanted to build a blockchain that would give everyone fair access to marketplaces. His seed deck when raising their initial rounds literally said that “Solana is a blockchain at Nasdaq speed”. Finance and trading applications have always been a core priority for Solana.

The summer of 2020 is remembered by crypto natives as DeFi summer. DeFi, ie. Decentralized Finance, is an umbrella term for financial applications built on top of the blockchain. Solana launched their mainnet in March 2021. Many eth DeFi developers soon began to realize that Solana was better suited for their needs.

Today, DeFi on Solana has over 7 billion dollars locked in. The ecosystem is thriving. Solana devs are leveraging Solana’s speed and low fees to build out great products. With the Ignition hackathon currently in progress, we can expect to see a lot of new projects launch very soon. One very successful project that came out of the previous hackathon is Katana finance.

Katana wants to help you maximize your yield on Solana. In this deep dive I’ll cover

  • Options 101
  • Introducing Katana
    • What does Katana do
    • Product walkthrough
  • Funding and team
  • Future plans
  • Conclusions

Options 101

What are options

An option is a contract which conveys to its owner, the holder, the right, but not the obligation, to buy or sell an underlying asset or instrument at a specified strike price on or before a specified date, depending on the style of the option. — Wikipedia

A good way to think of options is as a contract between a buyer and a seller. The options contract gives the holder right to buy or sell an underlying asset at an agreed upon price. The contract also has an expiry date, after the expiry date the contract becomes invalid. Options lock you into a fixed price with a ticking clock.

Let’s try to understand this a bit better with an example(inspired by this). Let’s say you flip sneakers, ie. you buy new sneakers and sell them in the secondary market and try to make a profit. You go to the store and see a sneaker you want to buy. It costs 500 dollars. The shopkeeper knows that you flip sneakers and says that he has a deal for you- you can pay 10 dollars now and he will give you a coupon that locks in the price of 500 dollars per pair for the next 3 months. If it goes up in price you can come in, buy the sneaker, and immediately flip it for a profit. If it does not go up in price you only lose 10 dollars. You think that this works out well for you so you buy the coupon.

Let’s say that the price of the sneaker goes to 600 dollars within a month. This is great news for you. You can buy the shoe and immediately flip it for a 20% profit. However, there is something more lucrative that happens. Your coupon, which you bought for 10 dollars, went up in value to 100 dollars— current price(600) - locked price(500). If you can sell your coupon instead of the shoe, that’s a 900% profit instead of a 20% profit. You still have two more months before the coupon expires. You can sell the coupon to someone else that believes that 600$ is a great price and that the price will increase soon.

Now let’s look at it from the shopkeeper’s perspective. He felt that the shoe will not increase in value within three months, so he will get 10 dollars of profit for no cost. He can give these coupons to a lot of people. Those 10 dollars, even though a small amount, can start to stack up. However, since the price went up, he is legally obliged to give the shoe for 500 dollars where he could be selling it for 600 dollars

The person writing the contract “underwrites” the risk. If it is risky for the person writing the contract the option will be more expensive. If an option is cheap it means that the person writing the contract thinks that there is very little chance of the thing actually happening.

The price specified in the contract is known as the strike price. The contract can be executed at the strike price on or before the expiry date. The price of the contract itself is known as the premium.

The underlying asset in options contracts can be anything- from houses to commodities like oil and corn. The most common application of this is in stock markets, where the underlying asset is company shares. In DeFi, the underlying asset is usually tokens.

The options market is huge. For the first time ever it is on track to overtake the stock market. That means that the contracts are worth more than the underlying assets! Thanks to fintech apps, retail participation is at all-time highs. The general public has started to figure out that options are how many institutions turn a little money into a lot of money. However, the lever works in both directions. When uninformed people make risky trades they can have unimaginable losses.

Cool 99.69% loss($20k→ $65) from some 18 year old on Reddit. Source: https://www.reddit.com/user/phisiiirice/

Note that in the definition mentioned above, it says that option contracts are a right, not an obligation. This means that the holder can choose not to execute the contract. They can simply allow it to lapse. Futures are another financial derivative that requires you to execute the contract at the specified date, irrespective of price. If you have a futures contract and are not able to sell it off before the deadline, you will actually have to buy the underlying asset.

People were paying others to buy their oil futures so that they did not have to store barrels of oil.

Types of options

There are two main types of options that you can buy

  • Calls: Gives the holder the right to buy the underlying asset at the specified price.
  • Puts: Gives the holder the right to sell the underlying asset at the specified price.

The price specified in the contract is known as the strike price.

The price that the contract is sold for is known as the premium.

Calls

You buy call options if you are long term bullish of the underlying asset. This is because irrespective of the asset’s current price you have the right to buy the asset at the previously agreed upon strike price. If the current price>strike price you can immediately get a profit. The higher the asset’s value goes, the more valuable your call option becomes.

Conversely you sell call options if you don’t think that the price will increase more than the strike price.

Puts

When you buy puts you do so because you think the price of the asset could go down. If the strike price>current price, you can buy the underlying asset at the cheaper current price and sell it at the higher strike price.

Profit potential is not unlimited like call options since price can not go below zero.

Covered calls

Traders can sell call contracts without owning the underlying asset. This is known as a naked call. If the contract does not get executed, the trader gets income from selling the contract without having to spend anything. However, if the call contract gets executed, the writer will have to buy the asset at whatever price it is trading at. There is infinite downside. The upside is the price that you sell the contract for.

Covered calls are a strategy where the writer of the contract first buys the underlying asset and then sells calls against it. This trades off potential upside for downside protection. This way if the contract gets executed, the writer already owns the asset and will not have to buy at the market price. The writer will have to sell the asset at a price that is less than the market price but will not have to worry about the price rising so high that it becomes impossible to buy. There is limited downside.

The optimal outcome for the writer in covered calls is if the asset price appreciates but stays within the strike price. The writer gets income by selling call options and benefits from appreciation in the asset’s value.

Example of the possible payoffs with covered calls

Cash secured puts

Cash secured puts is an options strategy where

  • A trader sells an “out-of-the-money” put option. “Out-of-the-money” in puts means that the strike price of the put option is below the current market price(at the time of writing the contract).
  • Simultaneously, the trader keeps enough cash on hand to buy the asset if the put option is executed.

The motivation behind selling cash secured puts is to acquire the underlying asset at a price lower than the current market price, but get consistent income from premiums. If the put contract gets executed, you have an asset that you want and you got some money from the premium. If it does not, you still get money from premiums.

This is seen as a better strategy than selling “naked” puts if you are long-term bullish about the asset. In a naked put, the only income that the contract seller receives is the premium.

The worst outcome for this strategy is if the asset price drops a lot below the strike price. You will then be forced to buy the asset at the strike price instead of the much cheaper market price.

Example of the possible payoffs in cash covered puts

Why trade options

  • Leverage and non-linear payoffs: Options can turn a little money into a lot. They have a multiplicative effect on the underlying asset’s value. A 10% movement in the underlying’s value can result in a 100% movement in the option contract’s value.
  • Hedging risk: Options can be used to limit downside. If you buy a call option that ends up expiring, you only lose the money that you paid to buy it, making your downside fixed and your upside unlimited. It can also be used in conjunction with other strategies. For example, if you want to short a stock it is a good idea to buy some call options of the stock as a backup. In case the stock price ends up increasing you will be able to offset most of the losses with your call option gains.

Terminology overview

Before we go further here is a TL;DR of the finance-related terms that will help you understand how Katana works.

  • Derivatives: Anything that derives its value from an underlying asset. Options, futures, etc. are derivatives
  • Options: Contract that gives the holder the right, but not the obligation to buy or sell an underlying asset at a specified price on or before a specified date
  • Every option has the following properties
    • Writer: Person who is “writing” and selling the option contract.
    • Underlying: The underlying asset of the option contract. The asset that must be bought or sold when the contract is executed.
    • Type: Puts/Calls
    • Premium: Price at which the writer is selling the option contract.
    • Strike price: Price at which the underlying asset can be bought or sold.
    • Expiry: How long the option contract is valid for.
  • There are two types of options
    • Calls: Gives the holder the right to buy the asset at the strike price before expiry. People buying call options are long term bullish
    • Puts: Gives the holder the right to sell the asset at the strike price before expiry. People buying put options are long term bearish
  • There are different strategies for trading options. Few of them are:
    • Covered calls: The writer sells call options against assets that they own. The optimal outcome is if the asset price goes up but stays within the strike price. You get yield from premiums and have an appreciated asset.
    • Cash secured puts: The writer sells call OOTM(out of the money) put options on an asset. OOTM means that the strike price is less than the market price. The optimal outcome is if the asset price goes slightly below the strike price. You get yield from the premiums and have an asset that you are long-term bullish on.
  • Yield: The return on your investment.
  • APY: Annual Percentage Yield. The percentage return on your investment.
  • TVL: Total Value Locked. The total amount of assets in an instrument.

Katana: Yield hacking on Solana

Katana wants to make it easy for anyone to earn yield on their digital assets by allowing them to passively invest in packaged options strategies. It is built on top of Solana.

How it works

Katana supports a wide variety of assets and currently allows you to invest in two strategies- covered calls and cash secured puts. To start earning yield with Katana, you deposit your funds into vaults. Katana pools all the funds in the vault together before running the vault strategy. Each vault corresponds to one asset and runs one strategy.

Yes, you can hold L1 tokens like BTC and ETH on another L1 like Solana. More here: https://academy.binance.com/en/articles/what-are-wrapped-tokens

Katana has partnered with Zeta for order execution. All the funds in a vault are bundled and used to execute the underlying strategy.

In the case of covered calls, the assets are deposited on Zeta and out-of-the-money calls are minted with an algorithmically determined strike price. The vault then sells these call options, earning the option premium as initial yield. If the price of the asset is less than the strike at the time of expiry, the vault earns the value of the sold options. This is used to compound the underlying asset. Cash secured puts work similarly, USDC is deposited on Zeta and out-of-the-money puts are minted.

Katana determines the strike price of the option contracts algorithmically. Currently, the algorithm is a black box. Users can not see what are the factors that influence the algorithm’s decision.

Depositing and withdrawing funds

Katana strategies are all options that execute weekly. As a result, vaults operate in a weekly rounds structure. Funds that you deposit into a vault will only be added on Fridays. Same for withdrawals. Funds once added are locked in till the end of the round. You will be able to withdraw your funds only after the weekly cycle is over.

When you deposit funds into a vault, your deposit request is added to a queue. On Fridays the queue is processed and funds get added to the vault on a first-come-first-serve basis. If the vault is already full by the time your deposit request gets processed it will not be added to the vault. Your deposits start earning yield only once it gets added to the vault.

Once your funds are in the vault you will be minted “shares” that represent your ownership of the vault. These shares change over time to reflect the performance of the strategy. ie. if your strategy is profitable, your shares will be worth more than they were when minted.

Before you can withdraw your funds you need to claim your shares. The shares will be burned once the funds are returned to you. Once you claim your share you can initiate a withdrawal request. Your withdrawal request is added to a queue and processed at the end of the round. Your funds will continue to earn yield while they are in the queue.

If you don’t withdraw your funds they will automatically roll over and autocompound. You don’t need to touch it unless you want to withdraw your funds.

Why use Katana

  • Low barrier to entry: Yield farming has been a thing for as long as DeFI has existed, but it is notoriously complex and time-consuming. Katana makes it very simple to invest in complex strategies. Katana takes care of everything from strike selection to order execution. DeFi noobs get access to highly optimized strategies.
  • Sustainable yield: The primary method that most DeFi natives use to get yield on their digital assets is to stake their assets in liquidity pools and get liquidity rewards. However, liquidity mining programs are used to incentivize early users and are not sustainable. Liquidity mining incentives always tend to zero. Katana also does not resort to ponzinomics for high yield. Katana offers yield through price action. This is much more sustainable.
  • Scalable: Katana gives yield based on price action, which is much more scalable than liquidity mining. Large fund movements may affect liquidity pools quite easily. It takes a lot more to impact global price markets.
  • No impermanent loss: If you stake your digital assets you may face impermanent loss. This occurs when the price of your asset increases more than the rewards you get, meaning that you would have been better off simply holding the asset.
  • Autocompounds weekly
  • Tax saving: You don’t have multiple transactions, just deposits and withdrawals.
  • Built on Solana: This makes Katana faster and cheaper than most products doing similar things on Ethereum.

Be careful before putting a lot of your money into 5 digit APYs

Risks

The main risk when investing with Katana is the strategy risk. It is clearly specified in each vault. Apart from that, Katana faces the same risks as many other DeFi applications

  • Smart contract risk: Bugs in the underlying smart contracts
  • Oracle risk: Incorrect price feeds
  • Execution risk: The market maker fails to execute orders correctly
  • Blockchain risk: The underlying blockchain slows down or halts

Product walkthrough

Head over to the Katana app. Click on the select wallet button on the top right. Katana works with most major Solana wallets. If you don’t have a Solana wallet yet, I highly recommend installing Phantom.

Once you choose your wallet you will get a popup asking you if you want to connect to the site. You may have to enter your wallet password.

Once your wallet is connected (the connect wallet button will be replaced by your public key), click on the “Go to vaults” button.

You will be able to see all the vaults that Katana offers. You can see an overview of the vault type (covered call/put selling), the underlying asset, projected APY, your position, and a brief description of the vault strategy. You can also see a bar that represents how full the vault is- every vault has a cap on how much can be deposited into it.

Let’s go with the SOL covered call for now. Click on the SOL covered call vault.

Inside the vault, you can see the vault strategy in more detail, including the strike price and time to expiry. Katana also outlines the risks.

Choose the amount you want to deposit into the vault and click submit. You will have to approve the transaction from your wallet.

Let’s break down the deposit and withdraw widgets. The deposit widget has the following fields:

  • Deposit amount: How much you want to deposit (in SOL). You need to have the asset in your connected wallet.
  • Available: Shows how much of the vault’s asset you have in your wallet.
  • Deposited amount: Shows how much of the asset you have already deposited into katana. Note that this does not imply that it is part of the vault. Deposits are batched weekly and added to the vault only on Fridays.
  • Claimable shares: How many vault shares you can claim. You need to claim shares only before withdrawing

The withdrawal widget has the following fields

  • Withdraw amount: How much you want to withdraw (in SOL). Once you click submit a withdrawal request will be initiated.
  • Pending withdraw: How much you have asked to withdraw. All withdrawals that you initiate are added to a queue. The queue gets processed at the end of each cycle, ie. Friday. After your withdrawal request is processed you will be able to withdraw funds to your wallet.
  • Complete withdraw: Shows withdrawals that are processed. You can withdraw the funds to your wallet by pressing complete withdraw.
  • Instant withdrawal: Withdraw from your deposited amount, ie. funds that have not yet been added to the vault.

You can find a concise view of vault performances in the analytics tab. The team is also planning on adding a portfolio management screen soon.

Funding and team

Katana won the grand prize at Ignition, one of the flagship Solana hackathons of 2021. It was founded by Ayush Menon and Eric Nie.

Prior to founding Katana, Ayush worked on Laguna finance which had similar goals to Katana. The project won the Raydium price at the Solana Season hackathon. Ayush then went on to work at Delphi Digital. He was a part of the team behind Mars protocol- a money market on Terra. He did all this while being a computer science undergrad at Harvard! He is currently on leave to work on Katana full time.

Eric is an experienced DeFI developer. He also has experience building software for trading firms including Addepar and Jump trading.

Katana recently announced a $5M seed round led by Framework ventures. The round also included several other top funds including Coinbase ventures, Solana ventures, Alameda research and Founders fund.

Community

Katana has a strong community of “Samurais” that seem to love their product. They have over 35k followers on Twitter. Their Discord has over 12k members and is quite active.

wen token?

Katana currently does not have a token and does not operate as a DAO. However, there are plans to eventually transition into a decentralized protocol. Katana also wants to allow developers to permissionlessly build products and protocols on top of Katana that source yield from the base layer.

Future plans

Katana has very big plans. It wants to become the go-to yield primitive for Solana. It is expanding the range of assets it supports so that users don’t have any assets sitting simply in wallets. It also wants to add more strategies to cater to a wider variety of risk appetites.

A core area of focus for Katana is to expand the number of DAOs that hold treasury assets in Katana vaults.

Katana offers an easy way for relatively inexperienced traders to invest in complex options strategies. However, there is definitely room for improvement. They can do a better job of explaining how vault strategies work to users that aren’t very familiar with finance terminology. The withdrawal process is also quite clunky currently and can be streamlined.

Katana currently has zero fees. All the charges you incur are Solana network fees. Katana plans to let the community decide the fee structure once they decentralize.

Competitors

There are few other Solana based products such as Friktion finance and Chest finance that operate in a similar space. Ethereum also has a few companies that offer similar products. One of the biggest ones, Ribbon finance, recently expanded their offerings into Solana. Ribbon finance has over $260M in TVL. There are also products like Castle finance that focus exclusively on helping DAO treasuries earn yield.

Conclusion

Katana is one of the most exciting DeFi projects on Solana. They have a very bold mission of becoming the go-to yield generation platform for Solana. They have already seen a lot of success- from winning Ignition, to a very successful mainnet launch, to around $30M in TVL today. They are building out a great team and are backed by some of the most influential funds in this space. I can’t wait to see and participate in the growth of Katana.

Solana