# Core Concepts

# Introduction

This article will go over the 3 major components of the Sense v1 Protocol:

  • Yield Stripping Application
    • This is an application for dividing yield bearing assets into separate tokens representing claims on principal and claims on yield (called "Principal Tokens" and "Yield Tokens").
  • Sense Space AMM
    • This is a pool for trading Yield Tokens (YTs), Principal Tokens (PTs), and their respective yield-bearing asset.
  • Sense Fuse Pool
    • This is an open money market using Principal Tokens, Target Assets and Sense Space LP tokens as collateral.

The goal of this article is to give someone new to the protocol, and new to some of the underlying concepts, a good foundation to understand what’s going on. This document provides a conceptual overview, with links to more detailed information elsewhere in our docs.

# Yield Stripping Application

# Summary

The yield stripping application allows a user to decompose a yield-bearing asset into its principal and yield components and package them behind two fixed term, maturing assets, a Principal Token and a Yield Token. Principal Tokens redeem 1-for-1 for the yield-bearing asset’s underlying at maturity, whereas Yield Tokens deliver yield accrued on the underlying until maturity.

With the existence of PT and YTs, users are able to safely earn/borrow at a fixed rate and trade against future yields, without the risk of liquidation and capital lock-ups.

# Main Concepts

All yield-bearing assets are a growing claim to future underlying assets. If I take an asset and put it into an in-kind yield bearing asset, I know that at all points in the future that yield bearing asset will be worth that original amount of the underlying asset I put into it + some amount of accrued interest.

As an example, if I put my ETH in Compound, I know that at any arbitrary point in the future, that cETH will be worth my original ETH investment (in ETH terms) + some amount of interest. The same is true for staking ETH, farming liquidity rewards, lending to the US government, etc.

That "original investment" is called "principal" and that "some amount of interest" is called “yield”.

If we pick some specific arbitrary point in the future and say we will withdraw our principal then, we can start guessing about how much yield will have accrued by that point. A pre-selected date in the future like this is called a “maturity”.

As long as you have decided upon a maturity, you can separate a yield bearing asset into two separate cash flows: the future interest payments (yield) and the return of the initial deposit you get back at the maturity (principal).

You can then take these two separate cash flows, and make them each into their own token.

One way to think about why you need a "maturity" is that otherwise the part of the asset that is a claim to the principal investment couldn’t be used to get the principal back until... infinitely far in the future. The maturity marks when whoever has the claim to the principal can redeem that claim 1:1 for the underlying asset and whoever has the claim to the yield stops accruing the yield payments from the asset.

Within Sense, this is the terminology we use:

  • The underlying asset in which the yield bearing asset’s principal is denominated is called the Underlying (e.g. ETH for wstETH and USDC for cUSDC).
  • The yield bearing asset is the Target.
  • The claim to the principal is a Principal Token.
  • The claim to the yield is a Yield Token.
  • The arbitrary point in the future where yield tokens stop accruing yield and principal tokens are redeemable 1:1 for underlying is the Maturity of a series.
  • A Series is a contract that will mint or redeem targets into Principal and Yield Tokens with a specific maturity.

The first application Sense has built atop its core contracts is a Stripping Application that "strips" a yield bearing asset into a Principal Token (PT) and a Yield Token (YT) with a maturity. Any yield bearing token can become a target, as long as an Adapter is built to accommodate its interaction with the stripping contract. That adapter will be able to produce a variety of series with different maturities. To accommodate easy expansion, the Sense team will construct Adapter Factories for major protocols (e.g. Compound, Aave) that will allow anyone to permissionlessly deploy an adapter for any target yield bearing asset originating from that protocol with a single external function call.

It’s worth noting that while the first application created on top of Sense’s Core Contracts is a yield stripping application, the contracts are architected with a level of abstraction that permits various different ways of dividing a target asset into multiple component assets. Since the first application (stripping) is all about dividing assets into Yield Tokens and Principal Tokens, it’s important that users have a deep understanding of the concepts of Yield versus Principal.

# Visualizing Yield Versus Principal

As described above, you can think of any yield bearing asset as a combination of future cash flows. As long as have decided on a maturity, you can break those cash flows down into your yield (interest accrued until maturity) and your principal (the amount of underlying you started with, which you can get back at maturity). The price of the asset today is what people are willing to pay for these future cash flows.

diagram

It’s important to note, here, that we are dealing with cases where the size of the yield is unknown, as with any Compound deposit, Aave deposit, staked ETH, et cetera. While our yield is unknown in these cases, our principal amount, of course, is known.

Any Target asset is equivalent to some amount of invested Underlying today. I can always deposit 1 ETH into compound to get some cETH and then use that cETH to withdraw that 1 ETH later. Anything above that 1 ETH that I get on withdrawal would be considered yield.

So, that Target asset is always just a claim to:

(1) that amount of underlying at some point in the future when you withdraw it (principal) and

(2) a bunch of variable future yield payments (yield) between now and then.

We visualize what you get for 1 underlying in the chart below.

diagram

What Sense’s stripping application does is divide any target asset into a Yield Token and a Principal Token. The Yield Token’s holder will get the yield cash flows(or sell to someone else who wants to get the yield), while the Principal Token holder can redeem those tokens 1:1 for the underlying at maturity to get back the principal (or sell to someone else who does).

diagram

Users can take 1 underlying worth of the target asset and mint 1 Principal Token + 1 Yield Token at any time — or combine equal amounts of Principal Tokens and Yield Tokens for an amount of the target asset equal to that many underlying. This means that the price of the Yield Token + the price of the Principal Token = the price of the underlying at all times.

diagram

As some of you very clever sausages will have already noticed, the ability to pay a fixed price now for a fixed amount of the Target in the future means you can get fixed interest rates, but we will get to that in more detail within the Use Cases (opens new window) doc.

# Series

A Series is a specific set of Principal and Yield tokens, with a specific target, from a specific adapter, with a specific maturity.

A single adapter for a target asset, as an example, can issue multiple different series with their own specific maturity dates (e.g. 1mo in the future, 3mo in the future, 12mo in the future).

# Token Naming

A token’s series and token type determine its name. Sense’s token names follow this format

<token type> - <series info>

Which can be further broken down into:

<token type> - <target> : <maturity date> : <adapter number>

Yield Tokens use the sY prefix in the token name for “Sense Yield” and Principal Tokens use the sP prefix for “Sense Principal”. All dates are formatted DD-MM-YYYY.

So, a Principal Token for wstETH maturing October 1, 2024 from adapter #3 (adapters are explained in our smart contracts doc (opens new window)) would be called:

sP-wstETH : 01-10-2024 : 3

Owning that token means you're entitled to claim the principal ETH (no yield) on or after October 1st, 2024 by exchanging this token 1:1 for ETH.

# Initializing and Settling Series

Note: there is no GUI for initializing and settling a series on the Sense Portal, so this is only something people will do by interacting directly with the contract.

The person who initializes a series is called a series sponsor. The series sponsor puts down a stake when they initialize a series through an adapter, and whoever settles the series collects that stake along with any issuance fees collected over the lifecycle of the series. The size of that fee is determined by what adapter is used to create the series, which is calculated based on what is required to cover gas fees for settlement. The initial stake size and issuance fees used for Sense-v1 launch are defined in the Initial Parameters (opens new window) page.

To incentivize the series sponsor to go through the trouble of sponsoring a series, they get a special window of time to settle the series at maturity and collect that settlement reward (stake + issuance fees). After that window of time, anyone may settle the series and collect that reward.

For more details, view the Smart Contracts page or the Series Lifecycle page.

# Principal Tokens (PTs)

As mentioned above, a Principal Token is a liquid, tradable token that becomes redeemable for an underlying asset 1:1 after a specified maturity.

diagram

# Pricing

As already mentioned above the YT Price + PT Price = Underlying Price at all times. This means that the PT price cannot be above the underlying asset’s price or a free arbitrage exists to recombine Principal and Yield Tokens (because YT price cannot go negative and 1 PT + 1 YT can be combined for 1 underlying worth of target at any time).

Therefore, at all times before maturity, PT trades at some discount to the Underlying, meaning claims to fixed amounts of the underlying asset in the future can be bought at a known price today. This creates an implied fixed interest rate.

As time goes on if the implied rate does not change, price will appreciate in underlying terms until it reaches parity at maturity. An easy way to think about this is that the Principal Token is chomping up more value as there are fewer and fewer future yield payments priced into the yield token.

If the Yield token was worth four upcoming 0.5% monthly payments until maturity last month, and the Principal was worth 1 underlying minus the cost of a yield token—then this month the Yield token is only worth three more 0.5% monthly payments and the Principal token is worth 1 underlying minus that. All else equal, the Yield token should be worth less now, and the Principal token should be worth more.

Principal tokens’ price versus underlying is a function of how much more yield the market thinks the yield tokens will get before maturity. So, while there is a pressure for it to trend up toward underlying as maturity approaches, the price still has some volatility — if the market starts pricing in a higher yield, the current price of the Principal token can be temporarily driven down in underlying terms.

# Implied Rate

The discount between the PT and the underlying (or, the amount of underlying that can be bought with one underlying today) always implies a specific rate of return.

As an example, lets say 1 ETH buys 1.05 sP-wstETH with a maturity 1 year from today. By buying the 1.05 sP-wstETH you are guaranteeing your ability to turn those in for 1.05 ETH worth of wstETH next year and locking in a 5% return on your ETH. A fixed return, if you will.

This implies an interest rate of 5%. Any price for sP-wstETH has some Implied Rate. In this case, the price would have been about 0.952 ETH/sP-wstETH.

The Sense Portal will do this for you. But, a generalized formula for finding the annualized implied rate for the underlying of a given price for a Principal Token would be:



where:

  • = Present value = market price of one Principal Token [Underlying] (functionally always 1)
  • = Future value = redemption value of one Principal Token [Underlying]
  • = annual discount rate
  • = number of years until maturity (can be fractional)

# Return

There are two types of return for Principal Tokens. You can get a fixed return in underlying terms by holding until maturity.

It is also possible, however, to get a return by selling Principal Tokens at a higher price than you bought them. If the implied yield hasn’t changed since you bought your Principal Tokens, they should at any point in time have appreciated in price at a rate equivalent to a pro-rata of the priced in annual rate if return. However, if priced in yields have fallen you will get a higher return than that—the implied yield having fallen actually requires **that the price of the Principal Token as increased faster than expected. If priced in yields have risen you will get a lower return (or, even, sell at a loss).

# Yield Tokens (YTs)

As discussed above, a Yield Token holder collects any Yield paid on the principal amount of the underlying by a target up until maturity. This includes both in-kind interest accrual and any additional token rewards. After maturity, a yield token will have no value.

diagram

# Pricing

The yield token’s price is the present value of all of the payments that the target asset will make on the underlying. These payments accrue to the holder as they would have accrued to the original target.

The larger the market expects those payments to be, the more expensive the Yield Token will be. The value of the yield token, however will trend toward zero (opens new window) over time as fewer payments remain in the future and more lie in the holder's wallet.

# Return

You can get return on yield tokens two ways. The first is holding them, and collecting your payments. The second is selling them at a higher price (higher implied yield) than the purchase price.

The interesting thing about yield tokens is how capital efficient they make betting on yield. By way of example, in a situation where some 1 year sY-stETH tokens cost about 0.05 ETH each you have an implied yield of about 0.52%.

The best way to think about yield tokens (if you’re planning to hold them to maturity) is as a bet on what the yield will be versus the implied yield. Your return will be dictated by changes in the priced in yield in yieldspace. If you buy yield tokens when the implied rate is 5%, and hold them until maturity, and the realized rate (what actually gets paid out in yield on the target) of return over the time between now and maturity actually ends up being 6% — you make a 20% return. The rate was 6%, which is a whole 20% greater than 5% in terms of the yield itself.

( 6 - 5 ) = 1 and 1 / 5 = 20%

This is what yieldspace change means. Let’s go through a couple examples.

Let’s say 1 sY-wstETH maturing one year from now costs .05 ETH and you buy 1 ETH worth (20 sY-wstETH).

1 ETH * .05 ETH / sY-wstETH = 20 sy-wstETH

In this case, you are buying ~20 ETH underlying’s worth of yield on wstETH. If the real-life wstETH yield comes in as it’s priced to (if the realized rate = the implied rate you bought at), you break even. 5% yield means .05 ETH yield per each 1 ETH worth of wstETH.

0.05 ETH * 20 sY-wstETH = 1 ETH (Breakeven)

But if the rate comes in at twice the priced in rate, you double your money: 10% realized yield means 0.10 ETH yield per wstETH.

0.10 ETH * 20 sY-wstETH = 2 ETH (+100% return)

The same, of course, is true on the downside. What happens if realized yield comes out as 2.5%

0.025 ETH * 20 sY-wstETH = 0.50 ETH (50% loss)

Generally speaking, your % return on buying and holding Yield Tokens is the % difference in yieldspace (i.e. the change with yield as a base not price) between the priced in yield at the time of purchase versus the realized yield after all of the yield payments have accrued.

# Why Yield Space

For both Principal Tokens and Yield Tokens, the price isn’t really about the price. The price is about the implied yield. Principal tokens create a market for fixed amounts of underlying at a future time, and yield tokens create a way for speculators to capitalize on underestimated future yields when the Principal Token buyers are accepting unrealistically low fixed rates.

For both of these, the price of the asset is actually a way of expressing information about future yield expectations. If everyone’s expectations about the market stay the same the implied rate will stay the same — but the price will still change over time to reflect that implied rate.

A PT expiring six months from now that was trading at a 5% discount to underlying six months ago (implying a 5% annual rate), but is now trading at a 2.5% discount to the underlying (still implying a 5% annual rate), has appreciated in price space, but stayed flat in yieldspace.

Traditional AMMs like Sushiswap and Uniswap base their exchange rate around a liquidity management function in an implementation called a “product invariant” or “constant product” pool. These are really elegant solutions for their use cases, but are not well suited at all to PTs or YTs. Instead of distributing liquidity around a particular price between two assets, it makes more sense for us to distribute liquidity around a certain implied rate for the target. What price the implied rate requires to stay the same has to be dynamic, accounting for the time until maturity.

This is why we have built a custom AMM type called Sense Space that includes a component of time until maturity and distributes yield around an implied rate at the time a new LP enters the pool, rather than an implied price.

# Sense Space

Sense Space is a PT/Target AMM Pool built on Balancer V2. While liquidity for the pool is provided in Target and PT terms, YT can also be traded against the pool using “zap” transactions (Sense uses a combination of micro flash loans as well as mint and redeem functions to make this possible).

Each series has its own, unique Space pool. It implements the yieldspace invariant (opens new window), which offers a host of benefits:

  1. An LPs principal investment is protected in underlying terms if they hold until series' maturity
  2. No time-dependent impermanent loss
  3. Less slippage & price impact as maturity is approached

Space offers a meaningful improvement to a vanilla yieldspace implementation by allowing LPs to deposit a yield-generating quote asset, i.e. the target, instead of the underlying, as was originally conceived. Using some automated accounting, any yield accrued to the target is excluded from the yieldspace invariant and reserved for Liquidity Providers. This makes Space one of the most safe and capital efficient AMMs for fixed income trading in DeFi.

# User Journeys

Space is used by PT holders, YT holders, and liquidity providers. The easiest way to interact with Space is through app.sense.finance (opens new window), but for those wanting to look under the hood, let's dive into each user journey below:

# Principal Token Trading

Users can easily swap between PTs and the space’s target asset.

diagram

# Yield Token Trading

With the use of Sense's Periphery contract, users can "Zap" between YTs and the Space's yield-bearing asset within a single transaction.

To swap from target to YT, Sense executes the following operations:

  1. Flash borrow target from Sense at 0% fees
  2. Deposit target into Sense and issue PTs & YTs
  3. PTs → target swap
  4. Pay back the target Flash loan
  5. Return YTs and any leftover target

Users that want to increase their YT exposure will need to perform this operation again.

On the other hand, to swap from YT to target, Sense uses the following operation:

  1. Flash borrow target from Sense at 0% fees
  2. Target → PT swap
  3. Combine PTs & YTs into target
  4. Pay back flash loan
  5. Get target

As opposed to entering a YT position, only the target is returned in this operation. Because we know the exact number of YTs to sell, Sense can calculate the exact amount of target to flash borrow, so users can exit a YT position in a single transaction.

diagram

# Liquidity Providers

With the use of Sense's Periphery contract, users can "zap" into and out of Space LP positions within a single transaction. To add liquidity, users can execute the following operation:

  1. Deposit Target into Sense and issue PTs & YTs
  2. Add PTs & Target to Space
  3. (YTs → Target Swap, Optional)
  4. Return Space LP Shares & excess YTs OR excess Target/Underlying

Notice how #3 (aka "instasell") is optional. This is intentional, as it's the decision of the Liquidity Provider (LP) to keep their YTs or sell them for Target in the same transaction.

The larger the size of new liquidity, relative to the existing market, the larger the price impact to the PT price, as inflicted by the YT → Target conversion.

If the market disagrees with the PT price, it will trade against the pool's reserves, exposing LPs to impermanent loss (IL) and smaller returns (see the below Note on LP returns).

One way to minimize IL is to keep the YTs when adding liquidity and perform numerous YT sales in smaller size, at the discretion of the LP. Called "scattered selling", a market that's recurringly correcting the price will allow the LP to exit their entire YT position with less slippage.

We expect that Large LPs with low operational costs will keep YTs and choose "scattered selling", whereas those who prefer the conveneince will opt to "instasell" their YTs.

To remove liquidity, users can execute the following operation:

  1. Remove PTs & Target from Space
    1. Redeem PTs for Target (if after maturity)
    2. PTs → Target Swap (if before maturity)

As opposed to adding liquidity, only the Target is returned in this operation.

diagram

# Note on LP returns

LP returns are dependent on its yield and any impermanent loss (IL) that occurs from volatility in the PT's implied rate.

An LP's yield is fueled by three distinct sources: fixed yield from PTs, variable yield from Target, and variable yield from trading fees.

We have not written a full research piece on IL within Space pools, but the IL should be significantly lower than the average constant product (e.g. UniswapV2) pool for volatile assets. Moreover, the yieldspace invariant ensures that LPs are not exposed to time-dependent IL, caused by the "value drift" of PTs.

Most importantly, because space uses yieldspace, LPs can hold their position until maturity, and their principal investment is protected in terms of the Space LP's underlying asset.

diagram

# Sense Fuse Pool

As a decentralized permissionless infrastructure project, Sense obviously loves to avail itself of the building blocks provided by other top-tier permissionless infrastructure protocols.

As such, Sense v1 is launching with a Fuse pool alongside the stripping application and the Space pools. A Fuse pool is an individual borrowing and lending market deployed with custom parameters (opens new window) around collateral types, rate models, etc.

Sense’s Fuse pool will allow any verified Targets, Principal Tokens, or LP shares from any series in the Sense Portal to be used as collateral to borrow in terms of Principal Tokens or targets. This will allow users to borrow against tokens deposited in Sense’s contracts to improve capital efficiency and implement strategies like leveraged liquidity provision.

For more information, check out our Initial Parameters (opens new window) docs.

Last Updated: 10/11/2022, 7:38:38 PM