Levana Protocol and Levana 2.0 - By Levana Team

working on leveraged trading in Cosmos built on Juno.

Levana Protocol and Levana 2.0 - By Levana Team

Disclaimer - This is part of our outside perspective series. Curious Cosmonaut Research is not the author we are simply highlighting some good threads and perspectives on the Cosmos ecosystem with their permission. We also, therefore, do not guarantee their accuracy.


Author:  Levana Team

Source: Blog

Introduction to Levana Perps v2

Date: September 1, 2022

TLDR: Levana Perps is awesome and has a lot of advanced tech under the hood!

Want to get started playing with it on testnet? Check out this tutorial to jump into testnet!

https://beta.levana.exchange/

Introducing Levana Perps v2

Why design a new perpetual swap?

Levana intends to become the most widely used decentralized perpetual trading platform in all of crypto. In order to accomplish this, Levana is introducing a new type of perpetual swap to the market, the Levana Well-Funded Perps Model.

Currently on Juno Testnet

Imagine a perpetual swap that has no bridge or stablecoin risk. Imagine a perpetual swap with no insolvency risk. Imagine a perpetual swap that can support thousands of assets across hundreds of blockchains. The Levana Well-Funded Perps Model brings this to Levana Perps v2.

Levana Perps v2 is significantly different from the perpetual swap system Levana launched on Terra’s testnet in February 2022. After the Terra crash in May 2022, many perpetual swaps suffered significant challenges both technically and economically.

After the crash the mission of Levana Perps v2 became clear: build something that solves the major problems found within the majority of perpetual swap applications currently released in the world of DeFi. We believe that our Levana Well-Funded Perps Model achieves this.

TLDR: Problems with many current perps platforms

  1. Exchanges become insolvent when the market moves in an extreme manner quickly
  2. Exchanges are dependent on stablecoins and bridged assets, which brings significant risks
  3. Exchanges require huge pools of capital to support moderate trading volumes (never capital efficient)
  4. Exchanges cannot easily be ported to many different blockchains
  5. Exchanges have high fees which are inflexible and difficult to predict

Finding and building solutions to these problems became the MVP for the goals of Levana Perps v2. Now, let’s break down the problems and their real world risks in more detail:

Goal #1

Build a perps swap that cannot become insolvent.

Insolvency means that the exchange has commitments of payout larger than the TVL (total value locked) in the platform. Imagine Luna is crashing, and suddenly the vast majority of market participants go short 10x, and liquidity providers, participating in the platform’s risk fund or insurance fund, remove liquidity. The platform is left with millions of dollars of short positions which are entitled to pay out, but the money is not there. This causes a bank run where only the first traders can get a portion of their winnings, and the rest are left with nothing as the exchange is bled dry.

A future post will outline the exact failure of these mechanisms and a few real world examples of where perpetual protocols using the vAMM model encountered insolvency.

Goal #2

Build a perps swap that can incorporate, but doesn’t rely on stable coins.

With the collapse of UST, it became apparent that the most robust perpetual swap platform would have no requirement in its architecture to use stablecoins. While stablecoin-backed positions powered by oracles are a great method to gain leverage access to any asset, there will always be a risk that the underlying stablecoins may face depegging or censorship.

Levana Perps v2 was redesigned to support opening and closing positions only in crypto assets with no need for stablecoins. At the same time users may choose to get access to more exotic assets, such as real world assets, or crypto assets not native to the chain of the exchange.

For example, if you wanted to gain exposure to DOGE coin on Levana Perps v2 running on Osmosis, you could open a position collateralized in wDOGE (not sure it exists today on Osmosis, but in theory it could) which was bridged to Osmosis, or you could open a stablecoin collateralized leverage positions using axlUSDC.

Goal # 3

Be simple to use.

Onboarding new users to an advanced tool such as perpetual swaps has always been a challenge. Levana Perps v2 focuses on a minimalistic user interface with a focus on attracting first time traders. Through Levana’s community and ongoing educational material, we aspire to bring on a new generation of traders using perps to augment and enhance their existing trading strategies.

Why are perps important?

Perpetual swaps are an important finance tool for a growing decentralized financial ecosystem. Perps offer two important financial tools not available in the spot market: shorting and leverage.

Leverage enables a trader to trade like a whale even if they are only a minnow. By taking on leverage you can minimize the extent of your total loss while optimizing your profits on a successful trade. Because the system cannot go into debt, your total exposure is the collateral you deposit into the platform.

Shorting offers traders a way to profit from a bear market. In addition, shorting presents a valuable tool to hedge an exposed position on a 3rd party platform. Liquidity providers, stakers, lenders and other strategies which require directional exposure to an asset can all be hedged via short positions which can be held open for an extended period of time via Levana Perps.

What problems exist in the world of perps today?

Centralization

Many existing perpetual swap platforms rely on a central operator or small set of operators to manage an order book. While this provides fast and low cost order matching, it presents a problem regarding a single choke point for the platform. Levana Perps does not rely on an offchain orderbook to open or close positions.

Insolvency

Many existing perpetual swap platforms are not designed to prevent insolvency in a market meltdown or run-up. The Levana Well-Funded Perps Model is designed from the ground up to only enable positions to be created where locked capital ensures the platform will always be able to distribute assets to winning positions.

Hard to kick start new markets

Most perps platforms have difficulty adding new markets because of the high capital requirements of new markets. If a perpetual swap liquidity pool targets a 10%-20% utilization ratio, then in order to open $1M of positions, $5-$10M of capital is required. Levana Perps targets an LP utilization ratio above 50%, meaning less capital is required to start a new market and lower fees can be offered to traders.

Contagion risks of LPs

Some perpetual platforms use a pool of varied assets (Or a risk fund covering multiple markets) consisting of popular cryptocurrencies and stablecoins to act as the liquidity pool traders borrow against. The benefit of this approach is a partial solution to the capital inefficiency mentioned in the previous section. The disadvantage is the contagion risk of a single or multiple asset collapse within the liquidity pool. When liquidity providers are forced to be exposed to all assets in a pool, it can be unclear exactly what risks the LP is being exposed to.

Imagine if a pool targeted a 10% composition of a fictitious coin “Hamster Coin”. Now imagine that an exploit suddenly caused Hamster Coin to drop to near $0. Initially the pool will drop in value by around 10%, giving a haircut to all liquidity providers.

But it gets worse! The pool will attempt to rebalance the falling asset back to 10%, which opens an attack vector for arbitrageurs to flood more and more Hamster Coin into the basket. Depositors of the worthless Hamster Coin will now own a disproportionate amount of LP tokens in the pool which can be redeemed for more valuable assets.

This contagion risk prevents these platforms from freely taking on new, maturing markets. By siloing liquidity, Levana Perps can safely launch new markets without the fear of negatively impacting existing markets or liquidity providers. In addition, liquidity providers can have granular control over which markets they want to contribute to.

Cascading liquidations

Many existing perpetual swaps suffer from cascading liquidations. A cascading liquidation is when one position opening or closing on the exchange can cause another position to be forced into a liquidation, which in turn causes more to be closed, similar to a domino effect.

Levana Perps removed the need for an internal market price, thus preventing multiple attack vectors, both from malicious actors and from strong internal market movements negatively affecting open positions.

High/inflexible fees

The majority of the existing perpetual swap platforms in the market charge continuous fees based on the entire size of the leverage position. Levana Perps offers traders the ability to customize their fee structure based on the max gains associated with their position. A trader can add an automatic take profit to their position in exchange for a significant reduction in fees.

Because fees are flexible, many new strategies can be applied to this model that were not possible before, such as market neutral AMM liquidity providing and market neutral staking.

Coming soon

In upcoming blog posts you will learn more about Levana Well-Funded Perps:

  • Unique use cases and farming strategies using Levana Perps
  • The big vision for Cosmos and a modular Perpetual Swaps platform
  • In depth comparisons between Levana Perps and existing popular platforms
  • How the Levana Perps v.2 math works under the hood
  • Tutorial on making your first trades on Levana Perps via Juno Testnet

Levana 2.0 - November Update

Welcome to the Levana Q4 Update: Levana 2.0

The past 6 months have been a challenging time for everyone. The Terra crash, the following Crypto Winter. No one in crypto, and certainly not in crypto DeFi has remained entirely untouched. While challenging, Levana has used this time to aggressively streamline operations, redesign models, iterate and build, and deliver what we hope will be radically different DeFi Perpetual Swaps (Perps) for Cosmos.

In the process, we’ve had to say goodbye to beloved members of our team, put some fan favorite projects into (what we hope is) a temporary cryo chamber, create new ways to engage the Cosmos ecosystem, and develop unwaivering laser focus for our forthcoming mainnet launch of Perps.

The team remains grateful and humbled by the Levana community who have supported and encouraged this transition. We’re honored to be building for you.

Before we jump into what comes next, here is an overview of what Levana has accomplished over the last 6 months.

  1. Built a Terra Wallet Migration system to move to any chain
  2. Researched the blockchain landscape for DeFi and NFTs
  3. Minted Rekt Dragons on Ethereum
  4. Launched 3 games on Juno
  5. Launched the Dragon Cave on Juno
  6. Migrated/Warped the majority of our NFTs from Terra Classic to Juno
  7. Invented a new type of Perpetual Swap
  8. Launched Options trading platform on a Juno Testnet
  9. Launched Perps trading platform on a Juno Testnet
  10. Launched Perps trading platform on the Osmosis Testnet
  11. Built a market simulator / modeling tool to analyze economic attacks on leverage markets
  12. Launched a Juno validator
  13. Launched an Osmosis Validator
  14. Launched a multipurpose multisig signing tool for many Cosmos networks
  15. Submitted a successful proposal to Stargaze to participate in an account bridge between Ethereum wallets and Stargaze wallets
  16. Designed a front end UI/UX for Stargaze’s account bridging

We’re calling our rebirth in Cosmos, Levana 2.0.
But enough talk, let’s dive into the future…

Levana Perps is live on Osmosis Testnet

Levana worked closely with the Osmosis team to bring Levana Perps 2.0 to the Osmosis Testnet.

It’s easy to play around with our Well-Funded testnet Perps on Osmosis, and we’ve even baked the testnet fund Faucet trading tokens and gas right into the UI.

For a quick tutorial on how to get started with Perps watch the video.

The testnet is not currently incentivized, but we’re recording wallet addresses of everyone that opens positions.

Pausing work on Levana Options

After 2 months of running a successful beta of our American style Options platform on a Juno testnet, we’ve gotten incredible feedback and insights from over 9000 community members. Thank you!

During and after the Options testnet launch, we spoke with a number of market makers and users about the pros and cons of Perps vs Options.

It is clear that Perpetuals currently has significantly more market demand than Options. While we push forward with a greater focus, we’ve also realized that working on multiple engineering projects in parallel makes it difficult to advance quickly.

In our restructuring, the Levana team has shrunk to about a dozen members and focusing on getting perps to mainnet is our most critical mission. In order to achieve this, we’ve re-focused all of our product and engineering efforts on bringing Perps to market by the end of the year.

We remain strong believers in the power of Options contracts, and look forward to returning to work on Options, after we’ve successfully launched Perps on Osmosis mainnet.

Next Steps for Perps

The team is laser focused on the following steps to get Levana Well-Funded Perps onto mainnet.

  1. Build out the front end of the LP Page (called Levana Earn)

2. Finalize an Oracle solution that allows the most flexible, and secure support of tokens, especially small cap tokens

3. Refactor for more efficient gas utilization

4. Update the UI and UX based on user feedback from the Perps Juno testnet

5. Stress test with an incentivized testnet trading program

6. Build out additional safeguards for various market manipulation attack vectors

7. Code freeze

8. Independent Code Audit

9. Fix any possible exploits found by auditors

10. Perform a public bounty program for white-hat hackers

11. Fix anything found by the bounty program

12. Launch!

Ensuring a robust and well defended Perps platform

As we’ve completed building the main trading and liquidity modules of Perps, we’ve also been carefully modeling and reviewing various attack vectors, with a focus on economic attacks.

Oracle Integrity and low volume traded assets

Our engineers and architects are focused on questions like “Where does the price feed come from, what assets are supported, how frequently are the prices updated on chain, does the feed support TWAP or vWAP? How are spikes and flash loans dealt with?” These are all considerations we’ve spent extensive time discussing, researching, and designing for, regarding our Oracle dependencies.

In any DeFi product, when liquidations are involved there are typically three major risks with regards to Oracles

  1. How easy is it to manipulate the price of the Oracle, either through manipulation of the price of the asset, or a brute force type of data attack
  2. How granular the price feed is in regards to price changes and frequency
  3. How expensive it is to run/receive a feed on the Oracle

Our initial research and testing has shown promising results combining spot prices with time weighted average prices (TWAP) with additional customizations.

We will continue to research and model various approaches to minimize the likelihood of an Oracle attack and publish a more comprehensive blogpost with our plan moving forward.

JUNO as a Practical Risk Example

Supporting the Juno community with a safe way to open short and long leveraged positions is important to Levana. Juno has an average daily trading volume of $500-$1M.

The largest trading volume of JUNO can be found on Osmosis Dex and Juno Swap

If a bad actor already owned, or was able to borrow 1 million Juno tokens (trading currently around $3), they would be able to crash the price of Juno to near $0.

If that trader took a short position with Leverage on Levana Perps, before they caused the price crash, they could deterministically profit by market manipulation, while at the same time liquidating practically all long open positions on the Perps platform.

The play would be as follows:

  1. Borrow $3M of JUNO tokens
  2. Open a $1M 30x leverage short position on Levana Perps
  3. Dump $1M of Juno on Osmosis Dex
  4. Dump $1M of Juno on JunoSwap
  5. Close the short leverage position in profits
  6. Use the cash from steps 3 and 4 to buy back Juno tokens at a lower price
  7. Pay back the loan
  8. Profit!

This is just one example of a way that low volume tokens can be used with a leveraged market to profit from price manipulation.

We’ve designed a few approaches to combat these economic attack vectors using artificial slippage, time weighted average prices, and automatic stop outs when attacks are suspected and continue to work on additional ways to protect the protocol from financial threats.

Why bother with low-volume tokens?

Levana believes in the future of Cosmos and the importance of supporting innovation. All projects start out with low liquidity and low trading volume. Leverage and long and short markets are a foundational DeFi primitive for any emerging market. Levana aims to provide a solution to create responsible leverage for any market. In order to do this we must continue to innovate ways to provide safe and secure leverage technologies, which minimize the attack vectors from bad actors. While there will always be significant risks of total loss with any leverage market, the Well-Funded Levana Perps model design is intended to minimize those risks as much as possible.

A more detailed post on the subject will be published in the future.

Levana Osmosis and Juno Validators

Why Stake with Validators?

Levana believes in the importance of active participation in securing the blockchain through proof of stake. Having the majority of tokens within a blockchain in the top 10 or 20 validators is always a concern, and makes any chain with such characteristics incredibly centralized. To help decentralize, staking tokens with validators that are inside the active set, but outside the top 20 list, is a great method for distributing voting power more evenly across the chain, and with a safer span.

Levana is partnered with Cros-Nest, and has launched an active set validator on both Osmosis and Juno.

Show your support for decentralization and delegate or redelegate Osmo and/or Juno to Levana.

TGE/Airdrop

While on Terra, Levana published a detailed proposal for a TGE (Token Generation Event) and community airdrop. Following the Terra and subsequent broader crypto crash, we’ve been focused on finding a new home, ensuring a safe landing, and subsequent delivery of our DeFi products on our road to Mainnet.

Our previous tokenomics and airdrop proposals from Terra still need to be reviewed, redefined and updated based on the realities of the market crash, updated regulatory environments, and current market conditions. We remain committed to the participants in our games, social media, the Levana DAO, our community, and early contributors.

We expect to publish more specific guidance about the TGE/Airdrop before the end of the year.

Litepaper/Whitepaper Update

The Levana Perps whitepaper and litepaper have been written from the ground up to focus on our new model, called Well Funded, of Perps v2.

The litepaper is landing in November, with the whitepaper following by the end of the year.

DAO related Regulatory Concerns

The recent actions of the CFTC against the DAO members of the margin trading platform Ooki DAO demonstrate a continued alienation of the US market from the future of DeFi.

In order to ensure that Levana continues to remain its distance from interaction with US markets and any other markets which have taken similar stances, measures will be taken to block US and other restricted market participants from participating in the Levana DAO. Meaning persons located in restricted markets will not be permitted to receive airdrops of the Levana DAO governance token, will not be permitted to participate in governance votes, or to use any DeFi platform created by Levana.

GameFi and Entertainment

Given the laser focus on getting perps to mainnet, the loss of capital in the Terra crash, and the unclear regulatory landscape regarding DeFi and GameFi, we have proposed to the community to spin off the GameFi and NFT portion of Levana into an independent DAO that is more suited to realize the original vision of the project. This news has been met with mixed feedback from the Levana community, but we are hopeful that with proper planning and independent leadership, a Levana GameFi/NFT DAO will be embraced and lead by the community.

On Terra, Levana was a strong community of thousands of players and supporters with a rich rich, full of deeper meaning and insights. The Levana lore is set 450 years in the future, where Levana’s community of 10,000 players hunted more than 41,000 evolutionary meteor NFTs, cracked them open to reveal magical meteor dust and four tiers of outrageous dragon eggs, and then nested their eggs, evolving, nesting and eventually getting them ready for hatching on a new home. Levana players also competed in a 2 month Faction War, where the 4 Factions that controlled different aspects of future Mars settlements, bravely battled over a number of months to dominate and control the future of future humanity. Power was awarded to each player and dragon in the form of Spirit Level, which in Levana games, is power, and the key to unlocking safe passage, and the future of the story.

You can play 3 different live mini games for the Juno network in our Dragon Cave

Levana Dragons

More than 55,000 Levana NFTs were re-minted on Juno in September, belonging to more than 16,000 unique wallets. Currently traded on Loop Marketplace, Levana NFTs remain the most traded of any NFT collection on Juno.

Rekt Dragons /Stargaze

Levana also has an ETH based NFT project called REKT Dragons. These irreverent dragons were created during the crash to bring some light and silliness to our community during our escape from Terra. The REKT Dragon owner community will soon be part of an ambitious onboarding experiment on Stargaze. Levana submitted a proposal to the Stargaze community, which was passed in October. The related REKT Dragons snapshot happened at ETH block:15453114, and we’re currently working closely with the team from Stargaze to deliver on the proposal. The project includes both an onboarding and mint experience for Crypto Winter Pals, and the promised Stargaze airdrop for owners of REKT Dragons at the time of the snapshot. Current Mint/Airdrop date on Stargaze is set for December 2022.

Spirit Level

Spirit Level is a unifier which allows the rarity of multiple types of Levana NFTs to be compared in an easy manner. Spirit level will be a critical element in any large scale game that Levana may build in the future. After the crash of Terra and the loss of the funding to build out a large-scale game, Levana put on hold the use of Spirit level and all work associated with the game the spirit level will be used for. Levana is putting all of its focus on bringing useful, real yield leveraged products to mainnet. While Levana cannot commit to any future game development, upon the financial success of these products, we are optimistic that there will be a way to move forward with the vision of building a large-scale game either by Levana directly or a DAO created by the Levana community.

In order to reduce the variety and quantity of Levana NFTs in the market, we will be releasing a mechanism where NFTs can be merged or consumed, while preserving spirit level.

4 Project Cosmos NFT Tournament

Working closely with 3 other leading NFT projects, Levana is working to bring a cross-project gaming Cosmos NFT Tournament to life, with awesome prizes contributed from each team for both team and individual awards. Expected to go live by the third week in November and lasting approximately one month. Visit the Levana Discord for more details and sign-up opportunities.

Council Labyrinth

The next mini game in the Dragon Cave is the new Council Labyrinth. A swashbuckling adventure for Levana’s own heroine Zahava to rescue secrets from the Labyrinth of the Council, defeating mutant animals and Guardian destroyers in her path. Any Levana Dragon Rider with a staked dragon rider avatar in the Levana Dragon Cave can play to win. Expected release date: mid November of 2022.

Lore Update

The Levana Comic passed 80 pages, this follows the first 9 chapters of the book. We intend to release the comic as a Cosmos NFT in Q1 next year, or at an opportune moment in the Cosmos NFT market.

You can sign up with your email to read the comic in its current form.

The Levana audiobook includes the first 10 chapters of the novel, which can be listened to as narration from our recorded twitter spaces.

What’s Next for Levana?

Despite the market downturn, we remain incredibly optimistic about the future. We’re excited to get to mainnet on Cosmos with Levana Perps, launch a token, and grow the DAO.

To keep up to date with Levana’s progress, follow us on Social Media and subscribe to our mailing list.

Join our mailing list: https://bit.ly/LevanaNewsletter

Join our Discord: https://bit.ly/discordlevana

Twitter: https://twitter.com/Levana_protocol

Telegram: http://t.me/levanaprotocol

Read the lore: https://bit.ly/LevanaLore