Beginner's Guide to SMART Yield

What Is SMART Yield?

SMART Yield offers users fixed or levered variable yield on their stablecoins through integrations with lending markets like Compound and Aave. It aggregates user deposits into underlying markets on these platforms and allocates the yield generated on the sum between two different risk profile subsets.

Let’s look at an example.

Alice is a crypto veteran looking to reduce the volatility of her portfolio. She decides to allocate a portion into stablecoins and is looking for predictable fixed rates of return.

Bob is a more aggressive DeFi power user. He is willing to take higher risks with his capital in order to get an opportunity for higher returns.

SMART Yield fulfills both Alice and Bob’s needs as it offers two types of risk profiles:

  • Junior Pools: higher risk, levered variable rate rewards

  • Senior Pools: lower risk, fixed-rate rewards

Users are able to deposit funds into either the junior or senior pool in exchange for a token indicating their claim on their principal and whatever yield is allocated for them. These aggregated holdings are then deposited into the specified originating lending market, e.g. Compound.

Seniors lock in a fixed-rate yield upon entering their side of the pool. This fixed rate is determined by the underlying market rate, as well as the ratio between existing seniors and juniors. The yield that is allocated to any given Senior pool depositor is allocated directly from the Junior pool; that is to say, the yield exists in the system from the moment the Senior bond in question is minted.

Juniors are willing to subsidize senior yields as they have the opportunity to benefit from levered yields. Because seniors are only entitled to their fixed yields, all yield generated by their principals goes to the junior side. So while Junior depositors are indeed risking their yield and potentially their principal, the Junior pool receives all of the yield earned by the entirety of the capital deposited into that given market.

Now it’s time to learn more about senior and junior tranches, and how they are represented in SMART Yield.

Introducing Senior Bonds

Overview

SMART Yield senior positions are represented by ERC-721 non-fungible tokens (NFTs), which we call senior bonds (sBonds). Senior bonds are minted (created) each time the user deposits into the pool.

Since bonds are unique and contain specific information, each bond NFT has a set of properties:

  • principal— the amount user has deposited into the bond;

  • gain — the amount of token that will be gained;

  • issuedAt — the issuance date;

  • maturesAt — the maturity date;

  • liquidated — a flag used to determine if the senior bond was redeemed or not.

After the senior bond matures the principal and gain can be redeemed and the NFT is burned.

ABOND

Each pool can contain an unlimited number of senior and junior positions. In order to calculate the pool profits and losses efficiently, the weighted average across all existing senior bonds is used. This weighted average is represented by the ABOND variable. It has the following properties:

  • ABOND.principal — sum of all principal deposits;

  • ABOND.gain — sum of guaranteed rewards to senior bonds holders;

  • ABOND.issuedAt;

  • ABOND.maturesAt — weighted average maturity date.

ABOND parameters are recalculated each time a new senior bond is minted.

Senior APY

Senior APY is the annual percentage yield that is available for the next marginal senior bond to be minted. This figure fluctuates in accordance with a rolling average of the underlying interest rate market. When a user deposits into the Senior pool, this is the maximum fixed yield they can expect to lock in. Slippage occurs when the principal size brings the Senior pool size closer to, or greater than, that of the Junior pool.

Here is the simple formula that is used to calculate senior APY:

((gain/principal) / (maturesAt - issuedAt)) * 365 * 100

Introducing Junior Tokens

Overview

SMART Yield Junior pool positions are represented by ERC-20 fungible tokens, which we call junior tokens (jTokens). Junior tokens are minted each time the user purchases them at a current conversion rate using BarnBridge app.

Each originator’s junior token has its own ticker. For example, USDC in Compound’s pool is called bb_cUSDC, where bb stands for BarnBridge and cis the first letter of the originator’s protocol name.

Junior APY

Junior APY determines the annual percentage yield for the junior tokens at the current time. It is realized only when exiting the position and converting jTokens into the underlying asset.

When the new pool starts, the conversion rate of jTokens is 1:1. For example, if you tried to deposit into the Compound USDC pool, you would get 1 bb_cUSDC for each USDC you put in. Going forward, the conversion rate changes with the price of bb_cUSDC increasing (as your deposit generates yield) or decreasing (in scenarios where the Junior pool has Senior pool yield obligations).

APY can be calculated as annualized difference between your purchase and your sell (exit) price.

Junior Bond

There are two ways to withdraw Junior pool liquidity. Depending on the method, users are able to either withdraw immediately or after a calculated period of time. In the case of the latter, Junior bonds are ERC-721 non-fungible tokens that are used to represent the unique circumstances of a given user’s exit from the pool.

A Junior bond will have the following properties:

  • tokens — the amount of jTokens that will be withdrawn;

  • maturesAt — the date when the bond can be redeemed (determined by the ABOND variable’s maturity date).

In order to exit the junior position using junior bonds, two steps should be initiated. Step one is minting a junior bond token by choosing the 2-step withdrawal option. Step two is redeeming the liquidity at its maturity date.

How SMART Yield Works

Now that we know what sBonds and jTokens are, it’s time to figure out how they work within the system.

Let’s get back to our example with Alice and Bob. They both decided to deposit into the Compound USDC pool on BarnBridge.

Alice wants to purchase a senior bond. She is looking at the senior APY and 6.4% seems like a decent rate of return considering the reward is guaranteed.

How to purchase a senior bond?

She goes to the Deposit page, enters the amount of 100M USDC, selects the maturity date of 1 year, and suddenly sees that the guaranteed APY isn’t so high anymore. It has lowered because there is not enough junior liquidity in the pool to fix a 6.4% return for such a large deposit. However, the rate is still attractive, so she decides to go through with it.

Alice now holds an NFT senior bond and is able to track her portfolio growth using the statistics section in the BarnBridge app. She will be able to redeem both her principal and gain at the maturity date. There is currently no formal secondary marketplace for senior bonds but they are totally transferable between Ethereum addresses and BarnBridge core team is working on an additional product for it called SMART FIAT (full details disclosed in a few weeks).

How to redeem a senior bond?

Bob decides to enter the junior position considering he is going to stake his jTokens in the yield farm and earn an additional 44.73% APY in $BOND tokens.

How to buy junior tokens?

He goes to the Deposit page, inputs the amount of USDC he wants to buy bb_cUSDCwith, and confirms the transaction. The current conversion rate is 1:1.0329, so each bb_cUSDC token will cost 1.0329 USDC.

Pooled Alice’s and Bob’s liquidity is put into Compound to earn yield. The originator APY represents the Compound native APY.

It’s important to note that BarnBridge uses a 3-day moving average historical APY metric to determine the originator APY. It is an additional protection layer that prevents the system from being manipulated by supply rate spikes. If the spike lasts for more than 3 days, we assume it can be considered as a trend rather than a random spike. This is why the SMART Yield originator APY doesn’t usually match the real originator APY at the current time.

Alice is earning a lower yield than she produces but if the originator APY goes below her guaranteed APY, junior funds will be used to cover her rates. Bob is getting a chance to leverage seniors’ liquidity and earn the extra yield produced by seniors.

Bob’s advantage over Alice is that he is able to exit his junior position at any time. However, in order to ensure that there are enough funds in the pool available to supply seniors’ guaranteed gains, there have been two options developed for juniors to withdraw their funds:

  1. Instant withdrawal — Bob withdraws his liquidity immediately but forfeits a part of it in favor of seniors. The exact % that needs to be forfeited is calculated at the moment of withdrawal and depends on the amount of senior guaranteed gains. (How to instantly withdraw junior tokens?)

  2. 2-step withdrawal through the junior bond — Bob mints a junior bond which contains the amount of tokens he wants to withdraw and seniors average maturity date (ABOND.maturesAt). He will be able to redeem his liquidity at the maturity of the bond similar to how seniors do this. (How to withdraw junior tokens with a junior bond?)

Note: The max senior maturity date is subject to change and can be adjusted by the BarnBridge DAO vote. It is currently set to 1 year. If you are considering investing in junior tokens, make sure you understand the risks of being locked for that time in case you don’t want to sacrifice a part of your liquidity with instant withdrawal.

Alice has to pay a 5% fee on the senior bond gain at redeem. Bob pays 0.5% fee on the deposit amount each time he enters the junior tranche.

Is It Secure to Invest in SMART Yield?

Each DeFi protocol is subject to different risks. However, as BarnBridge products are helping users hedge their risks, we are taking it seriously and have always been focused on security.

SMART Yield’s TVL has been as high as $290M+ recently and no hacks or vulnerabilities were found since the product launch 3 months ago. We have also successfully passed security audits from the industry leaders:

What’s Next?

We hope this guide was useful for you.

If you are interested in learning more, we have an extended version of the guide with some models available here: SMART Yield PDF Guide.

Now it’s time to earn in a SMART way: Launch app.

Feel free to drop us a message if you have any questions: