Pathfinder: Unlocking advanced yield strategies with Mars’ Farm vaults

Mars Protocol
8 min readMay 11, 2023

Mission briefing:

  • Learn how LPs use Mars’ Farm vaults to earn more on their Osmosis LP positions
  • Explore how small decisions — such as the asset you elect to borrow — can alter your risk profile and have big impacts on your returns
  • See how Farm vaults lay the groundwork for Mars v2

Leveraged yield farmers are the tip of the spear on Mars. These bold pioneers aren’t merely content to lend and borrow from the Red Bank. Instead, they suit up and enter the exotic and dangerous Fields of Mars in search of Mars’ mythical Farm vaults.

In this article, we’ll explore how those fabled vaults use leverage to boost your yields, and how seemingly small decisions when you enter the vaults can have big impacts on your risk profile and returns. But first, let’s review how the vaults work.

Mars’ Farm Vaults

Vaults act like yield-harvesting robots — i.e., they help users interact with various staking/LPing smart contract systems in a more efficient way. Simply choose your desired leverage and put your tokens to work with a given vault’s pre-programmed strategy.

Currently, Mars offers three Farm vaults, each of which enable leveraged yield farming for the following pools on Osmosis:

  • OSMO-ATOM
  • OSMO-axlUSDC
  • stATOM-ATOM

Let’s explore how they work by imagining a liquidity provider (LP) who wants to enter the OSMO-ATOM liquidity pool on Osmosis. They could do that directly at app.osmosis.zone/pools. However, they’d be limited to the number of OSMO and ATOM tokens they hold.

Traders who want a larger pool position — one using leverage — can turn to Mars’ Farm vaults instead. There, LPs can deposit one token (one side of the pair of LP tokens), and use it as collateral to borrow another, thereby entering the pool with a bigger size.

For example, a user could deposit $100 in ATOM, then borrow $100 worth of OSMO to initiate a leveraged vault position. In the background, Mars smart contracts do the following:

  1. Deposit the user’s ATOM and their borrowed OSMO into the relevant liquidity pool on Osmosis
  2. Send the LP tokens to Apollo DAO’s auto-compounding vault to stake the resulting LP tokens

From that point forward, the depositor will collect trading fees from the pool. And the vault will regularly harvest all OSMO rewards as well — using them to auto-compound the underlying LP position so that the user acquires more OSMO-ATOM LP tokens over time.

The image below illustrates at a high level how the OSMO-ATOM strategy works.

Risk vs. reward in the Fields of Mars

Osmosis LPs can provide their liquidity directly on Osmosis, or they can enter a Farm vault to use leverage in an attempt to maximize their rewards. How much bigger could those rewards be? The table below shows the different returns (denominated in the pair’s base asset) that were possible as derived from the borrow and reward rates at the time of this writing. Remember that rates (including borrow rates) are volatile and change in real-time. APYs can also be impacted by impermanent loss on the underlying positions.

Two things jump out immediately. First, the rates on Osmosis are quoted as “APRs” while the rates on Mars are quoted as “APYs.” What’s the difference?

APR refers to “Annual Percentage Rate” and APY refers to “Annual Percentage Yield.” Both financial metrics are used to express the interest rate on a position. The key difference lies in how the interest is compounded. APRs represent the rate without considering the effect of compounding while APYs take compounding into account.

LPs who deposit their tokens directly into Osmosis’s smart contracts could earn a slightly higher rate, for example, by periodically claiming the OSMO rewards on their positions and using them to compound their LP positions.

Using Apollo DAO’s auto-compounding strategy, Mars’ Farm vaults do this automatically. And since returns are auto-compounded on Mars, that means all rates are calculated as APYs instead of APRs.

The second thing that jumps out is the fact that Mars users could — in some cases — earn more than twice as much on Mars as they could by LP’ing directly on Osmosis. So why doesn’t everyone use Mars?

Because there are risks involved. These risks are covered in-depth here, but they include:

  • Liquidation Risk: A fall in the value of your collateral or a rise in borrowing rates, which could trigger a liquidation of your position
  • Impermanent Loss Risk: That is when a user’s deposits experience a temporary loss of value compared to simply holding the original assets. This risk exists for LPs who pool tokens directly on Osmosis. However, just as yields are compounded when LPs use leverage, so is IL.
  • Smart Contract Risks
  • Oracle Risks

In general, leveraged yield farming requires more active management or monitoring of your positions as you seek higher yields. And by carefully choosing which asset you supply and which asset you borrow in a given Farm vault, you can lower your risk of losses. Let’s look at how that works.

How the assets you supply and borrow impact your positions

Borrow rates on Mars are determined by supply and demand. The table below shows the borrow rates in the Red Bank at the time of this writing.

At the time of this writing, ATOM had the highest borrow rate. At those rates, users who entered the OSMO-axlUSDC farm by borrowing axlUSDC, were paying ~34% less (assuming 2x leverage) than those who entered by borrowing ATOM (remember rates can change in real time).

Not only does the asset you choose to borrow impact your returns, it can also influence the volatility of your LP position. For example, assume you deposit OSMO and borrow axlUSDC to enter the OSMO-axlUSDC vault. By doing that, you’re essentially making a leveraged bet on OSMO’s price direction. Why? Because if the price of OSMO goes down, the value of your collateral falls — you lose money — and your risk of liquidation increases. If the price of OSMO goes up, the value of your collateral rises — you make money — and your risk of liquidation decreases.

Now, what if you deposit axlUSDC and borrow OSMO with leverage?

You’re actually taking less risk than you would be if you borrowed axlUSDC. That’s because movement in the price of OSMO can be offset by your borrowings.

If OSMO goes up, your net return is 0% minus any impermanent loss. That’s because the OSMO you borrowed is increasing in value along with your borrowings. Meanwhile, the value of your collateral (axlUSDC) is unchanged.

Likewise, if OSMO goes down, your net return is 0% minus any impermanent loss. That’s because the OSMO you borrowed is decreasing in value.

This is important because it means that even if you leverage your position at 2x+, it should be LESS volatile than it would be if you’d borrowed the same amount of axlUSDC.

So, advanced farmers can deposit axlUSDC and borrow OSMO, and theoretically apply more leverage than farmers who do the reverse (deposit OSMO and borrow axlUSDC).

Note that all LP positions are rebalanced by the vault. As it auto-compounds OSMO rewards, your leverage will decrease over time. To maintain the same level of leverage, you’d need to borrow additional tokens.

Farm vaults are just the beginning

The true power of Mars lies in its credit accounts. Currently, all Farm vault positions require their own standalone credit account. Specifically:

  1. Each Farm vault requires the creation of a credit account, which is wrapped in a transferable NFT
  2. The credit account is granted access to borrow specific assets from the Red Bank for specific actions (i.e. auto-compounding a single LP position)
  3. When a Farm vault position is created, the credit manager (the smart contract controlling all credit accounts) monitors the health factor and LTV ratio of positions, and when required, manages liquidations

If and when Mars v2 Rovers are launched, credit accounts will become far more powerful.

Rather than holding a single position, Rovers will allow you to create many positions in a single credit account. All the collateral in those positions can be aggregated and used to borrow more capital from the Red Bank.

That means users could enter a vault and use that position as collateral to enter another vault or — pending later approval by the Martian Council — engage in spot trading, margin trading, leveraged staking, lending, borrowing directly from the Red Bank and more.

Since everything’s on-chain, all the positions in a specific Rover will be managed by a single liquidation point. Since each Rover will also be represented by a transferable NFT, credit accounts should unlock novel DeFi use cases throughout the Cosmos and beyond.

Get your hands dusty

The simplest way to learn about Mars’ Farm vaults is by using them. You can even use them without borrowing ANY tokens at all. Simply make a single-sided deposit, and let the vault do the rest. It will convert half of your position into the other side of a token pair, then LP your tokens on Osmosis and auto-compound your OSMO rewards. Keep in mind that the usual risks apply even for unleveraged farming.

Already familiar with leveraged yield farming? Suit up and voyage into the Fields of Mars to explore the latest yields and rates now at https://osmosis.marsprotocol.io/farm.

🔴

Follow Mars on Twitter, join the Mars Discord for community support, and subscribe to Mars’ email newsletter for the latest updates from Mission Control.

About Mars

Mars is a novel interchain credit protocol primitive facilitating non-custodial borrowing and lending for the Cosmos ecosystem and beyond. Its hub and outpost architecture allows Mars to operate on any chain in the Cosmoverse, and enables a new primitive: the Rover. Rovers can give their pilots DeFi superpowers to engage in virtually every governance-approved activity they might encounter on a centralized exchange: spot trading, margin trading, lending and borrowing — all in a single decentralized credit account represented by a transferable NFT. Explore it now at marsprotocol.io or in the Mars v2 Whitepaper.

DISCLAIMER

Engaging in leveraged transactions may be legally restricted in some jurisdictions–please consult your own legal counsel and adhere to your local laws/regulations. Remember, Cosmos, Osmosis, and Mars are experimental technologies. This article does not constitute investment advice and is subject to and limited by the disclaimers and other information contained or referenced in the Mars FUD Bible which you should review before interacting with the protocol.

--

--