---
# System prepended metadata

title: Saffron V2
tags: [production]

---

---
tags: production
---

# Saffron V2

Rx3a97<sup>1</sup>
_rx@saffron.finance_

psykeeper<sup>1</sup>
_psykeeper@saffron.finance_

<sup>1</sup> Saffron Finance

> Note: This is a working version of the Saffron V2 paper printed on March 24th 2022.
## Abstract

The advent of smart contracts in the last few years have led to a decentralized finance (DeFi) system. DeFi has democratized access to sophisticated financial products eliminating the need for intermediates. On the other hand, these protocols — like centralized systems — are not immune to failures. There is little financial protection against protocol failures in DeFi, a sharp contrast with centralized systems, which are subject to government oversight at the regulatory level. Here we introduce Saffron V2, a decentralized protocol that offers a set of bonds divided into tranches with different levels of yield and coverage against protocol failure of the underlying asset. In this whitepaper, we will give a brief background on DeFi and how the Saffron V2 complements the ecosystem by offering protection for investors. We will define the Saffron V2 tranches and their properties, what determines a claimable event, and detail how the protocol calculates the yield of each tranche, insurance funds, and fees. Finally, we will show how Saffron V2 can work as a risk management tool. Our work comes as a generalization of the former Saffron V1 and brings a simple, and yet sophisticated, investment protection to the DeFi system.

## Introduction

Decentralized Finance (DeFi) has been recently loosely defined in the past by several authors (Blockchain and Project, n.d.; Chohan, 2021; Leonhard, 2019; Schär, 2021; Zetzsche et al., 2020) and, in our opinion, more precisely by (Gudgeon et al., 2020) as a peer-to-peer financial paradigm which leverages blockchain-based smart contracts to ensure its integrity and security. In fact, DeFi relies on the smart contract ecosystem for its own execution as well. The utopian objective of DeFi is to democratize access to financial tools and products as it eliminates intermediates. In the past few years, the community developing DeFi has been actively releasing financial tools ranging from borrowing and lending platforms to yield farms to decentralized exchanges and liquidity providers. All of which is accomplished without the need for intermediates and mostly through open source contracts.

However, as pointed out by others (Chohan, 2021; Zetzsche et al., 2020), there are considerable risks in the DeFi ecosystem - by October 2021 approximately US$ 1.2 billion of funds have been lost in various attacks and bugs(“Comprehensive List of DeFi Hacks & Exploits,” n.d.). Obviously, one way to mitigate these losses and protect customers is through regulation and further law enforcement at the code level (Zetzsche et al., 2020). In our opinion, this traditional solution adapted to a modern area is inherently flawed. It is obvious that in financial ecosystems permeated with private intermediates who secures market advantage against competitors through obscurity, regulation is perhaps the only solution to avoid significant and systematic loss of funds to investors. This is even more aggravated because the traditional ecosystem was the only choice for those who wanted to legally invest. Therefore, it is in our opinion that the claim that regulation is the sole solution to protect investors in the DeFi ecosystem is not valid as a reason to regulate DeFi.

First, one of the most relevant hallmarks of the DeFi ecosystem is the open source code, which defines and executes the financial instruments used by the investor. This radical transparency contrasts with the secrecy needed by intermediaries of traditional finance. In DeFi, anyone, not only a trusted party or government regulators, can audit the financial instrument itself. Investors with enough knowledge can, themselves, analyze the financial instrument code and decide if they should use it or not. Second, there are regulated alternatives to DeFi instruments in traditional finance. Thus, an investor who finds DeFi too risky and believes that regulation can make the market safer can hedge their portfolio with well-regulated financial instruments.

Notwithstanding, we are not advocating that all investors in DeFi should know how to read code. Instead, we are highlighting that it is in the best interest of the DeFi ecosystem to provide means to validate DeFi’s financial instruments. More importantly, it is to make these financial instruments safe to attract investors with no programming knowledge. Furthermore, the infrastructure behind DeFi is flexible enough to provide opportunities for on-chain risk aversion, such as insurance providers and decentralized ratings for risk assessment of available financial products and platforms.

Here, we describe the second version of the Saffron protocol, a tranche scheme for risk management for several financial instruments in the DeFi ecosystem. Through Saffron V2, investors have access to bonds issued against underlying financial products and can choose to obtain coverage against failures in the underlying asset it insures or a boosted yield. In addition, the total amount insured includes both the principal and the gains acquired during the coverage period. Nevertheless, we are one of the several initiatives to provide investment protection without the need for regulatory oversight.

## Theory and Implementation

The most general version of Saffron V2 pools is composed of two tranches and an insurance fund. Below, we will describe the tranches, the insurance fund, and their possible configurations that can be combined to build over ten financial products.

### The Senior and Junior tranches

There are two tranches in Saffron V2, a Senior tranche with lower yield and high coverage and a Junior tranche with high yield and limited coverage. The fundamental aspect of the tranche system from Saffron V2 pools is that Junior tranches provide coverage to Senior tranches while the Senior tranches boost the yield of the Junior tranche.

Furthermore, the capital in these tranches can be deployed with aggressive or conservative strategies. In the aggressive strategy, the protocol deploys the capital in both tranches to the same platform. In case of failure, the insurance funds and any recovered funds will pay the Senior tranche first, and the remainder will cover the Junior tranche losses. We call this the waterfall payback scheme. In the conservative strategy, the protocol only deploys the capital in the Senior tranche while the funds in the Junior tranche remain undeployed. In case of failure, the protocol will use the insurance fund to pay back the senior tranche first and the junior tranche later. If there are not enough funds in the insurance fund, the junior tranche will pay back the Senior tranche depositors.

### The Insurance Fund

In every pool, the protocol starts an Insurance Fund (IF). As we previously described, this fund will first cover the losses using the payback waterfall scheme paying out Senior first and Junior later. These funds are held in a USDC contract that receives yield from the other tranches. There are two types of IF: open and closed.

The Open Insurance Fund (OIF) is open for investors, and its size dynamically oscillates as more or fewer investors join it. These funds receive yield from the capital deployed according to the tranche deployment strategy of the pool. The Closed Insurance Fund (CIF) is closed for investors, controlled by the Governance, and accumulates yield indefinitely.

The insurance fund offers a different type of protection than coverage against platform failure. It offers coverage against the devaluation of the underlying asset while offering an opportunity to capture a boosted yield compared to most investment opportunities for stable coins.
### Saffron V2 pools

The Saffron V2 pools combine both flavors of tranche’s capital deployment strategy and the types of insurance funds as described in the previous section, Table 1.

Table 1: Possible strategies of capital deployment in the Saffron V2 pools.
|                         | Open Insurance Fund | Closed Insurance Fund |
| ----------------------: | :-----------------: | :-------------------: |
|   Aggressive deployment |         AO          |          AC           |
| Conservative deployment |         CO          |          CC           |

These configuration parameters allow us to deploy a total of ten different investment opportunities to a given asset, Table 2.

Table 2: Investments opportunities ranked with arbitrary qualitative units (6 high, 0 low)
|   product | coverage | yield |   risk offset    |
| --------: | :------: | :---: | :--------------: |
| AO-Senior |    5     |   2   | platform failure |
| AC-Senior |    4     |   2   | platform failure |
| CO-Senior |    6     |   1   | platform failure |
| CC-Senior |    4     |   1   | platform failure |
| AO-Junior |    3     |   6   | platform failure |
| AC-Junior |    1     |   6   | platform failure |
| CO-Junior |    2     |   5   | platform failure |
| CC-Junior |    1     |   5   | platform failure |
|     AO-IF |    0     |   4   | price volatility |
|     CO-IF |    0     |   3   | price volatility |

Together, the Saffron V2 protocol provides a range of financial products that allows the user to offset different risks at different levels with different yields.

### Junior tranche as optional

In some of the Saffron V2 pools, the Junior tranche might be closed for investors. First, the lack of the Junior tranche simplifies the tranche system for less experienced investors who now can choose of either seek coverage for the investment of the underlying asset or to provide cover using stable coins in the IF while enjoying protection against the downward movements of the underlying asset plus a boosted yield. In addition, the elimination of the junior tranche implies in a larger incentive for insurance providers and base return of the senior tranche.

### The SAFF-LP token

When a deposit is executed in either junior or senior tranches or the insurance fund, the Saffron protocol issues a bond token called SAFF<sub>j</sub>, SAFF<sub>s</sub> or SAFF<sub>if</sub>, respectively. Below, we will detail these bonds and how the algorithm calculates their price based on an exchange rate.

$$
\mathtt{SAFF}_{\{s,j,if\}} = \frac{\{S,J,IF\}}{X_{\{s,j,if\}_ｔ}}  \qquad(1)
$$

where $S$ and $J$ are the amounts deposited, in units of the underlying asset, in the senior and junior tranche respectively, $IF$ is the amount deposited in the insurance fund in the stable coin defined by the contract and $X_{\{s,j,if\}_t}$ is the rate of exchange between the bond tokens and the underlying asset at the time of deposit $t$. For example, 

### Evaluation of the SAFF<sub> {s,j,if}</sub> exchange rates

The exchange rates of the bonds are updated every time there is a new request of deposit or withdrawal but before any of these actions. The protocol calculates the exchange rates at time $t_1 > t_0$ according to the following:

First, it calculates the earnings’ increment, $\Delta e$, by comparing the difference of the total amount locked in the underlying financial product at time $t_1$ since time $t_0$.

$$
\Delta e = T_{t_1} - T_{t_0} \qquad(2)
$$

where $\Delta e$ is the total earnings' increment and $T$ is the total number of tokens deployed. In Saffron V2, depending on the configuration of the pool, both senior and junior or only the senior tranche can be deployed. 

We use tranche multipliers $m_s$, $m_j$, $m_{if}$ to calculate the earnings' increment fraction of each tranche:

$$
\begin{array}{l}
\Delta e_{s} = m_s * \Delta e \\
\Delta e_{j} = m_j * \Delta e \\
\Delta e_{if} = m_{if} * \Delta e
\end{array} \qquad(3)
$$

where $\Delta e_{\{s,j,if\}_{t_1}}$ is the earnings' increment of each tranche between time $t_0$ and $t_1$. If there is a significant amount of earnings during a status update, the protocol recalculates the exchange rate similarly to how Compound does (Leshner and Hayes, 2019).

$$
\begin{array}{l}
X_{s_{t_1}} = X_{s_{t_0}} + \dfrac{\Delta e_s} {T_{{\mathtt{SAFF}_s}_{t_0}}} \\
X_{j_{t_1}} = X_{j_{t_0}} + \dfrac{\Delta e_j} {T_{{\mathtt{SAFF}_j}_{t_0}}} \\
X_{if_{t_1}} = X_{if_{t_0}} + \dfrac{\Delta e_{if}} {T_{{\mathtt{SAFF}_{if}}_{t_0}}} \\
\end{array} \qquad(4)
$$

where $T_{{\mathtt{SAFF}_{\{s,j,if\}}}_{t_0}}$ are the total supply of each bond token issued at the time $t_0$. Importantly, when $T_{{\mathtt{SAFF}_{\{s,j,if\}}}_{t_0}} = 0$, the respective exchange rate is set to 1. Since the exchange rates are updated at every status change, we can calculate the exchange rates for any given time $t$ since time $t_0$ of deposit as:

$$
\begin{array}{l}
X_{s_{t}} = X_{s_{t_0}} + \sum_{i=1}^{t} \dfrac{\Delta {e_s}_{i}} {T_{{\mathtt{SAFF}_s}_{i-1}}} \\
X_{j_{t}} = X_{j_{t_0}} + \sum_{i=1}^{t} \dfrac{\Delta {e_j}_{i}} {T_{{\mathtt{SAFF}_j}_{i-1}}} \\
X_{if_{t}} = X_{if_{t_0}} + \sum_{i=1}^{t} \dfrac{\Delta {e_{if}}_{i}} {T_{{\mathtt{SAFF}_{if}}_{i-1}}} \\
\end{array} \qquad(5)
$$

where $\Delta e_{\{s,j,if\}_{i}}$ is the earnings' increment of each tranche between time $i$ and $i-1$ and $T_{{\mathtt{SAFF}_{\{s,j,if\}}}_{i}}$ are the total supply of each bond token at the time $i$.

### Performance Fee

There are no premiums, deposit or withdrawal fees in the Saffron V2 protocol. Instead, the protocol collects a performance fee as a percentage of the earnings. The collected fees are converted and sent to the Treasury when called by the Governance.

Fees emerge as a mathematical consequence that the multipliers described above do not add up to one.

$$
m_s + m_j + m_{if} < 1 \qquad(6)
$$

Thus, the fees are simply calculated as the remainder of the earnings:

$$
f_{t_1} = f_{t_0} + (\Delta e - \Delta e_s - \Delta e_j - \Delta e_{if})
 \qquad(7)
$$

### Redeeming the SAFF<sub>{s,j,if}</sub> bonds

Both tranches SAFF<sub>{s,j,if}</sub> are locked by default. To redeem, the owner needs to request it and wait one week until the funds can be withdrawn. The price of the bond is set at the time, $t$, of the request, and the total amount to be received is calculated as:

$$
\{S,J,IF\}_{t} = X_{\{s,j,if\}_{t}}   \mathtt{SAFF}_{\{s,j,if\}} \qquad(8)
$$

### After a claimable state

In the event of a failure that leads to a claimable state, the exchange rates are set according to the following protocol.

Let $A$ be the recovered amount of the underlying asset plus the capital that has not been deployed. Let $X_{\{s,j,if\}_f}$ be the last exchange rates prior to the failure event. These exchange rates are states of the Saffron pool and do not need to be calculated again. Instead, they are set variables for the contract to calculate the new exchange rates using the waterfall protocol according to the following algorithm:

```javascript
// X_s_f, X_j_f and X_if_f are given by the pool at the time of failure

let rest = A; // amount recovered
let X_s_c = 0;
let X_j_c = 0;
let X_if_c = 0;

// calculates tentative exchange rate for senior
X_s_c = A / SAFF_s;
// if it is equal or smaller than the rate pre failure return,
// if not, calculate the rest
if (X_s_c <= X_s_f) return;
// sets the exchange rate post failure as pre failure for senior
X_s_c = X_s_f;
// calculates the amount of recovered funds left
rest -= X_s_c * SAFF_s;
// calculates the junior exchange rate
X_j_c = rest / SAFF_j;
// if it is equal or smaller than the rate pre failure return,
// if not, calculate the rest
if (X_j_c <= X_j_f) return;
// sets the exchange rate post failure as pre failure for senior
X_j_c = X_j_f;
// calculates the amount of recovered funds left
rest -= X_j_c * SAFF_j;
// calculates the exchange rate for the insurance fund
X_if_c = rest / SAFF_if;
```

The pool is open for withdrawal after setting the exchange rates as demonstrated above. The amount to be received for each user can be calculated based on the amount of SAFF<sub>{s,j,if}</sub> they held using equation (8). It is worth notice that in Saffron V2 protocol, the insurance policy includes the profits acquired during the lock period.

### Cost of Insurance

The coverage offered by the Saffron pools has a cost that can be conceptually conceived as the difference between the expected returns of deploying the capital to the underlying asset alone and deploying it to the insured tranches.

Let Alice invest her capital $C_A$ in the Senior tranche at time $t=0$ when the exchange rate of the Senior tranche is ${X_{S}}_0$.She wonders how much the coverage costs because Saffron V2 pools do not have premiums. The cost of insurance is calculated from the yield that the tranche has in comparison to the underlying platform it is insuring. It can be seen as a performance fee.

To calculate the cost of insurance we can calculate the return of the Senior tranche using equations (1), (5) and (8):

$$
{C^\prime_A}_S = \mathtt{SAFF}_{S}{X_{S}}_t = C_A \frac{{X_{S}}_t}{{X_{S}}_0} = C_A \left (1 + \frac{m_S}{{X_S}_0} \sum_{i=1}^{t} \frac{\Delta e_i}{{T_S}_i}\right ) \quad(9)
$$

Thus, to calculate Alice's earnings:

$$
\Delta {C^\prime_A}_S = {C^\prime_A}_S - C_A = C_A \frac{m_S}{{X_S}_0} \sum_{i=1}^{t} \frac{\Delta e_i}{{T_S}_i} \quad(10)
$$

and the relative earning in relation to her initial investment:

$$
\frac{\Delta {C^\prime_A}_S}{{C_A}_S} = \frac{m_S}{{X_S}_0} \sum_{i=1}^{t} \frac{\Delta e_i}{{T_S}_i} \quad(11)
$$

similarly, we can calculate what would be the return under the underlying platform:

$$
\frac{\Delta {C^\prime_A}}{C_A} = \frac{1}{X_0}\sum_{i=1}^{t} \frac{\Delta e_i}{T_i} \quad(12)
$$

Thus the cost of insurance is the difference from what the investor could have received from the platform versus what they will receive from the Senior tranche given the same performance of the underlying platform

$$
\mathtt{cost Of Insurance} = {\Delta C^\prime_A} - \Delta {C^\prime_A}_S = C_A \left (\frac{1}{X_0}\sum_{i=1}^{t} \frac{\Delta e_i}{T_i} \right ) - C_A \left (\frac{m_S}{{X_S}_0} \sum_{i=1}^{t} \frac{\Delta e_i}{{T_S}_i} \right ) \quad(13)
$$

Here, $X_0 = {X_S}_0$ and $T_i = {T_S}_i$ as it emulates an alternative single tranche with the same characteristics as the Senior tranche but with a multiplier of 1.

$$
\mathtt{cost Of Insurance} = C_A \left (\frac{1}{{X}_0} \sum_{i=1}^{t} \frac{\Delta e_i}{{T}_i} \right ) ( 1 - m_S )\quad(14)
$$

Thus, the relative cost of insurance of a Saffron V2 pool is proportional to $1-m_S$. We can futher calculate the relative cost of insurance per insured amount. The coverage provided by the Junior tranche is relative to the size of the tranches, which varies according to market conditions but in a situation with a balanced tranche the covered percentage is the ratio cap between the two tranches $\kappa = \frac{J}{S}$. Thus, the relative cost of insurance, per unit of capital covered is proportional to $\kappa(1-m_S)$

## Study case

### Saffron V2 CO pool and failure of the underlying platform

Let AcmeLending be a lending platform with a pool using their token Alen. AcmeLending is new but has a high yield. Let the Saffron-AcmeLending-CO pool be a Saffron V2 CO pool that issues bonds against the Alen coin lending pool using the AcmeLending protocol as the underlying asset with a cap on the Junior tranche as $1/5$ of the Senior tranche. As previously described, the CO pools have the insurance funds open for investors. It deploys only the capital deposited in the Senior tranche to the underlying pool, and the yield shares are distributed according to the following multipliers, Table 3.

Table 3: Example of multipliers in the V2 Saffron Protocol
| multiplier | value |
| :--------: | :---: |
|   $m_s$    | 0.150 |
|   $m_j$    | 0.600 |
|  $m_{if}$  | 0.125 |

Now, let Alice, Bob, and Carol be investors with different investment profiles. Alice is a conservative investor, she is impressed by the yields in the AcmeLending platform, but she is skeptical given how new the protocol is. Bob is an aggressive investor and is interested in the highest yield possible. He trusts that AcmeLending has a low chance to fail but thinks that the yield of the platform is high but not high enough for an his investment profile. Carol is also an aggressive investor that completely trusts that the AcmeLending protocol will not fail them. However, Carol believes that the Alen coin will lose its value against stable coins, so she does not want to invest in the underlying asset of the AcmeLending pool, although she appreciates the relatively high yield.

Under this scenario, let’s suppose that the APR of the AcmeLending Alen coin pool is 12%. For simplicity, let’s assume that Alice, Bob, and Carol all had their initial deposits at the same time. Fitting her profile, Alice deposits 1000 Alen to the Senior tranche of the Saffron-AcmeLending-CO pool and receives 1000 ${\mathtt{SAFF}_{s}}$ tokens as the exchange rate was 1. Because of the cap, Bob can only deposit 200 Alen to the Junior tranche and got back 200 ${\mathtt{SAFF}_{j}}$ tokens. Finally, Carol adds 300 Stable coins to the insurance fund to get 300 ${\mathtt{SAFF}_{if}}$ tokens. Table 4 summarizes the initial condition of the pool.

Table 4: Initial bond position and deposited asset for each investor
|investor| position | Deposited Asset |
|:-:|:-:|:-:|
|Alice | 1000 ${\mathtt{SAFF}_{s}}$ | Alen coin |
| Bob | 200 ${\mathtt{SAFF}_{j}}$ | Alen coin |
| Carol | 300 ${\mathtt{SAFF}_{if}}$ | Stable coin |

The CO pools only deploy the Senior tranche. Thus, after a month, there is 10 Alen coin as earnings in the Saffron-AcmeLending-CO pool. To update the new exchange rate, let’s use the set of equations (3) and (4) assuming a 1:1 exchange rate between Alen and Stable coins, Table 5.

Table 5: Earnings and Exchange rate calculated for each tranche and IF.
|tranche | earnings | exchange rate |
|:-:|:-:|:-|
| Senior | 1.5 | $1 + \dfrac{1.5}{1000} = 1.0015$ |
| Junior | 6.0 | $1 + \dfrac{6.0}{200} = 1.03$|
| Insurance Fund | 1.25 | $1 + \dfrac{1.25}{300} = 1.004$|

In the scenario that each investor was to redeem their bonds, the bond value can be calculated using equation (7). In addition, the effective APR for each investment can be calculated by taking the earnings in the percentage of the initial deposit and multiplying it by 12, Table 6.

Table 6: Earnings for each investor after a month
|investor| initial position | withdraw amount | withdraw asset | Effective APR |
|:-:|:-:|:-:|:-:|:-:|
|Alice | 1000 ${\mathtt{SAFF}_{s}}$ | 1001.5 |Alen coin | 1.8% |
| Bob | 200 ${\mathtt{SAFF}_{j}}$ | 206 | Alen coin | 36% |
| Carol | 300 ${\mathtt{SAFF}_{if}}$ | 301.25 |Stable coin | 5% |

The sum of these positions adds up to 1508.78 Alen coins, while the total holding of the pool is 1510 Alen coins. The difference, 1.25 Alen, is collected as Governance fees. We can see that this amount equals the fees calculated using equation (7), explicitly:

$$
f = 10 - 10(0.15 + 0.6 + 0.125) = 10(1 - 0.875) = 10 * 0.125 = 1.25
$$

### Claimable state

Let’s assume that a catastrophic failure of the AcmeLending protocol triggers the claimable state. In this case, all bonds remain locked because the Governance sets the exchange rates to all tranches and IF to zero. Also, all the exchange rates are set according to the calculations in the waterfall protocol.

Let’s assume that 50% of the deployed capital was recovered, $1010 / 2 = 505$. This means that the total holdings of the pool are now the sum of the recovered capital, the undeployed capital from the Junior tranche, and the IF: $505 + 200 + 300 = 1005$. This is set as the total recovered assets. The protocol follows the algorithm previously described to calculate the claimable exchange rates for tranches and IF.

First it calculates the tentative ${X_{s}}_c = 1005 / 1000 = 1.005$ which is larger than ${X_{s}}_f = 1.0015$. In this case, the protocol sets ${X_{s}}_c = {X_{s}}_f$ and calculates the remainder of the funds available as $R = 1005 - 1000 * 1.0015 = 1005 - 1001.5 = 3.5$.Next, it proceeds to calculate the tentative exchange rate for the junior tranche as ${X_{s}}_c = 3.5 / 200 = 0.0175$ which is less than ${X_{s}}_f = 1.03$ which makes the algorithm to return without changing the IF exchange rate. At this point, Alice has all her principal and gains covered by the Junior tranche and IF. Bob has lost 98.25% of his principal and all of his gains, and Carol lost all her funds, Table 7.

Table 7: Final state after a failure in the underlying asset
|investor| initial portfolio | final portfolio | asset | principal recovered (%) | gains recovered (%) |
|:-:|:-:|:-:|:-:|:-:|:-:|
|Alice | 1000 | 1001.5 |Alen coin | 100% | 100% |
| Bob | 200 | 3.5 | Alen coin | 1.75% | 0% |
| Carol | 300 | 0 | Stable coin | 0% | 0% |

From this state, the pool will be permanently closed for new deposits, and the exchange rates will not be updated. All $\mathtt{SAFF}$ tokens with a larger than zero exchange rate can be redeemed.

### Cost of Insurance

Interestingly, using equation (13) Alice theoretically paid $10 (1 - 0.15) = 7.5$ Alens for the insurance. Even if none of the deployed capital were recovered, the Junior tranche and IF would have provided insurance for half of Alice’s capital. In other words, in this example Alice recovered 500 Alens - close to half of her capital - paying only 7.5 Alens, which is equivalent to 0.7% of the total capital deployed and only 1.5% of the capital recovered.

## Price protection

In the previous examples, we considered that the exchange rate of the pair Alen/Stable was invariant over the course of the analysis. Let's now consider, instead a failure of the underlying platform, a sudden rise of 25% in the Alen/Stable pair, which means a devaluation of 25% of the Alen coin against the Stable coin. For that, let's consider that the initial exchange rate of the pair was ${(A/S)}_0 = 1$ and that at the time of withdraw, it was ${(A/S)}_f = 0.75$. In other words, 1 Alen is equivalent to 0.75 Stable at the time of widthdraw.

In this scenario, it is important to calculate the potifolio of Alice, Bob and Carol in units of the Stable Coin, at the time of deeposit and after widthdraw, Table 8. 

Table 8: Evolution of Alice's, Bob's and Carol's portfolios in units of Stable coin in the scenario of a devaluation of Alen relative to Stable. 
|investor| initial portfolio | final portfolio | change | 
|:-:|:-:|:-:|:-:|
| Alice | 1000 | 751.12 | -24.89% |
| Bob | 200 | 154.5 | -22.75% |
| Carol | 300 | 300.9375 | +0.31% |

It is worth noticing that in this scenario, the gain acquaired by the IF is in Alen and therefore suffers a significant devaluation against the Stable. In this example, Carol's gain of equivalent of 1.25 Alen now is worth 0.9475 Stable which thus still leads to an effective APR of 3.75%. Also, that some of the price-related loss in the capital of the other tranches was mitigated by the earnings mechanism. Overall all tranches performed better than locked Alen with zero interest.

## Discussion

The Saffron V2 pools offer flexibility in covering risk management in DeFi. The pools encoded by the Saffron V2 protocol are financial tools to offset the risks of investments in crypto assets. More specifically, it tackles two types of risks: 1) platform failure and 2) price volatility. It works by separating the yield of the underlying assets into two tranches. The Senior tranche forfeits part of their return to boost the return of investment of a Junior tranche which in turn, provides coverage to the capital on the Senior tranche. In addition to this mechanism, Saffron V2 pools are coupled to an insurance fund. This new element serves to lower the price of coverage for Senior tranches and may offer coverage to Junior tranches. The Closed Insurance Funds build from the yield of the tranches. The Open Insurance Funds build from investors who provide this extra coverage for the tranches in exchange for a high yield in stable coins. For the insurance fund investor, this is an opportunity to receive some of the high yield from the underlying platform while offsetting the price volatility risk of the underlying asset. 

These financial tools provide a range of opportunities for different investment profiles. Although Junior tranche and Insurance Fund are vehicles intended to provide high yield, Saffron’s main goal is to provide coverage to conservative investors. In addition, Saffron aggressive coverage policy includes the gains acquired during the investment period.

## Conclusion

In this whitepaper, we presented the Saffron V2 protocol. We demonstrated how the system of tranches paired with an Insurance fund provides a range of financial tools to offset different types of risks and high yield opportunities. Contrary to the Saffron V1 protocol, the second version introduced here allows for continuous capital deployment and widthdraw. Also, it can easily deployed against a variety of underlying assets in DeFi ecosystems.

## Acknowledgements
We thank the Saffron team for their insightful comments, in particular for the several rounds of discussion with Darrow, Dingo, Maze, Tupelo and Turpintinz.

## References

* Blockchain, W., Project, D.A., 2021. DeFi Beyond the Hype 20.
* Chohan, U.W., 2021. Decentralized Finance (DeFi): An Emergent Alternative Financial Architecture (SSRN Scholarly Paper No. ID 3791921). Social Science Research Network, Rochester, NY. https://doi.org/10.2139/ssrn.3791921
* Comprehensive List of DeFi Hacks & Exploits, n.d. . CryptoSec. URL https://cryptosec.info/defi-hacks/ (accessed 10.6.21).
* Leonhard, R., 2019. Decentralized Finance on the Ethereum Blockchain (SSRN Scholarly Paper No. ID 3359732). Social Science Research Network, Rochester, NY. https://doi.org/10.2139/ssrn.3359732
* Leshner, R., Hayes, G., 2019. Compound:  The Money Market Protocol.
* Schär, F., 2021. Decentralized Finance: On Blockchain- and Smart Contract-Based Financial Markets (SSRN Scholarly Paper No. ID 3843844). Social Science Research Network, Rochester, NY. https://doi.org/10.20955/r.103.153-74
* Zetzsche, D.A., Arner, D.W., Buckley, R.P., 2020. Decentralized Finance. J. Financ. Regul. 6, 172–203. https://doi.org/10.1093/jfr/fjaa010
