owned this note
owned this note
Published
Linked with GitHub
# YieldSpace with Yield Bearing Vaults
In the original [YieldSpace Paper](https://yieldprotocol.com/YieldSpace.pdf), Yield introduced a new automated market maker for trading between a base asset and "fixed yield" tokens, or "fyTokens", of that base asset. FyTokens are ERC-20 tokens that represent future payment of the base asset after a specfied time. After maturity, a user may redeem a fyToken by burning it to receive the base asset one-for-one.
YieldSpace markets must maintain reserves of fyTokens and the base asset as inventory for future trades. However, while held as reserves, the base asset earns no returns. To increase the returns for LPs, we can place all base assets into Yield Bearing Vaults that earn interest and can be withdrawn at any time.
Yield Bearing Vaults are ERC-20 tokens representing a desposit of an underlying asset into a protocol that pays interest on that asset over time. Some examples are Yearn Vault tokens (like yvUSDC) or Compound cTokens. Yield Bearing Vaults capitalize interest increasing a conversion rate between the ERC-20 vault and the base asset over time. Yield Bearing Vaults are further described in ERC-4626, an effort to standardize such vaults (https://github.com/ethereum/EIPs/blob/master/EIPS/eip-4626.md).
The goal of this document is to describe the basic derivation of a YieldSpace market using Yield Bearing Vaults.
## Base Model
The original YieldSpace sought to create a market to trade between a base asset $X$ and a fyToken asset $Y$ where the interest rate is the ratio of the fyToken reserves $y$ to the base asset reserves $x$:
$$
\tag{1}
1 + r = \frac{y}{x}
$$
We want to create a new version of the YieldSpace market the base asset is replaced with a token that represents a yield bearing vault that is earning interest. Yield Bearing vault tokens are sometimes referred to as "shares", and we will represent them here as $Z$, and an amount of share reserves as $z$. $X$ and $Z$ reserves can be related simply as $x = cz$ where $c$ is a conversion rate that grows with compounded interest.
$$
x = cz
$$
A key insight of the YieldSpace CFMM is to maintain the same marginal interest rate over time while no trades occur and reserves do not change. We can start with the equation in $(1)$ and substitute shares in place of the base assets:
$$
1 + r = \frac{y}{z}
$$
This equation will now maintain the same marginal interest rate absent any trades, but it's unclear what that rate will be. For any particular base value, $z$ can have any arbitrary value. To give the interest rate a reasonable relationship with the base value of the shares, we can modify the equation by adding a constant normalizing constant $\mu$:
$$
1 + r = \frac{y}{\mu \cdot z}
$$
Because the conversion rate $c$ between $x$ and $z$ varies relatively slowly over time, the normalizing factor can be held constant for the life of the market. A simple choice for $\mu$ is the initial value of the conversion factor at market initialization.
### Derivation
We can now derive our market with respect to the base asset.
$$
1 + r = \frac{y}{\mu \cdot z} = \frac{c \cdot y}{\mu \cdot x}
$$
Assuming that $y$ is a function of $x$:
$$
y = f(x)
$$
Then current price of asset $Y$ in terms of asset $X$ offered by the protocol could be found as:
$$
p = \frac{-1}{f'(x)}
$$
If we consider asset $Y$ as zero-coupon bonds denominated in asset $X$, then the effective interest rate $r$ for a given $p$ for these bonds would be:
$$
r = \left(\frac{1}{p}\right)^\frac{1}{t} - 1
$$
Thus the relationship between, $p$ and the interest $r$, becomes:
$$
r = \left(\frac{1}{p}\right)^\frac{1}{t} -1 = \left(\frac{1}{\frac{-1}{f'(x)}}\right)^\frac{1}{t} - 1
$$
and plugging into the invariant we get the following equation:
$$
1 + r = \frac{y}{z} = \frac{c \cdot f(x)}{\mu \cdot x} \\
1 + \left(\frac{1}{\frac{-1}{f'(x)}}\right)^\frac{1}{t} - 1 = \frac{c \cdot f(x)}{\mu \cdot x}\\
-f'(x) = \left(\frac{c \cdot f(x)}{\mu \cdot x}\right)^t
$$
And the solution is:
$$
f(x) = (C - c^t \cdot \mu^{-t} \cdot x^{1 - t})^\frac{1}{1 - t}\\
$$
Thus, the CFMM invariant looks like this:
$$
c^t \cdot \mu^{-t} \cdot x^{1 - t} + y^{1 - t} = C
$$
or
$$
c^t \cdot \mu^{-t} \cdot (cz)^{1 - t} + y^{1 - t} = C\\
c \cdot \mu^{-t} \cdot z^{1 - t} + y^{1 - t} = C \\
\frac{c}{\mu} \cdot \mu^{1-t} \cdot z^{1 - t} + y^{1 - t} = C \\
\frac{c}{\mu} \cdot (\mu \cdot z)^{1 - t} + y^{1 - t} = C
$$
## Swap Formulas
We can use the CFMM invariant to determine the amount of fyDai or vyDai received for a given input of vyDai or fyDai, and to determine the needed input of fyDai or vyDai for a desired amount of vyDai or fyDai out.
For example, we can calculate the fyDai needed to get a desired amount of vyDai out:
$$
\frac{c}{\mu} \cdot (\mu z - \mu \Delta z)^{1 - t} + (y + \Delta y)^{1 - t} = \frac{c}{\mu} \cdot (\mu \cdot z)^{1 - t} + y^{1 - t} \\
(y + \Delta y)^{1 - t} = \frac{c}{\mu} \cdot (\mu \cdot z)^{1 - t} + y^{1 - t} - \frac{c}{\mu} \cdot (\mu z - \mu \Delta z)^{1 - t} \\
y + \Delta y = \left( \frac{c}{\mu} \cdot (\mu \cdot z)^{1 - t} + y^{1 - t} - \frac{c}{\mu} \cdot (\mu z - \mu \Delta z)^{1 - t}\right)^\frac{1}{1 - t}\\
$$
Therefore, we have:
$$
\Delta y = \left(\frac{c}{\mu} \cdot (\mu z)^{1 - t} + y^{1 - t} - \frac{c}{\mu} \cdot (\mu z - \mu \Delta z)^{1 - t}\right)^\frac{1}{1 - t} - y
$$
We can likewise derive functions for other desired types of trades:
### fyTokenInForSharesOut
$$
\Delta y = \left(\frac{c}{\mu} \cdot (\mu z)^{1 - t} + y^{1 - t} - \frac{c}{\mu} \cdot (\mu z - \mu \Delta z)^{1 - t}\right)^\frac{1}{1 - t} - y
$$
### fyTokenOutForSharesIn
$$
\Delta y = y - \left(\frac{c}{\mu} \cdot (\mu z)^{1 - t} + y^{1 - t} - \frac{c}{\mu} \cdot (\mu z + \mu \Delta z)^{1 - t}\right)^\frac{1}{1 - t}\\
$$
### sharesInForFYTokenOut
$$
\Delta z = \frac{1}{\mu}\left(\frac{\frac{c}{\mu} \cdot (\mu z)^{1 - t} + y^{1 - t} - (y - \Delta y)^{1 - t}}{\frac{c}{\mu} }\right)^\frac{1}{1-t} - z
$$
### sharesOutForFYTokenIn
$$
\Delta z = z- \frac{1}{\mu}\left(\frac{\frac{c}{\mu} \cdot (\mu z)^{1 - t} + y^{1 - t} - (y + \Delta y)^{1 - t}}{\frac{c}{\mu}}\right)^\frac{1}{1-t}
$$
## Trading Limit Formulas
### MaxfyTokenIn
MaxfyTokenIn is the amount of fyTokens that may be sold to the pool to buy all of the shares currently in the pool.
$$
\Delta y = \left(\frac{c}{\mu} \cdot (\mu z)^{1 - t} + y^{1 - t}\right)^\frac{1}{1 - t} - y
$$
### MaxfyTokenOut
We would like to calculate the maximum amount of fyTokens that can be purchased from the pool. Selling all the fyTokens in the pool is equivalent to selling to a 0% rate in the pool, thus, we have the property that after the trade $y_2$ = $\mu \cdot z_2$:
$$
\frac{c}{\mu} \cdot (\mu z)^{1 - t} + y^{1 - t} = c \cdot \mu^{-t} \cdot z_2^{1 - t} + y_2^{1 - t}
$$
$$
\frac{c}{\mu} \cdot (\mu z)^{1 - t} + y^{1 - t} = c \cdot \mu^{-t} \cdot (\frac{y_2}{\mu})^{1 - t} + y_2^{1 - t}
$$
$$
\frac{c}{\mu} \cdot (\mu z)^{1 - t} + y^{1 - t} = y_2^{1 - t} \cdot (\frac{c}{\mu} + 1)
$$
$$
\frac{\frac{c}{\mu} \cdot (\mu z)^{1 - t} + y^{1 - t}}{(\frac{c}{\mu} + 1)} = y_2^{1 - t}
$$
$$
y_2 = (\frac{\frac{c}{\mu} \cdot (\mu z)^{1 - t} + y^{1 - t}}{(\frac{c}{\mu} + 1)})^\frac{1}{1 - t}
$$
Now that we have $y_2$, we can use this relationship:
$$
y_2 = y - \Delta y \\
\Delta y = y_2 - y
$$
$$
\Delta y = y - (\frac{\frac{c}{\mu} \cdot (\mu z)^{1 - t} + y^{1 - t}}{(\frac{c}{\mu} + 1)})^\frac{1}{1 - t}
$$
We should be able to put the above equation into "sharesInForFYTokenOut" and get a reasonable value.
### MaxSharesIn
We would like to calculate the maximum amount of shares that can be sold to the pool (bringing the pool to a 0% interest rate). As above, after the trade we have the property $y_2 = \mu * z_2$.
$$
\frac{c}{\mu} \cdot (\mu z)^{1 - t} + y^{1 - t} = c \cdot \mu^{-t} \cdot z_2^{1 - t} + y_2^{1 - t}
$$
$$
\frac{c}{\mu} \cdot (\mu z)^{1 - t} + y^{1 - t} = \frac{c}{\mu} \cdot (\mu \cdot z_2)^{1 - t} + (\mu \cdot z_2)^{1 - t}
$$
$$
\frac{c}{\mu} \cdot (\mu z)^{1 - t} + y^{1 - t} = (\mu \cdot z_2)^{1 - t} \cdot (\frac{c}{\mu} + 1)
$$
$$
(\mu \cdot z_2)^{1 - t} = \frac{\frac{c}{\mu} \cdot (\mu z)^{1 - t} + y^{1 - t} }{(\frac{c}{\mu} + 1)}
$$
$$
z_2 = \frac{1}{\mu} \cdot(\frac{\frac{c}{\mu} \cdot (\mu z)^{1 - t} + y^{1 - t} }{(\frac{c}{\mu} + 1)})^{\frac{1}{1-t}}
$$
Now that we have $z_2$, we can use this relationship to find the maximum shares in ($\Delta z$):
$$
z_2 = \Delta z + z
$$
$$
\Delta z = z_2 - z
$$
$$
\Delta z = \frac{1}{\mu} \cdot(\frac{\frac{c}{\mu} \cdot (\mu z)^{1 - t} + y^{1 - t} }{(\frac{c}{\mu} + 1)})^{\frac{1}{1-t}} - z
$$
### MaxSharesOut
MaxSharesOut is the maximum amount of shares that can be purchased from the pool. Since the amount of shares that can be purchased is not bounded, MaxSharesOut is equivalent to the toal amount of shares in the pool.
## Trade to Interest Rate
Users may wish to make a trade that leaves the AMM pool at a particular interest rate after the trade, $r'$. We can derive an equation giving us that value. We can start with the trade invariant, where $z_2$ and $y_2$ represent the reserves at the new rate 'r':
$$
\frac{c}{\mu} \cdot (\mu \cdot z)^{1 - t} + y^{1 - t} = \frac{c}{\mu} \cdot (\mu \cdot z_2)^{1 - t} + y_2^{1 - t}
$$
Let us factor out the $\mu \cdot z_2$ term on the right
$$
\frac{c}{\mu} \cdot (\mu \cdot z)^{1 - t} + y^{1 - t} = (\mu \cdot z_2)^{1 - t} \cdot (\frac{c}{\mu} \cdot + \frac{y_2^{1 - t}}{(\mu \cdot z_2)^{1 - t}})
$$
$$
\frac{c}{\mu} \cdot (\mu \cdot z)^{1 - t} + y^{1 - t} = (\mu \cdot z_2)^{1 - t} \cdot (\frac{c}{\mu} + (\frac{y_2}{\mu \cdot z_2})^{1 - t})
$$
Recall that the marginal interest rate is defined by:
$$
1 + r' = \frac{y}{\mu \cdot z}
$$
Thus
$$
\frac{c}{\mu} \cdot (\mu \cdot z)^{1 - t} + y^{1 - t} = (\mu \cdot z_2)^{1 - t} \cdot (\frac{c}{\mu} + (1 + r')^{1 - t})
$$
$$
(\mu \cdot z_2)^{1 - t} = \frac{
\frac{c}{\mu} \cdot (\mu \cdot z)^{1 - t} + y^{1 - t}}{(\frac{c}{\mu} + (1 + r')^{1 - t})}
$$
$$
z_2 = \frac{1}{\mu} \cdot (\frac{
\frac{c}{\mu} \cdot (\mu \cdot z)^{1 - t} + y^{1 - t}}{(\frac{c}{\mu} + (1 + r')^{1 - t})})^\frac{1}{1-t}
$$
Now since $z_2 = z + \Delta z$:
$$
\Delta z = \frac{1}{\mu} \cdot (\frac{
\frac{c}{\mu} \cdot (\mu \cdot z)^{1 - t} + y^{1 - t}}{(\frac{c}{\mu} + (1 + r')^{1 - t})})^\frac{1}{1-t} - z
$$
Similarly, we can calculate the change in fyTokens to achieve a particular rate. Starting with the same equation
$$
\frac{c}{\mu} \cdot (\mu \cdot z)^{1 - t} + y^{1 - t} = \frac{c}{\mu} \cdot (\mu \cdot z_2)^{1 - t} + y_2^{1 - t}
$$
and factoring out the $y_2$ term:
$$
\frac{c}{\mu} \cdot (\mu \cdot z)^{1 - t} + y^{1 - t} = y_2^{1 - t} \cdot (\frac{c}{\mu} \cdot \frac{(\mu \cdot z_2)^{1 - t}}{y_2^{1 - t}} + 1)
$$
$$
\frac{c}{\mu} \cdot (\mu \cdot z)^{1 - t} + y^{1 - t} = y_2^{1 - t} \cdot (\frac{c}{\mu} \cdot (\frac{1}{1 + r'})^{1 - t} + 1)
$$
$$
y_2 = (\frac{\frac{c}{\mu} \cdot (\mu \cdot z)^{1 - t} + y^{1 - t}}{(\frac{c}{\mu} \cdot (\frac{1}{1 + r'})^{1 - t} + 1)})^\frac{1}{1-t}
$$
Finally,
$$
\Delta y = (\frac{\frac{c}{\mu} \cdot (\mu \cdot z)^{1 - t} + y^{1 - t}}{(\frac{c}{\mu} \cdot (\frac{1}{1 + r'})^{1 - t} + 1)})^\frac{1}{1-t} -y
$$
## Invariant for Total Supply
$$
\frac{
\frac{c}{\mu} \cdot
(\frac{\frac{c}{\mu} \cdot (\mu \cdot z)^{1 - \frac{t}{g}} + y^{1 - \frac{t}{g}}}{(\frac{c}{\mu} + 1)})^{\frac{1}{1 - \frac{t}{g}}}}{s}
$$
### Derivation
We want a single formula that represents the value of a pool share so that we can verify that any operation on the pool only increases or keeps that value the same. This lets us be sure that actions on the pool cannot cause losses to LPs.
The value of a single pool share is equivalent to the entire base value of the pool divided by the number of LP shares for the pool. We obtain the base value of the pool by performing a theoretical trade that sells all fyTokens for base shares. We start with the standard calculation of a trade of fyTokens for base shares (to simplify we omit the fee exponent):
$$
\frac{c}{\mu} \cdot (\mu \cdot z)^{1 - t} + y^{1 - t} = \frac{c}{\mu} \cdot (\mu \cdot z_2)^{1 - t} + y_2^{1 - t}
$$
Since we are trading the pool to zero interest, $y_2 = \mu \cdot z_2$:
$$
\frac{c}{\mu} \cdot (\mu \cdot z)^{1 - t} + y^{1 - t} = \frac{c}{\mu} \cdot (\mu \cdot z_2)^{1 - t} + (\mu \cdot z_2)^{1 - t}
$$
$$
\frac{c}{\mu} \cdot (\mu \cdot z)^{1 - t} + y^{1 - t} = (\mu \cdot z_2)^{1 - t} \cdot (\frac{c}{\mu} + 1)
$$
$$
(\mu \cdot z_2)^{1 - t} =
\frac{\frac{c}{\mu} \cdot (\mu \cdot z)^{1 - t} + y^{1 - t}}{(\frac{c}{\mu} + 1)}
$$
$$
\mu \cdot z_2 =
(\frac{\frac{c}{\mu} \cdot (\mu \cdot z)^{1 - t} + y^{1 - t}}{(\frac{c}{\mu} + 1)})^{\frac{1}{1 - t}}
$$
$$
z_2 = \frac{1}{\mu} \cdot
(\frac{\frac{c}{\mu} \cdot (\mu \cdot z)^{1 - t} + y^{1 - t}}{(\frac{c}{\mu} + 1)})^{\frac{1}{1 - t}}
$$
$z_2$ is the total amount of shares in the pool after the theoretical trade to zero interest. To calculate the base value per share in the pool, we want to calculate:
$$
\frac{c*z_2}{s}
$$
Plugging in z_2 and adding in fee terms, we obtain the invariant:
$$
\frac{
\frac{c}{\mu} \cdot
(\frac{\frac{c}{\mu} \cdot (\mu \cdot z)^{1 - \frac{t}{g}} + y^{1 - \frac{t}{g}}}{(\frac{c}{\mu} + 1)})^{\frac{1}{1 - \frac{t}{g}}}}{s}
$$
Any action on the pool should increase the value given by the above invariant.
### Alternate Invariant
$$
\frac{c}{\mu} \cdot (\mu \cdot z)^{1 - t} + y^{1 - t} = \frac{c}{\mu} \cdot (\mu \cdot z_2)^{1 - t} + y_2^{1 - t}
$$
Final condition is $z_2 = 0$:
$$
\frac{c}{\mu} \cdot (\mu \cdot z)^{1 - t} + y^{1 - t} = y_2^{1 - t}
$$
$$
y_2 = (\frac{c}{\mu} \cdot (\mu \cdot z)^{1 - t} + y^{1 - t})^\frac{1}{1-t}
$$
In this case we are looking to see the fyToken value per share:
$$
\frac{y_2}{s}
$$
$$
\frac{(\frac{c}{\mu} \cdot (\mu \cdot z)^{1 - t} + y^{1 - t})^\frac{1}{1-t}}{s}
$$
### Initialization
When the pool is initialized, $z_{start}$ is an initial amount of shares added to the pool. $y_{start}$ and $s$ are initialized to $\mu \cdot z$. Plugging into the invariant for initial supply shows that the initial value for the invariant is 1 or greater:
$$
\frac{\frac{c}{\mu} \cdot \left( \frac{ \frac{c}{\mu} \cdot (\mu \cdot z)^{1 - \frac{t}{g}} + y^{1 - \frac{t}{g}}}{(\frac{c}{\mu} + 1)} \right)^\frac{1}{1-\frac{t}{g}}}{s}
$$
$$
\frac{\frac{c}{\mu} \cdot \left( \frac{ \frac{c}{\mu} \cdot (\mu \cdot z)^{1 - \frac{t}{g}} + (\mu \cdot z)^{1 - \frac{t}{g}}}{(\frac{c}{\mu} + 1)} \right)^\frac{1}{1-\frac{t}{g}}}{\mu \cdot z}
$$
$$
\frac{\frac{c}{\mu} \cdot \left( \frac{ (\mu \cdot z)^{1 - \frac{t}{g}} \cdot (\frac{c}{\mu} + 1) }{(\frac{c}{\mu} + 1)} \right)^\frac{1}{1-\frac{t}{g}}}{\mu \cdot z}
$$
$$
\frac{\frac{c}{\mu} \cdot \left( (\mu \cdot z)^{1 - \frac{t}{g}} \right)^\frac{1}{1-\frac{t}{g}}}{\mu \cdot z}
$$
$$
\frac{c}{\mu} \cdot \frac{\mu \cdot z}{\mu \cdot z}
$$
$$
\frac{c}{\mu}
$$
Since $c$ is always equal or greater than $\mu$, we have shown that the invariant is one or greater at initialization.
### Minting and Burning
We can show that minting or burning shares (which causes $z$, $y$, and $s$ to be multiplied by the same proportion, $m$) does not change the invariant (we omit a multiplication by $c/\mu$ which does not alter the result ):
$$
\frac{\left( \frac{ \frac{c}{\mu} \cdot (m \cdot \mu \cdot z)^{1 - \frac{t}{g}} + (m \cdot y)^{1 - \frac{t}{g}}}{(\frac{c}{\mu} + 1)} \right)^\frac{1}{1-\frac{t}{g}}}{m \cdot s}
$$
$$
\frac{\left( \frac{ m^{1 - \frac{t}{g}} \cdot (\frac{c}{\mu} \cdot (\mu \cdot z)^{1 - \frac{t}{g}} + y^{1 - \frac{t}{g}})}{(\frac{c}{\mu} + 1)} \right)^\frac{1}{1-\frac{t}{g}}}{m \cdot s}
$$
$$
\frac{m \cdot \left( \frac{ \frac{c}{\mu} \cdot (\mu \cdot z)^{1 - \frac{t}{g}} + y^{1 - \frac{t}{g}}}{(\frac{c}{\mu} + 1)} \right)^\frac{1}{1-\frac{t}{g}}}{m \cdot s}
$$
$$
\frac{\left( \frac{ \frac{c}{\mu} \cdot (\mu \cdot z)^{1 - \frac{t}{g}} + y^{1 - \frac{t}{g}}}{(\frac{c}{\mu} + 1)} \right)^\frac{1}{1-\frac{t}{g}}}{ s}
$$
### Interest accumulation
As the shares grow in value, $c$ will increase over time. $c$ should never decrease.
$$
\frac{\frac{c}{\mu} \cdot \left( \frac{ \frac{c}{\mu} \cdot (\mu \cdot z)^{1 - \frac{t}{g}} + y^{1 - \frac{t}{g}}}{(\frac{c}{\mu} + 1)} \right)^\frac{1}{1-\frac{t}{g}}}{s}
$$
Since $s$ and $\frac{1}{1-\frac{t}{g}}$ do not change when $c$ increases, we can simplify our analysis to the core expression of the invariant:
$$
\left(\frac{c}{\mu}\right)^{1 - \frac{t}{g}} \cdot \left( \frac{ \frac{c}{\mu} \cdot (\mu \cdot z)^{1 - \frac{t}{g}} + y^{1 - \frac{t}{g}}}{(\frac{c}{\mu} + 1)} \right)
$$
Let's first consider the invariant repsonds when $y = \mu \cdot z$:
$$
\left(\frac{c}{\mu}\right)^{1 - \frac{t}{g}} \cdot \left( \frac{ \frac{c}{\mu} \cdot (\mu \cdot z)^{1 - \frac{t}{g}} + (\mu \cdot z)^{1 - \frac{t}{g}}}{(\frac{c}{\mu} + 1)} \right)
$$
$$
\left(\frac{c}{\mu}\right)^{1 - \frac{t}{g}} \cdot \left( \frac{ (\mu \cdot z)^{1 - \frac{t}{g}} \cdot
(\frac{c}{\mu} + 1)
}{(\frac{c}{\mu} + 1)} \right)
$$
$$
\left(\frac{c}{\mu}\right)^{1 - \frac{t}{g}} \cdot (\mu \cdot z)^{1 - \frac{t}{g}}
$$
In this simplified form we can see that increasing $c$ increases the invariant. However, things are different for the other extreme. Consider how the invariant responds when $z=0$:
$$
\left(\frac{c}{\mu}\right)^{1 - \frac{t}{g}} \cdot \left( \frac{ \frac{c}{\mu} \cdot (\mu \cdot 0)^{1 - \frac{t}{g}} + y^{1 - \frac{t}{g}}}{(\frac{c}{\mu} + 1)} \right)
$$
$$
\left(\frac{c}{\mu}\right)^{1 - \frac{t}{g}} \cdot \left( \frac{ y^{1 - \frac{t}{g}}}{(\frac{c}{\mu} + 1)} \right)
$$
$$
\left(\frac{c}{\mu}\right)^{1 - \frac{t}{g}} \cdot \left( \frac{ y^{1 - \frac{t}{g}}}{(\frac{c}{\mu} + 1)} \right)
$$
We can re-arrange as shown:
$$
\frac{ \left(\frac{c}{\mu}\right)^{1 - \frac{t}{g}} }{(\frac{c}{\mu} + 1)} \cdot y^{1 - \frac{t}{g}}
$$
Let us define a new variable, $a = c/\mu$:
$$
\frac{ \left(a\right)^{1 - \frac{t}{g}} }{(a + 1)} \cdot y^{1 - \frac{t}{g}}
$$
We can check that this equation only goes up with increasing $a$ by checking that the derivative with respect to $a$ is positive. Taking the derivative:
$$
\frac{\partial }{\partial a} \left(\frac{ \left(a\right)^{1 - \frac{t}{g}} }{(a + 1)} \cdot y^{1 - \frac{t}{g}}\right)
$$
$$
-\frac{a^{-\frac{t}{g}}*((a + 1)\cdot t - g)}{(a + 1)^2 \cdot g}
$$
This equation is positive under the following condition:
$$
g > t \cdot (a + 1)
$$
Under normal conditions, this equation is easily satisfied. For example, for a one-year to maturity YieldSpace market where $g$ is 0.9, $t$ is configured for 10% interest rates (and 10% rates do occur), the range of values for $t$ would be 0-0.1, and $a$ of 1.0-1.1.
$$
0.9 > 0.1 \cdot (1.1 + 1)
$$
Thus, provided we are mindful of and satisify this requirement, we can consider interest accumulation as only increasing the invariant.