Decentralized finance has grown exponentially in just the past year alone. This has been driven in large part by the emergence of scalable protocols that can facilitate basic financial operations, such as exchange or lending and borrowing, open to anyone in the world via decentralized blockchain networks like Ethereum.
Such DeFi protocols, like MakerDAO, Compound, or Aave, are generating outsized yields for users as they bear none of the overhead costs borne by traditional financial institutions, while also catering to a marketplace with limited access to legacy capital markets. When bookkeepers, escrow, and external auditors can be replaced by smart contracts, trustless oracles, and transparent ledgers, and the demand for leverage or liquidity is global from day one, heightened yields come as less of a surprise. With these building blocks in place providing real-time costs for capital within the DeFi ecosystem, there is now a greenfield opportunity for derivatives to be built on top of their nascent risk curves.
This is where BarnBridge comes into place, enabling advanced strategies for hedging various risks.
SMART Yield allows users to tranche out the yield from the debt pools of other projects, such as Aave or Compound, to normalize the risk curve by creating derivatives for risk mitigation. It aggregates user deposits into these underlying money markets and allocates the yield generated on the sum between different risk profiles which we refer to as tranches. This is exactly what SMART stands for: Structured Market Adjusted Risk Tranches.
Let’s look at an example.
Alice is an investment manager. She is exploring new markets for investment opportunities and is looking for fixed-income investments with predictable rates of return.
Bob is an experienced DeFi 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 (i.e., tranches):
Junior: higher risk, levered variable rate rewards
Senior: lower risk, fixed-rate rewards
Users are able to deposit funds into either the junior or senior tranche in exchange for a token indicating their claim on their principal and whatever yield is allocated for them. These aggregate holdings are then deposited into the specified originating money 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. Seniors' yield is generated by their principal when the underlying market rate is at or above their fixed rate. When the market rate is below their fixed rate, the yield is derived from that being earned by the juniors, or even the juniors' principals themselves.
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, any excess yield generated by their principal goes to the junior side. This excess yield can be thought of as two-dimensional: how much excess yield is being generated, and how large is the senior pool relative to the junior one? So while juniors are indeed risking their yield and potentially their principal, an equilibrium forms at the point where the relative volume of juniors is sustainable given the potential for excess senior yield.
Now it’s time to learn more about senior and junior tranches, and how they are represented in SMART Yield.
SMART Yield senior tranches 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.
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 is being used to average all the existing senior bonds. This weighted average is represented by the aggregated bond called ABOND. It has the following properties:
ABOND.principal - sum of all principal deposits;
ABOND.gain - sum of guaranteed rewards to senior bonds holders;
ABOND.maturesAt - weighted average maturity date.
ABOND parameters are recalculated each time new senior bonds are minted.
Senior APY is the annual percentage yield for senior bonds at the current time. It means it can fluctuate in value but only till the senior bond is minted. When users deposit and purchase bonds, they are getting a guaranteed rate of return fixed at the moment of purchase for the life of the bond.
Here is the simple formula that is used to calculate senior APY:
((gain/principal) / (maturesAt - issuedAt)) * 365 * 100
SMART Yield junior tranches 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 junior token has its own ticker. For example, USDC jToken in Compound’s pool is called bb_cUSDC, where “bb” stands for BarnBridge and “c” is the first letter of the originator’s protocol name.
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.
Let’s explain this in detail.
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 funds are used to cover seniors’ losses).
Depending on the annualized difference between your purchase and your sell (exit) price you can calculate your APY.
There are two ways to withdraw junior liquidity (it will be explained in detail in the How SMART Yield Works section). Junior bonds are ERC-721 non-fungible tokens that are used in one of them.
Junior bond has the following properties:
tokens - the amount of jTokens that will be withdrawn;
maturesAt - the date when the bond can be redeemed (uses ABOND senior 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 the maturity date.
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 8.68% seems like a decent rate of return considering the reward is guaranteed.
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 guarantee 8.68% of 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.
Bob decides to enter the junior position considering he is going to stake his jTokens in the yield farm and earn an additional 26.6% APY in $BOND tokens.
He goes to the Deposit page, inputs the amount of USDC he wants to buy bb_cUSDC with, and confirms the transaction. The current conversion rate is 1:1.0384, so each bb_cUSDC token will cost 1.0384 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:
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.
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.
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.
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.
We have passed two audits for the SMART Yield product:
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: