# Introduction to Pods Yield

What is Pods Yield?

Pods Yield is a 1-click-deposit investment product.  It makes it easy to invest in complex derivatives strategies. In traditional finance, it is similar to a structured product.

Pods Yield’s first strategy is called **stETHvv** (Eth Volatility Vault). stETHvv is a **principal protected** (You never withdraw less than you initially started), **low-risk strategy** focused on **ETH accumulation.**&#x20;

For the principal protected strategy, we have a hybrid on-chain/off-chain model, where we offer the best of the two worlds: on-chain security with off-chain pricing and liquidity. The principal stays on-chain, and part of the weekly yield is sent to the controller who can access off-chain opportunities.

Find out more about stETHvv and its implementation in the following sections.

## Risks

Pods Yield is exposed to several risks, which may result in partial or total loss of funds. If you want to learn more about risks, please visit the "Risks" section.

{% hint style="info" %}
*Users who agree to deposit in the vault know and agree with those risks.*&#x20;
{% endhint %}


# What is stETHvv?

stETHvv is short for stETH Volatility Vault.

stETHvv (**stETH Volatility Vault**) is a DeFi structured product, available on Ethereum Mainnet.&#x20;

It focuses on getting a consistent yield on ETH and takes advantage of high volatility periods, where it can yield more.

Some of the stETHvv characteristics are:

* ✅ Principal protected (principal is never exposed to market risk).
* ✅ Receives deposits in stETH (and soon ETH).
* ✅ Risk-controlled derivative strategy.
* ✅ One-click deposit.
* ✅ ETH-denominated strategy.

## Getting Started

**Got 5 minutes?** Check out a video overview of stETHvv on the link below.

{% embed url="<https://youtu.be/t2MpnxpHMiI>" %}
&#x20;
{% endembed %}


# Description

Learn about how is stETHvv is structured.

## Assumptions

The stETHvv assumes that ETH price is highly volatile and will continue to be volatile. This product creates a derivative structure to let users benefit from ETHs volatility. The **direction of the market movements doesn't matter** as the strategy can benefit both when the asset **price goes up** and **when it goes down**.

The strategy also assumes that Lido is a reputable source of a base yield on ETH. Find more about Lido [here](https://docs.lido.fi/).

## The structure

stETHvv has two main components: **a yield source** and **a derivative structure**.

### The yield source

Currently, the vault can only receive deposits in stETH (ETH deposits are coming soon). stETH is an interest-bearing token that represents Ethereum 2 staking rewards within Lidos liquid staking implementation.&#x20;

stETH tokens generate returns daily. Those returns compound every week.&#x20;

### The derivative structure

The vault applies a principal protected strategy using derivatives. Being a principal-protected strategy, it will never apply market risk to the principal. This means that the derivative strategy only uses the yield accrued within the vault to set up the structure - **never the principal.**&#x20;

&#x20;The strategy accumulated the daily yield from Lido stETH over a week and every Friday it separates 50% of the accrued yield to buy the derivative structure.&#x20;

The derivative structure is made of buying calls and puts, ranging from 10% to 20% OTM with weekly maturities. This structure is also known as a strangle.

Let's take an example.

The current spot price of ETH is 2000, so the strike for the put would be at least 1800 and 2200 for the call.&#x20;

But let's say that the strikes available in the venues are:

PUT:&#x20;

* option 1: 1850 -> 7.5% OTM
* option 2: 1700 -> 15% OTM

CALL:

* option 1: 2150 -> 7.5% OTM&#x20;
* option 2: 2300 -> 15% OTM

In this case, we always respect the 10% to 20% OTM, and we would choose option 2 in both scenarios.

### The scenarios

📈 If the ETH price moves up considerably, the call option may enter *in-the-money* and return more than the yield used to purchase it.&#x20;

📉 If the ETH price crashes, the put option may enter *in-the-money*, returning more than the yield used to purchase it.&#x20;

📊 If there were not enough volatility, the vault would only lose 50% of the yield generated by Lido that week.&#x20;

This way we can preserve the principal deposited and let it grow with Lido, risking only part of the yield to put together the strangle strategy.&#x20;

### The users

This strategy is perfect for those that hold ETH, believe ETH is gonna continue to be a volatile asset, and want to accumulate more ETH over time with controlled risks.


# System Actors

Understand the system actors

There are six main actors in stETHvv design:&#x20;

* Depositors
* Yield Source
* Investor
* Vault Controller
* Round Processor
* Vault

Each actor has an essential role in stETHvv's functionality, which we will cover in this section.&#x20;

### Depositors&#x20;

The depositors are all the users who **deposit** `stETH` (and soon `ETH`) into `stETHvv`. They can be either an EOA (Externed Owned Account) or a contract. This actor will later be able to withdraw their funds alongside their earnings.&#x20;

### Yield Source

The Yield Source is the source of the base yield for this strategy. In the case of stETHvv, the yield source is [Lido Finance](https://lido.fi/).&#x20;

### Investor&#x20;

The Investor EOA (or Multisig) is responsible for buying the put and call options and setting the strangle strategy weekly. The Investor wallet receives part of the weekly yield from the Yield Source, which we call the Investor Ratio (currently set at 50%), and buys the options manually. In case the options bought end *in-the-money*, the profit from the exercised options stays in this wallet and later is sent back to the vault so that they are redeposited into the Yield Source, respecting users' shares proportionately.&#x20;

{% hint style="danger" %}
NOTE: Currently this part of the process is centralized and could even be held off-chain. We intend to automate the option purchases as we see more liquid options available. As of now holding the options purchases on chain would represent a much worse execution, impacting the strategy's profitability significantly.&#x20;
{% endhint %}

{% hint style="success" %}
Admin keys only have access to the 50% of the weekly yield, usually, this represents less than 1% of the TVL.&#x20;
{% endhint %}

### Vault Controller&#x20;

The VaultController is a Multisig responsible for calling the `startRound` and `endRound` functions round. He can also act as a `Depositor` and as a `RoundProcessor`.&#x20;

### Vault&#x20;

A vault is a smart contract that connects all the players to make the strategy work. The vault:

* Receives funds from depositors.
* Calculates the generated interest in the week.
* Create shares for the depositors.
* Receives the profit from exercised options.
* Send part of the yield to the investor's address.

### Round Processor&#x20;

The role of this actor is to process the queued deposits after the `endRound` the function was called and before the `startRound` was called, meaning, only when the flag `isProcessingDeposits` true.&#x20;

In our internal process, the actor `VaultController` will also be responsible for processing the deposits of the week to create a smoother user experience. It is important to highlight that any address could process its own or other deposits, which means that this step does not rely on the Vault Controller itself.&#x20;


# How stETHvv Works

Rounds and events.

stETHvv is composed of Rounds, and there are 3 main events/periods that should be highlighted:

* Start Round
* End Round
* Deposits Processing Window

Each period triggers specific functions which we will cover in this section.&#x20;

## Quick Overview

<figure><img src="/files/WkRgfWQy4jj4TN5p0qI8" alt=""><figcaption><p>Diagram 1 - stETHvv vault flow</p></figcaption></figure>

This image represents the basic flow of the vault's lifetime.&#x20;

Deposits and Withdrawals happen when the flag `isProcessingDeposits` is set to false. If the address wants to withdraw before waiting for your shares to be processed, it is possible to use the function withdrawFromTheQueue which will remove the address from the queue and return his funds to the owner.

## Start Round

The Start Round moment sets:

* The allowance of new deposits into the vault;
* The processing of deposits is no longer allowed;
* The allowance of withdrawals from the vault;
* It also sets the `lastRoundAssets` that will be used to calculate the total yield generated during the round period;

The moment of the creation of the vault is called the moment *zero* or round zero, which sets the start of the rounds system.&#x20;

## End Round

The End Round defines the moment where: &#x20;

* Deposits and withdrawals are blocked until the start of the next round;
* Any premium won from exercised options is moved from the Investor Wallet to the Vault;
* The weekly yield is calculated based on the `lastRoundAssets` variable and the current balance
* Part of the yield (Investor Ratio) is transferred to the Investor's wallet. That yield will be used by the Investor Wallet to buy the new options;

## Deposits Processing Window

As the name suggests, all the funds deposited from the Start to the End Round are processed during this window between the end of the current round and the start of the next round. During this period:  &#x20;

* Newly deposited funds are moved from the vault to the Yield Source (in this case, Lido Finance);


# User Flow

Let's simulate the user flow in this section.

## Round 0: Vault Creation

### Round 0: Start Round

The vault is created and, in Round 0, the following happens:

* User A: deposits 100 stETH
* User B: deposits 200 stETH
* User C: deposits 300 stETH

### Round 0: End Round

As Round 0 is the very first round, no yield was accrued. With the `EndRound`, the deposits and withdrawals are paused.&#x20;

### Round 0: Deposits Processing Window

After the `endRound`, the deposits from users A, B, and C are processed, and their shares are created according to the following function:

$$
newShares = amountDeposited \* totalSupply/totalAssets
$$

As User A was the first one to deposit into the vault, he is the one that sets the starting number of `totalSupply` and `totalAssets` of the vault, where:

$$
sharesA = amountDeposited = totalSupply = totalAssets
$$

Considering this, the amount of shares each user gets is:

* `sharesA`: 100 \* 100/100 = 100 shares
* `sharesB`: 200 \* 100/100 = 200 shares
* `sharesC`: 300 \* 300/300 = 300 shares

## Round 1

### Round 1: Start Round

At the start of Round 1:

* New deposits and withdrawals are re-enabled;
* The processed deposits (600 stETH) are moved from the vault to the Yield Source, in this case, Lido Finance and
* The initial position is set: 100 (user A) + 200 (user B) + 300 (user C) = 600&#x20;

Right after the deposits are allowed again, a new deposit is made into stETHvv:&#x20;

* User D: deposits 100 stETH

### Round 1: End Round

Considering that 600 stETH remained idle in the contract, and 4.2 stETH was generated in interest (considering a 0.7% weekly yield on stETH). From this 4.2 ETH, we will take 50% (2.1 ETH) of that and transfer it to the Investor Wallet.&#x20;

The 2.1 ETH transferred to the Investor Wallet is used to pay for the premium of buying the put and call options, setting up the strangle strategy for the next week.&#x20;

### Round 1: Deposits Processing Window

The deposit window is very short, and it shouldn't take more than an hour.&#x20;

* User D's deposit is processed;
* User D's shares are created:&#x20;
  1. amount = 100 stETH
  2. `totalSupply` = 600 shares
  3. `totalAssets` = 600 stETH + 4.2 stETH (interest) - 2.1 stETH (yield sent to Investor Wallet) = 602.1 stETH
  4. `sharesD` = 100 \* 600/602.1 = 99.65 shares

## Round 2

### Round 2: Start Round

At the start of Round 2:

* New deposits and withdrawals are re-enabled;
* The initial position is set: 600 (previous deposits) + 100 (user D) + 2.1 (yield of the week) = 702.1

Right after the deposits are allowed again, a new deposit is made into stETHvv:&#x20;

* User E: deposits 100 stETH

### Round 2: End Round

Let's say that:

* The call options bought by the Investor Wallet in Round 1 ended *in-the-money* and generated 10 stETH of profit
  1. A 20% performance fee will be charged (2 stETH) and sent to the Pods treasury
  2. The remaining 8 ETH will be transferred from the Investor Wallet to the Vault&#x20;
* 4.9147 stETH of interest was generated by the Lido, which implies that:
  1. 2.45735 stETH (50%) is transferred to the Investor Wallet
  2. And these funds will be used to buy the new put and call options of the week

### Round 2: Deposits Processing Window

* User E's deposit is processed;
* User E's shares are created:&#x20;
  1. amount = 100 ETH
  2. `totalSupply` = 99.65 (`sharesD`) + 100 (`sharesA`)+ 200 (`sharesB`)+ 300 (`sharesC`) = 699.65 shares
  3. `totalAssets` = 702.1 (initial position) + 4.9147 (weekly interest) - 2.45735 (yield sent to Investor Wallet) + 10 (exercised options) - 2 (performance fee) = 712.55735 ETH
  4. `sharesE` = 100 \* 699.65 / 712.55735 = 98.19 shares

And so it goes the next rounds...

### Observations

Users must go through one full round after the deposit has been made to be exposed to the strangle strategy.&#x20;


# stETHvv Timeline

### Timeline

* End Round: Friday 15:00 UTC
* Start Round: Friday 15:30 UTC
* Deposits Processing Window: between the end of the current round and the start of the following round&#x20;
* Options Buying: Friday after the End Round

### Observations&#x20;

1. Deposits can **only** happen between the `startRound` and the `endRound`.
2. Withdrawals can **only** happen between the `startRound` and the `endRound`.
3. All funds deposited between `startRound` and `endRound` are processed **together** at the same time.&#x20;

Considering how the current system is designed, we advise our users to deposit funds into the vault ***closer to the start of the next round***.&#x20;

This happens because:

* Any yield generated in the vault by the yield strategy (in this case, Lido) before the deposit has been processed will NOT be considered.&#x20;

{% hint style="info" %} <mark style="color:blue;">This means that the best moment to deposit is on Thursday night, ET time. And the best moment to withdraw is after the current week's round is finished, Friday night, ET time.</mark>&#x20;
{% endhint %}


# Fees

Pods Finance has different types of fees based on the type of vault that you invest in:

#### Volatility Vault (stETHvv):&#x20;

* **20% performance fees** from the profit from exercised options that end *in-the-money*.
* a **management fee of 0.1%** at the withdrawal transaction.&#x20;

#### FUD Vault :&#x20;

* **10% performance fees** from the profit from exercised options that end *in-the-money*.
* **10% performance fees** from the AAVE yield

#### ETHphoria Vault :&#x20;

* **10% performance fees** from the profit from exercised options that end *in-the-money*.
* **10% performance fees** from the Lido yield


# Whitepaper

All the documentation that you have read above was condensed into a whitepaper that you can find at: <https://github.com/pods-finance/yield-contracts/blob/main/stethvv-whitepaper.pdf>


# Security Overview

Security is a core pillar of our organization, and this section provides a high-level overview of the various security measures we have in place to safeguard our operations.

* [Audits](#audits)
* [Bug Bounty Program (BBP)](#bug-bounty-program)
* [Access / Admin Controls](#access-control)
* [Quality Review - DeFi Safety](#quality-review-defi-safety)
* [Other Achievements](#other-achievements)

### 🛡 Audits

We uphold the highest industry standards by regularly undergoing audits conducted by reputable third-party organizations. Our stETHvv 2.0 and 1.0 contracts, including their dependencies, have been thoroughly audited by organizations such as **OpenZeppelin and ABDK. CredShields** also audited the stETHvv 1.0 version. The full list of audits conducted, along with their reports, can be found on our [GitHub page](https://github.com/pods-finance/yield-contracts/tree/main/audits).

### 🐛 Bug Bounty Program

Our commitment to security also extends to encouraging external contributions through a [Bug Bounty Program](https://immunefi.com/bounty/pods/), hosted on ImmuneFi. By offering rewards of up to **$100,000 or 5% of the funds at risk**, we actively incentivize the discovery and reporting of potential vulnerabilities in our system.

### 🔐 Access Control

In our system, we adopt a layered access control approach. Our smart contracts architecture has been designed to mitigate risks associated with administrative access, permanent freezing of funds, and malicious upgrades. Users can exit their positions at any point, and the withdrawal fee is capped at 10% to avoid unfair fee increases.

A variety of roles are involved in managing our system, each with specific responsibilities:

1. **VaultController**: A 2/3 multisig role responsible for initiating and ending the round in the vault.
2. **ConfigurationManager Owner**: Also a 2/3 multisig role, this role is in charge of setting the VaultController, withdrawal fee ratio, migration contract, and cap of a specific vault.
3. **Investor**: The Investor role, another 2/3 multisig role, is entrusted with utilizing 50% of the weekly yield to buy options at the most advantageous prices.

Each of these roles is designed with stringent access controls to ensure security and transparency within our organization. For a more in-depth explanation of these roles and their permissions, please refer to the specific sections.

### 🏅 Quality Review - DeFi Safety

We are committed to maintaining the highest level of quality and security in our operations. To this end, we recently engaged DeFi Safety, a well-regarded entity in the blockchain space, to conduct an extensive quality review of our system.

We're proud to announce that we scored a remarkable **97%** on their evaluation, placing us in the t**op 5 DeFi projects reviewed by DeFi Safety**. This outstanding result is a testament to the robustness of our security protocols and the diligence of our team.

For full transparency, we have made the complete report available. You can access and review here: <https://defisafety.com/app/pqrs/539>

Our high score reflects our continuous commitment to security and the excellence of our project. It affirms that we're taking the right steps towards building a trustworthy, secure, and reliable DeFi project for our users.

### 🎗 Other Achievements

Our dedication to ensuring top-notch security extends beyond audits and quality reviews. In this section, we'll shed light on some of our other achievements and initiatives that underscore our commitment to security.

#### Event Presentations

We believe in sharing our knowledge and expertise to foster a more secure crypto landscape. Our team had the opportunity to deliver a presentation on security best practices at a renowned crypto event, emphasizing the importance of rigorous security protocols in the development and management of DeFi projects. This presentation allowed us to share our insights and learnings, furthering our role as thought leaders in the space.

* EthCC\[4] - from a Hackathon to your first code audit\
  <https://www.youtube.com/live/_9LSO09TdvY?feature=share>
* Security walkthrough\
  <https://blog.pods.finance/security-status-report-2d617f184502>

#### Recognition on Social Media

Our security efforts have been recognized and applauded by various security companies on social media. These acknowledgments attest to the effectiveness of our security measures and our proactive approach in maintaining a secure environment for our users.

* The first project to implement Trail of Bits Crytic properties:\
  <https://twitter.com/thebensams/status/1635704105523109888>
* Fastest payment in a bug bounty from Immunefi:\
  <https://medium.com/immunefi/pods-finance-bug-fix-postmortem-61a576897ebd>

#### Parallel Projects

In our pursuit of a more secure crypto ecosystem, we've initiated parallel projects focused on security. These projects, while separate from our main operations, aim to explore new methodologies and technologies to enhance security in DeFi projects. One of our examples is a tool to perform long fuzzy testing using Echidna on remote machines:&#x20;

* <https://github.com/pods-finance/remote-echidna>


# Audits

## Folder with all audits:

{% embed url="<https://github.com/pods-finance/yield-contracts/tree/main/audits>" %}

Pods' contracts are audited by the best industry standard.

stETHvv 2.0 and dependencies:

* [OpenZeppelin #2](https://github.com/pods-finance/yield-contracts/blob/main/audits/2022-12-02_OpenZeppelin_Pods.pdf)
* [OpenZeppelin #1](https://github.com/pods-finance/yield-contracts/blob/main/audits/2022-11-15_OpenZeppelin_Pods.pdf)
* [ABDK](https://github.com/pods-finance/yield-contracts/blob/main/audits/2022-10-06_ABDK_Pods.pdf)

stETHvv 1.0 and dependencies:

* [CredShields](https://github.com/pods-finance/yield-contracts/blob/main/audits/2022-08-05_CredShields_Pods.pdf)


# Bug Bounty Program (BBP)

## Bug Bounty

We have an ongoing [bug bounty on ImmuneFi](https://immunefi.com/bounty/pods/), with 5% of the funds at risk or up to $100,000.

{% embed url="<https://immunefi.com/bounty/pods/>" %}


# Access Control

### TLDR

In our smart contracts, we made some architectural decisions to reduce our smart contract risks and access control risks:

* The Admin/Multisig does not have access to the principal
* The Admin/Multisig can not permanently freeze funds.
* The contracts are not upgradeable (No malicious upgradability can happen)
* You can leave the position at any point in time
* The Multisig/Admin only has access to the **weekly yield.** This represents less than 1% of the TVL
* The withdrawal fee can change up to a 10% cap (No malicious attack on fees)&#x20;

Below we will dive deep into the privileges of each role:&#x20;

### VaultController

Multisig 2/3: <https://etherscan.io/address/0xe24E8beEBa6219CD2F6FA25D5b04a0e78f19Aa0A>

This role is responsible for the functions `endRound` and `startRound.`During the `endRound` phase, other addresses can not perform deposit or withdrawal actions until the `startRound` function is called. In order to avoid the risk of principal funds getting stuck, after a week (\~604800 blocks) any address can call the startRound function, enabling withdrawals again.

### ConfigurationManager Owner

Multisig 2/3: <https://etherscan.io/address/0xe24E8beEBa6219CD2F6FA25D5b04a0e78f19Aa0A>

This role is responsible for setting the:

* VaultController of a certain vault
* Withdraw fee ratio of a certain vault (cap at 10% by the code)
* Migration contract of a certain vault (in case of migration)
* Cap of a certain vault

### Investor

Multisig 2/3: <https://etherscan.io/address/0x448C7875633EA285996870BF56bcE7C64Ee94A70>

This role is the one responsible for using 50& of the weekly yield to buy options at the best price. This could be an off-chain exchange, L2 trade, or OTC.


# Introduction

There's no free lunch.

Investing in any asset or strategy comes with risks, both in TradiFi and in DeFi. In this section, we analyze and classify different sources of risk that may impact funds allocated in our vault.&#x20;

Currently, funds invested in our protocol have exposure to at least 3 different protocols: Pods Vault, Lido, and Ethereum Mainnet.&#x20;

Each exposure has different probabilities of an event happening; if they do occur, they will impact the vault with different intensities.&#x20;

The following sections will explain how we analyze each exposure, attribute the likelihood of events, and score the impacts of potential events.

{% hint style="info" %} <mark style="color:blue;">Please note that this is a</mark> <mark style="color:blue;"></mark><mark style="color:blue;">**preliminary risk assessment,**</mark> <mark style="color:blue;"></mark><mark style="color:blue;">and it can change over time as we may learn new information about each protocol.</mark>
{% endhint %}

{% hint style="warning" %} <mark style="color:orange;">This section is</mark> <mark style="color:orange;"></mark><mark style="color:orange;">**under development**</mark><mark style="color:orange;">. Contact us on Discord if you want to discuss our risk analysis model in depth.</mark>
{% endhint %}


# Market Risks

### 1) Opportunity cost on stETH return in case none of the options end ITM&#x20;

This strategy takes 50% of the Lidos weekly return and invests in a strangle. In the worst-case scenario where none of the options that we buy are profitable, you end up losing 50% of the yield.&#x20;

### 2) Compared to holding ETH

Currently, there is no direct way to unstake your staked ETH. This feature will only be available **after the Shanghai upgrade,** planned to be in 2023-Q2. So, if you want to exit your position earlier, you will be exposed to stETH price on the secondary market. Depending on the staked version you are using, you will be exposed to the size of the liquidity, the trading venue, etc. That is one of the reasons why we picked Lido. We see them as the lower market to risk to earlier exit a position in case the user wants.

### 3) stETH de-peg

In 2022, much was said about a wider de-pegging event on the ETH-stETH pair.  According to Lido, stETH should not be considered to be pegged to ETH in any way. On the other hand, it is important to remember that stETH could enter a spiral selling situation if stETH price diverges too much from ETH.&#x20;


# Smart Contract Risks

### 1) Compared with having exposure only to Lido or other staking services:

You will add on top of your staking services contracts, the risks of Pods Smart Contracts risk.&#x20;

In our smart contracts we made some architectural decisions to reduce a lot of our smart contract risks:

* The Admin/Multisig does not have access to the principal
* The Admin/Multisig can not stop withdraws
* The contracts are not upgradeable (No malicious upgradability can happen)
* You can leave the position at any point in time
* The Multisig/Admin only has access to the **weekly yield.** This represents less than 1% of the TVL
* The Pods Vault itself **is not** exposed to Oracle Risks
* We spend a lot of energy and money on security. You can check our audits [here](broken://pages/VRZCVZdjHXdcD6OBpOzn)

### 2) Compared with holding ETH

Apart from our contracts, we interact with the Yield Source contract (Lido). Lido has three pillars that you believe bring security to the system: Heavy investment in [audits](https://github.com/lidofinance/audits). [Battled tested TVL](https://defillama.com/protocol/lido) and a good [bug bounty](https://lido.fi/bug-bounty).

An issue in the smart contracts from Lido that affects liquidity in secondary markets could result in an indirect impact on our users. This is because users would be holding stETH and stETH could run low on market liquidity.&#x20;


# Smart Contracts Overview

<figure><img src="/files/CT3NoFHD7IjPf9lmgsHN" alt=""><figcaption><p>Pods Yield Contracts Overview</p></figcaption></figure>

### BaseVault&#x20;

A contract that will handle the overall logic of this vault structure with rounds. It is ERC4626 compliant. We use [OZs 4626](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/extensions/ERC4626.sol) implementation.&#x20;

### ConfigurationManager&#x20;

Responsible for storing configuration variables of the vault, for instance, the FEE\_RATIO and the VaultController address.&#x20;

### STETHVault&#x20;

This contract inherit `BaseVault to` implement specifics about `stETH` strategy`.`

### ETHAdapter&#x20;

Responsible for converting `ETH` into `stETH`. It uses Curve as the trading venue.

### GitHub repo

{% embed url="<https://github.com/pods-finance/yield-contracts>" %}

### Coverage

{% embed url="<https://coveralls.io/github/pods-finance/yield-contracts?branch=main>" %}

### Addresses

{% embed url="<https://docs.pods.finance/developers/contracts-addresses>" %}

### Audits

{% embed url="<https://github.com/pods-finance/yield-contracts/tree/main/audits>" %}

### Bug Bounty Program (BBP)

{% embed url="<https://immunefi.com/bounty/pods/>" %}

### Ad

### Ad

### Ad

### Ad


# ConfigurationManager

The **ConfigurationManager** is the management layer of the protocol; it sets global or specific vault's parameters as a cap, withdraws fee, migration destination, and the `vaultController` role for each vault.

src: <https://github.com/pods-finance/yield-contracts/blob/main/contracts/configuration/ConfigurationManager.sol>

## View Methods

### getParameter

<https://github.com/pods-finance/yield-contracts/blob/main/contracts/configuration/ConfigurationManager.sol#L34>

```solidity
function getParameter(address target, bytes32 name) external view returns (uint256);
```

Retrieves the value of a parameter set to contract. If the value is not a uint256, you will need to perform encoding/decoding operations

**Parameters**

| Name   | Type    | Description                 |
| ------ | ------- | --------------------------- |
| target | address | The contract target address |
| name   | bytes32 | The parameter name          |

**Returns**

| Name | Type    | Description          |
| ---- | ------- | -------------------- |
| \_0  | uint256 | The stored parameter |

### getGlobalParameter

[https://github.com/pods-finance/yield-contracts/blob/main/contracts/configuration/ConfigurationManager.sol#L](https://github.com/pods-finance/yield-contracts/blob/main/contracts/configuration/ConfigurationManager.sol#L34)[40](https://github.com/pods-finance/yield-contracts/blob/main/contracts/configuration/ConfigurationManager.sol#L41)

```solidity
function getGlobalParameter(bytes32 name) external view returns (uint256);
```

Retrieves the value of a global parameter. If the value is not a uint256, you will need to perform encoding/decoding operations

**Parameters**

| Name | Type    | Description        |
| ---- | ------- | ------------------ |
| name | bytes32 | The parameter name |

**Returns**

| Name | Type    | Description          |
| ---- | ------- | -------------------- |
| \_0  | uint256 | The stored parameter |

### getCap

<https://github.com/pods-finance/yield-contracts/blob/main/contracts/configuration/ConfigurationManager.sol#L57>

```solidity
function getCap(address target) external view returns (uint256);
```

Retrieves the value of the cap set to a contract. If the value is not a uint256, you will need to perform encoding/decoding operations

**Parameters**

| Name   | Type    | Description                 |
| ------ | ------- | --------------------------- |
| target | address | The contract target address |

**Returns**

| Name | Type    | Description    |
| ---- | ------- | -------------- |
| \_0  | uint256 | The stored cap |

### getVaultMigration

<https://github.com/pods-finance/yield-contracts/blob/main/contracts/configuration/ConfigurationManager.sol#L73>

```solidity
function getVaultMigration(address oldVault) external view returns (address);
```

Retrieves the value of the destination contract of an original vault.

**Parameters**

| Name     | Type    | Description      |
| -------- | ------- | ---------------- |
| oldVault | address | The origin vault |

**Returns**

| Name | Type    | Description           |
| ---- | ------- | --------------------- |
| \_0  | address | The destination vault |

## Write Methods

### setParameter

<https://github.com/pods-finance/yield-contracts/blob/main/contracts/configuration/ConfigurationManager.sol#L22>

```solidity
function setParameter(address target, bytes32 name, uint256 value) external onlyOwner;
```

Set specific parameters to a contract or globally across multiple contracts. Use `address(0)` to set a global parameter.

**Parameters**

| Name   | Type    | Description                 |
| ------ | ------- | --------------------------- |
| target | address | The contract target address |
| name   | bytes32 | The parameter name          |
| value  | uint256 | The parameter value         |

### setCap

<https://github.com/pods-finance/yield-contracts/blob/main/contracts/configuration/ConfigurationManager.sol#L48>

```solidity
function setCap(address target, uint256 value) external onlyOwner;
```

Set the cap of a target vault.

**Parameters**

| Name   | Type    | Description                 |
| ------ | ------- | --------------------------- |
| target | address | The contract target address |
| value  | uint256 | The cap value               |

### setVaultMigration

<https://github.com/pods-finance/yield-contracts/blob/main/contracts/configuration/ConfigurationManager.sol#L64>

```solidity
function setVaultMigration(address oldVault, address newVault) external onlyOwner;
```

Sets the allowance to migrate to a `vault` address.

**Parameters**

| Name     | Type    | Description                                        |
| -------- | ------- | -------------------------------------------------- |
| oldVault | address | The current vault address                          |
| newVault | address | The vault where assets are going to be migrated to |


# EthAdapter

The **EthAdapter** is responsible for accepting deposits and withdrawals in ETH, instead of accepting the staked ETH directly. It uses Curve as a trading venue under the hood.

src: <https://github.com/pods-finance/yield-contracts/blob/main/contracts/proxy/ETHAdapter.sol>

## Public State Variables

### pool

<https://github.com/pods-finance/yield-contracts/blob/main/contracts/proxy/ETHAdapter.sol#L23>

```solidity
function pool() external view returns (address
```

Curve's pool for the ETH <> stETH token pair.

### ETH\_INDEX

<https://github.com/pods-finance/yield-contracts/blob/main/contracts/proxy/ETHAdapter.sol#L28>

```solidity
function ETH_INDEX() external view returns (int128)
```

ETH token index in the Curve pool. It is constant `0`.

### STETH\_INDEX

<https://github.com/pods-finance/yield-contracts/blob/main/contracts/proxy/ETHAdapter.sol#L33>

```solidity
function ETH_INDEX() external view returns (int128)
```

StETH token index in the Curve pool. It is constant `1`.

### ETH\_ADDRESS

<https://github.com/pods-finance/yield-contracts/blob/main/contracts/proxy/ETHAdapter.sol#L38>

```solidity
function ETH_ADDRESS() external view returns (address)
```

ETH token address representation. It is constant `0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE`

### STETH\_ADDRESS

<https://github.com/pods-finance/yield-contracts/blob/main/contracts/proxy/ETHAdapter.sol#L43>

```solidity
function STETH_ADDRESS() external view returns (address)
```

StETH token address representation. It is constant 0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84

## View Methods

### convertToSTETH

<https://github.com/pods-finance/yield-contracts/blob/main/contracts/proxy/ETHAdapter.sol#L61>

```solidity
function convertToSTETH(uint256 ethAmount) external view returns (uint256)
```

Convert `ethAmount` ETH to stETH using Curve pool and returns the resulting amount of stETH.

**Parameters**

| Name      | Type    | Description              |
| --------- | ------- | ------------------------ |
| ethAmount | uint256 | Amount of ETH to convert |

**Returns**

| Name | Type    | Description                           |
| ---- | ------- | ------------------------------------- |
| \_0  | uint256 | Amount of stETH receiveid in exchange |

### convertToETH

<https://github.com/pods-finance/yield-contracts/blob/main/contracts/proxy/ETHAdapter.sol#L70>

```solidity
function convertToETH(uint256 stETHAmount) external view returns (uint256)
```

Convert `stethAmount` stETH to ETH using Curve pool and returns the resulting amount of ETH.

**Parameters**

| Name        | Type    | Description              |
| ----------- | ------- | ------------------------ |
| stETHAmount | uint256 | Amount of ETH to convert |

**Returns**

| Name | Type    | Description                         |
| ---- | ------- | ----------------------------------- |
| \_0  | uint256 | Amount of ETH receiveid in exchange |

## Write Methods <a href="#deposit" id="deposit"></a>

### deposit <a href="#deposit" id="deposit"></a>

<https://github.com/pods-finance/yield-contracts/blob/main/contracts/proxy/ETHAdapter.sol#L81>

```solidity
function deposit(contract IVault vault, address receiver, uint256 minOutput) external payable returns (uint256)
```

Deposit `msg.value` of ETH, convert to stETH and deposit into `vault`

**Parameters**

| Name      | Type            | Description                                          |
| --------- | --------------- | ---------------------------------------------------- |
| vault     | contract IVault | Pods' strategy vault that will receive the stETH     |
| receiver  | address         | Address that will be the owner of the Vault's shares |
| minOutput | uint256         | slippage control. Minimum acceptable amount of stETH |

**Returns**

| Name | Type    | Description                                                 |
| ---- | ------- | ----------------------------------------------------------- |
| \_0  | uint256 | uint256 Amount of shares returned by vault ERC4626 contract |

### redeem

<https://github.com/pods-finance/yield-contracts/blob/main/contracts/proxy/ETHAdapter.sol#L100>

```solidity
function redeem(contract IVault vault, uint256 shares, address receiver, uint256 minOutput) external nonpayable returns (uint256)
```

Redeem `shares` shares, receive stETH, trade stETH for ETH and send to receiver

**Parameters**

| Name      | Type            | Description                                                         |
| --------- | --------------- | ------------------------------------------------------------------- |
| vault     | contract IVault | Pods' strategy vault that will receive the shares and payback stETH |
| shares    | uint256         | Amount of Vault's shares to redeem                                  |
| receiver  | address         | Address that will receive back the ETH withdrawn from the `vault`   |
| minOutput | uint256         | slippage control. Minimum acceptable amount of ETH                  |

**Returns**

| Name | Type    | Description                                          |
| ---- | ------- | ---------------------------------------------------- |
| \_0  | uint256 | uint256 Amount of assets received from Vault ERC4626 |

### redeemWithPermit <a href="#redeemwithpermit" id="redeemwithpermit"></a>

<https://github.com/pods-finance/yield-contracts/blob/main/contracts/proxy/ETHAdapter.sol#L124>

```solidity
function redeemWithPermit(contract IVault vault, uint256 shares, address receiver, uint256 minOutput, uint256 deadline, uint8 v, bytes32 r, bytes32 s) external nonpayable returns (uint256 assets)
```

redeemWithPermit `shares` shares, receive stETH, trade stETH for ETH and send to receiver

*Do not need to approve the shares in advance. The vault tokenized shares supports Permit*

**Parameters**

| Name      | Type            | Description                                                         |
| --------- | --------------- | ------------------------------------------------------------------- |
| vault     | contract IVault | Pods' strategy vault that will receive the shares and payback stETH |
| shares    | uint256         | Amount of Vault's shares to redeem                                  |
| receiver  | address         | Address that will receive back the ETH withdrawn from `vault`       |
| minOutput | uint256         | slippage control. Minimum acceptable amount of ETH                  |
| deadline  | uint256         | deadline that this transaction will be valid                        |
| v         | uint8           | recovery id                                                         |
| r         | bytes32         | ECDSA signature output                                              |
| s         | bytes32         | ECDSA signature output                                              |

**Returns**

| Name   | Type    | Description                                  |
| ------ | ------- | -------------------------------------------- |
| assets | uint256 | Amount of assets received from Vault ERC4626 |

### withdraw <a href="#withdraw" id="withdraw"></a>

<https://github.com/pods-finance/yield-contracts/blob/main/contracts/proxy/ETHAdapter.sol#L148>

```solidity
function withdraw(contract IVault vault, uint256 assets, address receiver, uint256 minOutput) external nonpayable returns (uint256 shares)
```

Withdraw `assets` assets, receive stETH, trade stETH for ETH and send to receiver

*Do not need to approve the shares in advance. The vault tokenized shares supports Permit*

**Parameters**

| Name      | Type            | Description                                                         |
| --------- | --------------- | ------------------------------------------------------------------- |
| vault     | contract IVault | Pods' strategy vault that will receive the shares and payback stETH |
| assets    | uint256         | Amount of assets (stETH) to redeem                                  |
| receiver  | address         | Address that will receive back the ETH withdrawn from the Vault     |
| minOutput | uint256         | slippage control. Minimum acceptable amount of ETH                  |

**Returns**

| Name   | Type    | Description                                        |
| ------ | ------- | -------------------------------------------------- |
| shares | uint256 | Amount of shares burned in order to receive assets |

### withdrawWithPermit <a href="#withdrawwithpermit" id="withdrawwithpermit"></a>

<https://github.com/pods-finance/yield-contracts/blob/main/contracts/proxy/ETHAdapter.sol#L171>

```solidity
function withdrawWithPermit(contract IVault vault, uint256 assets, address receiver, uint256 minOutput, uint256 deadline, uint8 v, bytes32 r, bytes32 s) external nonpayable returns (uint256 shares)
```

withdrawWithPermit `assets` assets, receive stETH, trade stETH for ETH and send to receiver

*Do not need to approve the shares in advance. Vault's tokenized shares supports Permit*

**Parameters**

| Name      | Type            | Description                                                         |
| --------- | --------------- | ------------------------------------------------------------------- |
| vault     | contract IVault | Pods' strategy vault that will receive the shares and payback stETH |
| assets    | uint256         | Amount of assets (stETH) to redeem                                  |
| receiver  | address         | Address that will receive back the ETH withdrawn from the Vault     |
| minOutput | uint256         | slippage control. Minimum acceptable amount of ETH                  |
| deadline  | uint256         | deadline that this transaction will be valid                        |
| v         | uint8           | recovery id                                                         |
| r         | bytes32         | ECDSA signature output                                              |
| s         | bytes32         | ECDSA signature output                                              |

**Returns**

| Name   | Type    | Description                                        |
| ------ | ------- | -------------------------------------------------- |
| shares | uint256 | Amount of shares burned in order to receive assets |


# STETHVault

A Vault that uses variable weekly yields to buy strangles. It uses Lido as a yield source.

src: <https://github.com/pods-finance/yield-contracts/blob/main/contracts/vaults/STETHVault.sol>

## Public State Variables

### INVESTOR\_RATIO <a href="#denominator" id="denominator"></a>

<https://github.com/pods-finance/yield-contracts/blob/main/contracts/vaults/STETHVault.sol#L27>

```solidity
function INVESTOR_RATIO() external view returns (uint256)
```

*INVESTOR\_RATIO is the proportion that the weekly yield will be split The precision of this number is set by the variable DENOMINATOR. 5000 is equivalent to 50%.*

**Returns**

| Name | Type    | Description          |
| ---- | ------- | -------------------- |
| \_0  | uint256 | investor ratio value |

### investor <a href="#investor" id="investor"></a>

<https://github.com/pods-finance/yield-contracts/blob/main/contracts/vaults/STETHVault.sol#L28>

```solidity
function investor() external view returns (address)
```

Returns the investor's wallet. [Investor](/stethvv/system-actors) is the role responsible for buying weekly options.

**Returns**

| Name | Type    | Description      |
| ---- | ------- | ---------------- |
| \_0  | address | investor address |

### sharePriceDecimals <a href="#sharepricedecimals" id="sharepricedecimals"></a>

<https://github.com/pods-finance/yield-contracts/blob/main/contracts/vaults/STETHVault.sol#L29>

```solidity
function sharePriceDecimals() external view returns (uint8)
```

**Returns**

| Name | Type  | Description          |
| ---- | ----- | -------------------- |
| \_0  | uint8 | share price decimals |

### lastRoundAssets <a href="#lastroundassets" id="lastroundassets"></a>

<https://github.com/pods-finance/yield-contracts/blob/main/contracts/vaults/STETHVault.sol#L30>

```solidity
function lastRoundAssets() external view returns (uint256)
```

**Returns**

| Name | Type    | Description                               |
| ---- | ------- | ----------------------------------------- |
| \_0  | uint256 | Total assets in the end of the last round |

### lastSharePrice <a href="#lastshareprice" id="lastshareprice"></a>

<https://github.com/pods-finance/yield-contracts/blob/main/contracts/vaults/STETHVault.sol#L31>

```solidity
function lastSharePrice() external view returns (uint256 numerator, uint256 denominator)
```

**Returns**

| Name        | Type    | Description                              |
| ----------- | ------- | ---------------------------------------- |
| numerator   | uint256 | Share Price in the end of the last round |
| denominator | uint256 | undefined                                |

## View Methods <a href="#maxdeposit" id="maxdeposit"></a>

### assetsOf <a href="#max_withdraw_fee" id="max_withdraw_fee"></a>

<https://github.dev/pods-finance/yield-contracts/blob/main/contracts/vaults/STETHVault.sol#L63>

```solidity
function assetsOf(address owner) external view returns (uint256)
```

Outputs the amount of asset tokens of an `owner` are either waiting for the next round, deposited or committed.

**Parameters**

| Name  | Type    | Description   |
| ----- | ------- | ------------- |
| owner | address | owner address |

**Returns**

| Name | Type    | Description      |
| ---- | ------- | ---------------- |
| \_0  | uint256 | amount of assets |

### sharePrice <a href="#shareprice" id="shareprice"></a>

<https://github.dev/pods-finance/yield-contracts/blob/main/contracts/vaults/STETHVault.sol#L75>

```solidity
function sharePrice() external view returns (uint256)
```

Return the stETH price per share

*Each share is considered to be 10^(assets.decimals()) The share price represents the amount of stETH needed to mint one vault share. When the number of vault shares that has been minted thus far is zero, the share price should simply be the ratio of the underlying asset's decimals to the vault's decimals.*

**Returns**

| Name | Type    | Description         |
| ---- | ------- | ------------------- |
| \_0  | uint256 | Current Share Price |

## Write Methods

### depositWithPermit

<https://github.dev/pods-finance/yield-contracts/blob/main/contracts/vaults/STETHVault.sol#L82>

```solidity
function depositWithPermit(uint256 assets, address receiver, uint256 deadline, uint8 v, bytes32 r, bytes32 s) external nonpayable returns (uint256)
```

Deposit ERC20 tokens with permit, a gasless token approval.

*Mints shares to receiver by depositing exactly amount of underlying tokens. For more information on the signature format, see the EIP2612 specification:* [*https://eips.ethereum.org/EIPS/eip-2612#specification*](https://eips.ethereum.org/EIPS/eip-2612#specification)

**Parameters**

| Name     | Type    | Description             |
| -------- | ------- | ----------------------- |
| assets   | uint256 | Amount of assets        |
| receiver | address | Receiver address        |
| deadline | uint256 | timestamp deadline      |
| v        | uint8   | transaction signature v |
| r        | bytes32 | transaction signature r |
| s        | bytes32 | transaction signature s |

**Returns**

| Name | Type    | Description  |
| ---- | ------- | ------------ |
| \_0  | uint256 | share amount |

### mintWithPermit

<https://github.dev/pods-finance/yield-contracts/blob/main/contracts/vaults/STETHVault.sol#L96>

```solidity
function mintWithPermit(uint256 shares, address receiver, uint256 deadline, uint8 v, bytes32 r, bytes32 s) external nonpayable returns (uint256)
```

Mint shares with permit, a gasless token approval.

*Mints exactly shares to receiver by depositing amount of underlying tokens. For more information on the signature format, see the EIP2612 specification:* [*https://eips.ethereum.org/EIPS/eip-2612#specification*](https://eips.ethereum.org/EIPS/eip-2612#specification)

**Parameters**

| Name     | Type    | Description             |
| -------- | ------- | ----------------------- |
| assets   | uint256 | Amount of assets        |
| receiver | address | Receiver address        |
| deadline | uint256 | timestamp deadline      |
| v        | uint8   | transaction signature v |
| r        | bytes32 | transaction signature r |
| s        | bytes32 | transaction signature s |

**Returns**

| Name | Type    | Description              |
| ---- | ------- | ------------------------ |
| \_0  | uint256 | underlying tokens amount |


# BaseVault

Base contract responsible for the main logic of our vault. It inherits ERC4626 and ERC20 contracts, so, some functions are not shown below. We only document the functions that we did any modification or overridden on it. You can check [ERC4626](https://eips.ethereum.org/EIPS/eip-4626) specification here, and [ERC20](https://eips.ethereum.org/EIPS/eip-20) here.

src: <https://github.com/pods-finance/yield-contracts/blob/main/contracts/vaults/BaseVault.sol>

## Public State Variables

### DENOMINATOR <a href="#denominator" id="denominator"></a>

<https://github.dev/pods-finance/yield-contracts/blob/main/contracts/vaults/BaseVault.sol#L35>

```solidity
function DENOMINATOR() external view returns (uint256)
```

*DENOMINATOR represents the precision for the following system variables: - MAX\_WITHDRAW\_FEE - INVESTOR\_RATIO*

**Returns**

| Name | Type    | Description                                    |
| ---- | ------- | ---------------------------------------------- |
| \_0  | uint256 | Precision number used when calculating the fee |

### MAX\_WITHDRAW\_FEE <a href="#domain_separator" id="domain_separator"></a>

<https://github.dev/pods-finance/yield-contracts/blob/main/contracts/vaults/BaseVault.sol#L41>

```solidity
function MAX_WITHDRAW_FEE() external view returns (uint256)
```

*MAX\_WITHDRAW\_FEE is a safe check in case the ConfigurationManager sets a fee high enough that can be used as a way to drain funds. The precision of this number is set by constant DENOMINATOR.*

**Returns**

| Name | Type    | Description      |
| ---- | ------- | ---------------- |
| \_0  | uint256 | Max Fee boundary |

### MIN\_INITIAL\_ASSETS <a href="#min_initial_assets" id="min_initial_assets"></a>

<https://github.dev/pods-finance/yield-contracts/blob/main/contracts/vaults/BaseVault.sol#L47>

```solidity
function MIN_INITIAL_ASSETS() external view returns (uint256)
```

Minimum asset amount for the first deposit

*This amount prevents the first depositor to steal funds from subsequent depositors. See* [*https://code4rena.com/reports/2022-01-sherlock/#h-01-first-user-can-steal-everyone-elses-tokens*](https://code4rena.com/reports/2022-01-sherlock/#h-01-first-user-can-steal-everyone-elses-tokens)

**Returns**

| Name | Type    | Description            |
| ---- | ------- | ---------------------- |
| \_0  | uint256 | Initial deposit amount |

### configuration <a href="#configuration" id="configuration"></a>

<https://github.dev/pods-finance/yield-contracts/blob/main/contracts/vaults/BaseVault.sol#L49>

```solidity
function configuration() external view returns (contract IConfigurationManager)
```

**Returns**

| Name | Type    | Description                  |
| ---- | ------- | ---------------------------- |
| \_0  | address | ConfigurationManager address |

## View Methods

### currentRoundId

<https://github.dev/pods-finance/yield-contracts/blob/main/contracts/vaults/BaseVault.sol#L97>

```solidity
function currentRoundId() external view returns (uint32)
```

Returns the current round ID.

**Returns**

| Name | Type   | Description      |
| ---- | ------ | ---------------- |
| \_0  | uint32 | current round Id |

### isProcessingDeposits

<https://github.dev/pods-finance/yield-contracts/blob/main/contracts/vaults/BaseVault.sol#L104>

```solidity
function isProcessingDeposits() external view returns (bool)
```

Determines whether the Vault is in the processing deposits state.

*While it's processing deposits, `processDeposits` can be called and new shares can be created. During this period deposits, mints, withdraws and redeems are blocked.*

**Returns**

| Name | Type | Description                    |
| ---- | ---- | ------------------------------ |
| \_0  | bool | Is processing deposits boolean |

### processedDeposits

<https://github.dev/pods-finance/yield-contracts/blob/main/contracts/vaults/BaseVault.sol#L111>

```solidity
function processedDeposits() external view returns (uint256)
```

Returns the amount of processed deposits entering the next round.

**Returns**

| Name | Type    | Description                                           |
| ---- | ------- | ----------------------------------------------------- |
| \_0  | uint256 | Amount of processed deposits entering the next round. |

### queuedDeposits <a href="#queueddeposits" id="queueddeposits"></a>

<https://github.dev/pods-finance/yield-contracts/blob/main/contracts/vaults/BaseVault.sol#L313>

```solidity
function queuedDeposits() external view returns (address[])
```

Outputs addresses in the deposit queue

**Returns**

| Name | Type       | Description                |
| ---- | ---------- | -------------------------- |
| \_0  | address\[] | addresses in deposit queue |

### controller

<https://github.dev/pods-finance/yield-contracts/blob/main/contracts/vaults/BaseVault.sol#L325>

```solidity
function controller() external view returns (address)
```

Returns the vault controller

**Returns**

| Name | Type    | Description        |
| ---- | ------- | ------------------ |
| \_0  | address | Controller address |

### idleAssetsOf <a href="#idleassetsof" id="idleassetsof"></a>

<https://github.dev/pods-finance/yield-contracts/blob/main/contracts/vaults/BaseVault.sol#L284>

```solidity
function idleAssetsOf(address owner) external view returns (uint256)
```

Outputs the amount of asset tokens of an `owner` is idle, waiting for the next round.

**Parameters**

| Name  | Type    | Description   |
| ----- | ------- | ------------- |
| owner | address | Owner address |

**Returns**

| Name | Type    | Description           |
| ---- | ------- | --------------------- |
| \_0  | uint256 | Amount of Idle Assets |

### getWithdrawFeeRatio <a href="#getwithdrawfeeratio" id="getwithdrawfeeratio"></a>

<https://github.dev/pods-finance/yield-contracts/blob/main/contracts/vaults/BaseVault.sol#L275>

```solidity
function getWithdrawFeeRatio() external view returns (uint256)
```

Returns the fee charged on withdraws.

**Returns**

| Name | Type    | Description        |
| ---- | ------- | ------------------ |
| \_0  | uint256 | Withdraw Fee Ratio |

### depositQueueSize <a href="#depositqueuesize" id="depositqueuesize"></a>

<https://github.dev/pods-finance/yield-contracts/blob/main/contracts/vaults/BaseVault.sol#L306>

```solidity
function depositQueueSize() external view returns (uint256)
```

Outputs current size of the deposit queue.

**Returns**

| Name | Type    | Description |
| ---- | ------- | ----------- |
| \_0  | uint256 | Queue Size  |

### maxDeposit <a href="#maxdeposit" id="maxdeposit"></a>

<https://github.dev/pods-finance/yield-contracts/blob/main/contracts/vaults/BaseVault.sol#L226>

```solidity
function maxDeposit(address) external view returns (uint256)
```

*Returns the maximum amount of the underlying asset that can be deposited into the Vault for the receiver, through a deposit call. - MUST return a limited value if receiver is subject to some deposit limit. - MUST return 2 \*\* 256 - 1 if there is no limit on the maximum amount of assets that may be deposited. - MUST NOT revert.*

**Parameters**

| Name | Type    | Description   |
| ---- | ------- | ------------- |
| \_0  | address | Owner address |

**Returns**

| Name | Type    | Description                         |
| ---- | ------- | ----------------------------------- |
| \_0  | uint256 | Max amount of underlying to deposit |

### maxMint <a href="#maxmint" id="maxmint"></a>

<https://github.dev/pods-finance/yield-contracts/blob/main/contracts/vaults/BaseVault.sol#L242>

```solidity
function maxMint(address) external view returns (uint256)
```

*Returns the maximum amount of the Vault shares that can be minted for the receiver, through a mint call. - MUST return a limited value if receiver is subject to some mint limit. - MUST return 2 \*\* 256 - 1 if there is no limit on the maximum amount of shares that may be minted. - MUST NOT revert.*

**Parameters**

| Name | Type    | Description   |
| ---- | ------- | ------------- |
| \_0  | address | Owner Address |

**Returns**

| Name | Type    | Description                             |
| ---- | ------- | --------------------------------------- |
| \_0  | uint256 | Max amount of shares that can be minted |

### maxRedeem <a href="#maxredeem" id="maxredeem"></a>

<https://github.dev/pods-finance/yield-contracts/blob/main/contracts/vaults/BaseVault.sol#L264>

```solidity
function maxRedeem(address owner) external view returns (uint256)
```

*Returns the maximum amount of Vault shares that can be redeemed from the owner balance in the Vault, through a redeem call. - MUST return a limited value if owner is subject to some withdrawal limit or timelock. - MUST return balanceOf(owner) if owner is not subject to any withdrawal limit or timelock. - MUST NOT revert.*

**Parameters**

| Name  | Type    | Description   |
| ----- | ------- | ------------- |
| owner | address | Owner Address |

**Returns**

| Name | Type    | Description                               |
| ---- | ------- | ----------------------------------------- |
| \_0  | uint256 | Max amount of shares that can be redeemed |

### maxWithdraw <a href="#maxwithdraw" id="maxwithdraw"></a>

<https://github.dev/pods-finance/yield-contracts/blob/main/contracts/vaults/BaseVault.sol#L253>

```solidity
function maxWithdraw(address owner) external view returns (uint256)
```

*Returns the maximum amount of the underlying asset that can be withdrawn from the owner balance in the Vault, through a withdraw call. - MUST return a limited value if owner is subject to some withdrawal limit or timelock. - MUST NOT revert.*

**Parameters**

| Name  | Type    | Description   |
| ----- | ------- | ------------- |
| owner | address | Owner Address |

**Returns**

| Name | Type    | Description                                          |
| ---- | ------- | ---------------------------------------------------- |
| \_0  | uint256 | Max amount of underlying asset that can be withdrawn |

### totalAssets <a href="#spentcap" id="spentcap"></a>

<https://github.dev/pods-finance/yield-contracts/blob/main/contracts/vaults/BaseVault.sol#L292>

```solidity
function totalAssets() external view returns (uint256)
```

*Returns the total amount of the underlying asset that is “managed” by Vault. - SHOULD include any compounding that occurs from yield. - MUST be inclusive of any fees that are charged against assets in the Vault. - MUST NOT revert.*

**Returns**

| Name | Type    | Description |
| ---- | ------- | ----------- |
| \_0  | uint256 | undefined   |

### totalIdleAssets

<https://github.dev/pods-finance/yield-contracts/blob/main/contracts/vaults/BaseVault.sol#L299>

```solidity
function totalIdleAssets() external view returns (uint256)
```

Outputs the amount of asset tokens is idle, waiting for the next round.

**Returns**

| Name | Type    | Description |
| ---- | ------- | ----------- |
| \_0  | uint256 | undefined   |

### previewRedeem <a href="#previewdeposit" id="previewdeposit"></a>

<https://github.dev/pods-finance/yield-contracts/blob/main/contracts/vaults/BaseVault.sol#L218>

```solidity
function previewRedeem(uint256 shares) external view returns (uint256)
```

*Allows an on-chain or off-chain user to simulate the effects of their redeemption at the current block, given current on-chain conditions. - MUST return as close to and no more than the exact amount of assets that would be withdrawn in a redeem call in the same transaction. I.e. redeem should return the same or more assets as previewRedeem if called in the same transaction. - MUST NOT account for redemption limits like those returned from maxRedeem and should always act as though the redemption would be accepted, regardless if the user has enough shares, etc. - MUST be inclusive of withdrawal fees. Integrators should be aware of the existence of withdrawal fees. - MUST NOT revert. NOTE: any unfavorable discrepancy between convertToAssets and previewRedeem SHOULD be considered slippage in share price or some other type of condition, meaning the depositor will lose assets by redeeming.*

**Parameters**

| Name   | Type    | Description   |
| ------ | ------- | ------------- |
| shares | uint256 | Shares amount |

**Returns**

| Name | Type    | Description   |
| ---- | ------- | ------------- |
| \_0  | uint256 | Assets amount |

### previewWithdraw <a href="#previewwithdraw" id="previewwithdraw"></a>

<https://github.dev/pods-finance/yield-contracts/blob/main/contracts/vaults/BaseVault.sol#L211>

```solidity
function previewWithdraw(uint256 assets) external view returns (uint256)
```

*Because of rounding issues, we did not find a way to return exact shares when including the fees. This is not 100% compliant to ERC4626 specification. You can follow the discussion here:* [*https://ethereum-magicians.org/t/eip-4626-yield-bearing-vault-standard/7900/104*](https://ethereum-magicians.org/t/eip-4626-yield-bearing-vault-standard/7900/104) *This function will return the number of shares necessary to withdraw assets not including fees. This means that you will need to redeem MORE shares to achieve the net assets.*

**Parameters**

| Name   | Type    | Description   |
| ------ | ------- | ------------- |
| assets | uint256 | Assets amount |

**Returns**

| Name | Type    | Description   |
| ---- | ------- | ------------- |
| \_0  | uint256 | Shares Amount |

### Write Methods

### deposit

<https://github.dev/pods-finance/yield-contracts/blob/main/contracts/vaults/BaseVault.sol#L118>

```solidity
function deposit(uint256 assets, address receiver) external nonpayable returns (uint256)
```

*Mints shares Vault shares to receiver by depositing exactly amount of underlying tokens. - MUST emit the Deposit event. - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the deposit execution, and are accounted for during deposit. - MUST revert if all of assets cannot be deposited (due to deposit limit being reached, slippage, the user not approving enough underlying tokens to the Vault contract, etc). NOTE: most implementations will require pre-approval of the Vault with the Vault’s underlying asset token.*

**Parameters**

| Name     | Type    | Description |
| -------- | ------- | ----------- |
| assets   | uint256 | assets      |
| receiver | address | receiver    |

**Returns**

| Name | Type    | Description |
| ---- | ------- | ----------- |
| \_0  | uint256 | shares      |

### depositWithPermit

<https://github.dev/pods-finance/yield-contracts/blob/main/contracts/vaults/BaseVault.sol#L131>

```solidity
function depositWithPermit(uint256 assets, address receiver, uint256 deadline, uint8 v, bytes32 r, bytes32 s) external nonpayable returns (uint256)
```

Deposit ERC20 tokens with permit, a gasless token approval.

*Mints shares to receiver by depositing exactly amount of underlying tokens. For more information on the signature format, see the EIP2612 specification: <https://eips.ethereum.org/EIPS/eip-2612#specification>*

**Parameters**

| Name     | Type    | Description           |
| -------- | ------- | --------------------- |
| assets   | uint256 | assets                |
| receiver | address | receiver address      |
| deadline | uint256 | timestamp deadline    |
| v        | uint8   | signature parameter v |
| r        | bytes32 | signature parameter r |
| s        | bytes32 | signature parameter s |

**Returns**

| Name | Type    | Description   |
| ---- | ------- | ------------- |
| \_0  | uint256 | shares amount |

### endRound

<https://github.dev/pods-finance/yield-contracts/blob/main/contracts/vaults/BaseVault.sol#L347>

```solidity
function endRound() external nonpayable
```

Closes the round, allowing deposits to the next round be processed. and opens the window for withdraws.

### handleMigration

<https://github.dev/pods-finance/yield-contracts/blob/main/contracts/vaults/BaseVault.sol#L399>

```solidity
function handleMigration(uint256 assets, address receiver) external nonpayable returns (uint256)
```

Handle migrated assets.

**Parameters**

| Name     | Type    | Description |
| -------- | ------- | ----------- |
| assets   | uint256 | undefined   |
| receiver | address | undefined   |

**Returns**

| Name | Type    | Description                   |
| ---- | ------- | ----------------------------- |
| \_0  | uint256 | Estimation of shares created. |

### migrate

<https://github.dev/pods-finance/yield-contracts/blob/main/contracts/vaults/BaseVault.sol#L378>

```solidity
function migrate() external nonpayable
```

Migrate assets from this vault to the next vault.

*The `newVault` will be assigned by the ConfigurationManager*

### processQueuedDeposits

<https://github.dev/pods-finance/yield-contracts/blob/main/contracts/vaults/BaseVault.sol#L412>

```solidity
function processQueuedDeposits(address[] depositors) external nonpayable
```

Distribute shares to depositors queued in the deposit queue, effectively including their assets in the next round.

**Parameters**

| Name       | Type       | Description                         |
| ---------- | ---------- | ----------------------------------- |
| depositors | address\[] | Array of owner addresses to process |

### redeem

<https://github.dev/pods-finance/yield-contracts/blob/main/contracts/vaults/BaseVault.sol#L175>

```solidity
function redeem(uint256 shares, address receiver, address owner) external nonpayable returns (uint256 assets)
```

*Burns exactly shares from owner and sends assets of underlying tokens to receiver. - MUST emit the Withdraw event. - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the redeem execution, and are accounted for during redeem. - MUST revert if all of shares cannot be redeemed (due to withdrawal limit being reached, slippage, the owner not having enough shares, etc). NOTE: some implementations will require pre-requesting to the Vault before a withdrawal may be performed. Those methods should be performed separately.*

**Parameters**

| Name     | Type    | Description      |
| -------- | ------- | ---------------- |
| shares   | uint256 | shares amount    |
| receiver | address | receiver address |
| owner    | address | owner address    |

**Returns**

| Name   | Type    | Description   |
| ------ | ------- | ------------- |
| assets | uint256 | assets amount |

### refund

<https://github.dev/pods-finance/yield-contracts/blob/main/contracts/vaults/BaseVault.sol#L362>

```solidity
function refund() external nonpayable returns (uint256 assets)
```

Withdraw all user assets in unprocessed deposits.

**Returns**

| Name   | Type    | Description   |
| ------ | ------- | ------------- |
| assets | uint256 | assets amount |

### startRound

<https://github.dev/pods-finance/yield-contracts/blob/main/contracts/vaults/BaseVault.sol#L332>

```solidity
function startRound() external nonpayable returns (uint32)
```

Starts the next round, sending the idle funds to the strategy where it should start accruing yield.

**Returns**

| Name | Type   | Description      |
| ---- | ------ | ---------------- |
| \_0  | uint32 | The new round id |

### withdraw

<https://github.dev/pods-finance/yield-contracts/blob/main/contracts/vaults/BaseVault.sol#L194>

```solidity
function withdraw(uint256 assets, address receiver, address owner) external nonpayable returns (uint256 shares)
```

*Because of rounding issues, we did not find a way to return assets including the fees. This is not 100% compliant to ERC4626 specification. You can follow the discussion here: <https://ethereum-magicians.org/t/eip-4626-yield-bearing-vault-standard/7900/104> This function will withdraw the number of assets asked, minus the fee. Example: If the fee is 10% and 100 assets was the input, this function will withdraw 90 assets.*

**Parameters**

| Name     | Type    | Description      |
| -------- | ------- | ---------------- |
| assets   | uint256 | assets amount    |
| receiver | address | receiver address |
| owner    | address | owner address    |

**Returns**

| Name   | Type    | Description   |
| ------ | ------- | ------------- |
| shares | uint256 | shares amount |

### mint <a href="#mint" id="mint"></a>

<https://github.dev/pods-finance/yield-contracts/blob/main/contracts/vaults/BaseVault.sol#L146>

```solidity
function mint(uint256 shares, address receiver) external nonpayable returns (uint256)
```

*Mints exactly shares Vault shares to receiver by depositing amount of underlying tokens. - MUST emit the Deposit event. - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the mint execution, and are accounted for during mint. - MUST revert if all of shares cannot be minted (due to deposit limit being reached, slippage, the user not approving enough underlying tokens to the Vault contract, etc). NOTE: most implementations will require pre-approval of the Vault with the Vault’s underlying asset token.*

**Parameters**

| Name     | Type    | Description |
| -------- | ------- | ----------- |
| shares   | uint256 | undefined   |
| receiver | address | undefined   |

**Returns**

| Name | Type    | Description |
| ---- | ------- | ----------- |
| \_0  | uint256 | undefined   |

### mintWithPermit <a href="#mintwithpermit" id="mintwithpermit"></a>

<https://github.dev/pods-finance/yield-contracts/blob/main/contracts/vaults/BaseVault.sol#L159>

```solidity
function mintWithPermit(uint256 shares, address receiver, uint256 deadline, uint8 v, bytes32 r, bytes32 s) external nonpayable returns (uint256)
```

Mint shares with permit, a gasless token approval.

*Mints exactly shares to receiver by depositing amount of underlying tokens. For more information on the signature format, see the EIP2612 specification:* [*https://eips.ethereum.org/EIPS/eip-2612#specification*](https://eips.ethereum.org/EIPS/eip-2612#specification)

**Parameters**

| Name     | Type    | Description |
| -------- | ------- | ----------- |
| shares   | uint256 | undefined   |
| receiver | address | undefined   |
| deadline | uint256 | undefined   |
| v        | uint8   | undefined   |
| r        | bytes32 | undefined   |
| s        | bytes32 | undefined   |

**Returns**

| Name | Type    | Description |
| ---- | ------- | ----------- |
| \_0  | uint256 | undefined   |


# Contracts Addresses

## Deployed Contracts

Pods Yield is currently working only in Ethereum Mainnet. The following tables contain the details of the contracts.

If you need development support, join the #developers channel on our [Pods community Discord server.](https://discord.gg/Qf7utym) ​

{% tabs %}
{% tab title="Mainnet" %}

<table data-header-hidden><thead><tr><th width="247">Contracts</th><th width="110">ABI</th><th width="109">Interface</th><th width="276">Address</th></tr></thead><tbody><tr><td>Contracts</td><td>ABI</td><td>Interface</td><td>Address</td></tr><tr><td><a href="https://github.com/pods-finance/yield-contracts/blob/main/contracts/configuration/ConfigurationManager.sol">ConfigurationManager</a></td><td><a href="https://github.com/pods-finance/yield-contracts/blob/main/abi/ConfigurationManager.json">JSON</a></td><td><a href="https://github.com/pods-finance/yield-contracts/blob/main/contracts/configuration/ConfigurationManager.sol">.sol</a></td><td><a href="https://etherscan.io/address/0xe982E991a394FB4d91521a14f559C98aE29186e2">0xe982E991a394FB4d91521a14f559C98aE29186e2</a></td></tr><tr><td><a href="#option-series">stETHvv</a></td><td><a href="https://github.com/pods-finance/yield-contracts/blob/main/abi/STETHVault.json">JSON</a></td><td><a href="https://github.com/pods-finance/yield-contracts/blob/main/contracts/interfaces/IVault.sol">.sol</a></td><td><a href="https://etherscan.io/address/0x463f9ed5e11764eb9029762011a03643603ad879#readContract">0x463f9ed5e11764eb9029762011a03643603ad879</a></td></tr><tr><td><a href="#option-series">ETHAdapter</a></td><td><a href="https://github.com/pods-finance/yield-contracts/blob/main/abi/ETHAdapter.json">JSON</a></td><td>.sol</td><td><a href="https://etherscan.io/address/0x4aad0755efd63f4e9b7fac19bd426db4a0d9b5e8">0x4aad0755efd63f4e9b7fac19bd426db4a0d9b5e8</a></td></tr><tr><td><a href="#option-series">FUD Vault</a></td><td><a href="https://github.com/pods-finance/yield-contracts/blob/main/abi/STETHVault.json">JSON</a></td><td><a href="https://github.com/pods-finance/yield-contracts/blob/main/contracts/interfaces/IVault.sol">.sol</a></td><td><a href="https://etherscan.io/address/0x287f941ab4b5aadad2f13f9363fcec8ee312a969">0x287f941ab4b5aadad2f13f9363fcec8ee312a969</a></td></tr><tr><td><a href="#option-series">ETHphoria Vault</a></td><td><a href="https://github.com/pods-finance/yield-contracts/blob/main/abi/STETHVault.json">JSON</a></td><td><a href="https://github.com/pods-finance/yield-contracts/blob/main/contracts/interfaces/IVault.sol">.sol</a></td><td><a href="https://etherscan.io/address/0x5fe4b38520e856921978715c8579d2d7a4d2274f">0x5fe4b38520e856921978715c8579d2d7a4d2274f</a></td></tr></tbody></table>
{% endtab %}

{% tab title="Goerli" %}

<table data-header-hidden><thead><tr><th width="247">Contracts</th><th width="91">ABI</th><th width="89">Source</th><th width="276">Address</th></tr></thead><tbody><tr><td>Contracts</td><td>ABI</td><td>Source</td><td>Address</td></tr><tr><td>ConfigurationManager</td><td><a href="https://github.com/pods-finance/yield-contracts/blob/main/abi/ConfigurationManager.json">JSON</a></td><td><a href="https://github.com/pods-finance/yield-contracts/blob/main/contracts/configuration/ConfigurationManager.sol">.sol</a></td><td><a href="https://goerli.etherscan.io/address/0x964d2371D9eB8c824E500E5c24FFbD5C3cA08772#code">0x964d2371D9eB8c824E500E5c24FFbD5C3cA08772</a></td></tr><tr><td>stETHvv</td><td><a href="https://github.com/pods-finance/yield-contracts/blob/main/abi/STETHVault.json">JSON</a></td><td><a href="https://github.com/pods-finance/yield-contracts/blob/main/contracts/vaults/STETHVault.sol">.sol</a></td><td><a href="https://goerli.etherscan.io/address/0x626bC69e52A543F8dea317Ff885C9060b8ebbbf5#code">0x626bC69e52A543F8dea317Ff885C9060b8ebbbf5</a></td></tr><tr><td>stETH (testnet)</td><td></td><td></td><td><a href="https://goerli.etherscan.io/address/0xd5441fE90697ac88931F6Ed84bF4C892710E8B23#code">0xd5441fE90697ac88931F6Ed84bF4C892710E8B23</a></td></tr></tbody></table>
{% endtab %}
{% endtabs %}

{% hint style="info" %}
If you want to play with our Goerli Testnet, you can mint our stETH version directly from Etherscan on the \`mint\` function. You can find it [here](https://goerli.etherscan.io/address/0xd5441fE90697ac88931F6Ed84bF4C892710E8B23#writeContract).
{% endhint %}


# Integration guide

Broadly speaking, if you wish to incorporate our strategy into your service, there are two main approaches you can adopt. First, you can directly engage with our vault through a programming language such as Javascript. Alternatively, you may use our collateral token within the context of a separate strategy. This guide is intended to walk you through the key processes to accomplish the following three main objectives:

* [Deposit into the vault](/developers/integration-guide/how-to-deposit)
* [Withdraw from the vault](/developers/integration-guide/how-to-withdraw)
* [Fetch vault information](/developers/integration-guide/how-to-read-vault-info)

You can find below the basic information necessary to integrate the Vaults:

If you need development support, join the #developers channel on our [Pods community Discord server.](https://discord.gg/Qf7utym) ​

{% tabs %}
{% tab title="Mainnet" %}

<table data-header-hidden><thead><tr><th width="247">Contracts</th><th width="110">ABI</th><th width="109">Interface</th><th width="276">Address</th></tr></thead><tbody><tr><td>Contracts</td><td>ABI</td><td>Interface</td><td>Address</td></tr><tr><td><a href="https://github.com/pods-finance/yield-contracts/blob/main/contracts/configuration/ConfigurationManager.sol">ConfigurationManager</a></td><td><a href="https://github.com/pods-finance/yield-contracts/blob/main/abi/ConfigurationManager.json">JSON</a></td><td><a href="https://github.com/pods-finance/yield-contracts/blob/main/contracts/configuration/ConfigurationManager.sol">.sol</a></td><td><a href="https://etherscan.io/address/0xe982E991a394FB4d91521a14f559C98aE29186e2">0xe982E991a394FB4d91521a14f559C98aE29186e2</a></td></tr><tr><td><a href="#option-series">stETHvv</a></td><td><a href="https://github.com/pods-finance/yield-contracts/blob/main/abi/STETHVault.json">JSON</a></td><td><a href="https://github.com/pods-finance/yield-contracts/blob/main/contracts/interfaces/IVault.sol">.sol</a></td><td><a href="https://etherscan.io/address/0x463f9ed5e11764eb9029762011a03643603ad879#readContract">0x463f9ed5e11764eb9029762011a03643603ad879</a></td></tr><tr><td><a href="#option-series">ETHAdapter</a></td><td><a href="https://github.com/pods-finance/yield-contracts/blob/main/abi/ETHAdapter.json">JSON</a></td><td>.sol</td><td><a href="https://etherscan.io/address/0x4aad0755efd63f4e9b7fac19bd426db4a0d9b5e8">0x4aad0755efd63f4e9b7fac19bd426db4a0d9b5e8</a></td></tr><tr><td><a href="#option-series">FUD Vault</a></td><td><a href="https://github.com/pods-finance/yield-contracts/blob/main/abi/STETHVault.json">JSON</a></td><td><a href="https://github.com/pods-finance/yield-contracts/blob/main/contracts/interfaces/IVault.sol">.sol</a></td><td><a href="https://etherscan.io/address/0x287f941ab4b5aadad2f13f9363fcec8ee312a969">0x287f941ab4b5aadad2f13f9363fcec8ee312a969</a></td></tr><tr><td><a href="#option-series">ETHphoria Vault</a></td><td><a href="https://github.com/pods-finance/yield-contracts/blob/main/abi/STETHVault.json">JSON</a></td><td><a href="https://github.com/pods-finance/yield-contracts/blob/main/contracts/interfaces/IVault.sol">.sol</a></td><td><a href="https://etherscan.io/address/0x5fe4b38520e856921978715c8579d2d7a4d2274f">0x5fe4b38520e856921978715c8579d2d7a4d2274f</a></td></tr></tbody></table>
{% endtab %}

{% tab title="Goerli" %}

<table data-header-hidden><thead><tr><th width="247">Contracts</th><th width="91">ABI</th><th width="89">Source</th><th width="276">Address</th></tr></thead><tbody><tr><td>Contracts</td><td>ABI</td><td>Source</td><td>Address</td></tr><tr><td>ConfigurationManager</td><td><a href="https://github.com/pods-finance/yield-contracts/blob/main/abi/ConfigurationManager.json">JSON</a></td><td><a href="https://github.com/pods-finance/yield-contracts/blob/main/contracts/configuration/ConfigurationManager.sol">.sol</a></td><td><a href="https://goerli.etherscan.io/address/0x964d2371D9eB8c824E500E5c24FFbD5C3cA08772#code">0x964d2371D9eB8c824E500E5c24FFbD5C3cA08772</a></td></tr><tr><td>stETHvv</td><td><a href="https://github.com/pods-finance/yield-contracts/blob/main/abi/STETHVault.json">JSON</a></td><td><a href="https://github.com/pods-finance/yield-contracts/blob/main/contracts/vaults/STETHVault.sol">.sol</a></td><td><a href="https://goerli.etherscan.io/address/0x626bC69e52A543F8dea317Ff885C9060b8ebbbf5#code">0x626bC69e52A543F8dea317Ff885C9060b8ebbbf5</a></td></tr><tr><td>stETH (testnet)</td><td></td><td></td><td><a href="https://goerli.etherscan.io/address/0xd5441fE90697ac88931F6Ed84bF4C892710E8B23#code">0xd5441fE90697ac88931F6Ed84bF4C892710E8B23</a></td></tr></tbody></table>
{% endtab %}
{% endtabs %}


# How to deposit

In this guide, we will cover an example of how to deposit into the stETHvv Vault.&#x20;

### 1) If you are depositing using ETH

For this scenario, you can use our Adapter contract. It will convert ETH into stETH using Curve pool under the hood.&#x20;

{% tabs %}
{% tab title="Javascript" %}

<pre class="language-javascript"><code class="lang-javascript">import BigNumber from 'bignumber.js'
import { ethers } from 'ethers'

<strong>// Parameters example
</strong>const podsAdapterAddress = '0x4aad0755efd63f4e9b7fac19bd426db4a0d9b5e8'
const podsStethvvAddress = '0x463f9ed5e11764eb9029762011a03643603ad879'
const podsAdapterABI = '' // You can find this information on the Contract Addresses page

// ETH Amount that will be deposited
const amount = (new BigNumber(1)).multipliedBy(new BigNumber(10).pow(18))
 // 1 ETH
const receiver = '0x123..' // Address that will receive the shares
const slippage = 2/100; // (Eg: 2%)

/////////////
// Ethers.js

// Instantiate contract
const PodsAdapter = await ethers.getContractAt(PodsAdapterAddress, PodsAdapterABI)

const destinationVault = podsStethvvAddress
const minOutput = amount.multipliedBy(1-slippage)

/**
  * @param destinationVault Pods' strategy vault that will receive the stETH
  * @param receiver Address that will be the owner of the Vault's shares
  * @param minOutput slippage control. Minimum acceptable amount of stETH
  * @return uint256 Amount of shares returned by vault ERC4626 contract
 */
await PodsAdapter.deposit(
  destinationVault, 
  receiver, 
  minOutput, 
  { value: amount }
)
</code></pre>

{% endtab %}

{% tab title="Solidity" %}
Coming soon...
{% endtab %}
{% endtabs %}

### 2) If you are depositing using stETH directly

For this scenario,  you will need to first approve stETH to be spent on behalf of our Vault.&#x20;

{% tabs %}
{% tab title="Javascript" %}

<pre class="language-javascript"><code class="lang-javascript">import BigNumber from 'bignumber.js'
import { ethers } from 'ethers'

// Ethers.js
<strong>// Parameters example
</strong>const amount = (new BigNumber(1)).multipliedBy(new BigNumber(10).pow(18))
const podsStethvvAddress = '0x463f9ed5e11764eb9029762011a03643603ad879' // Change here for stETHvv or ETHphoria
const PodsVaultABI = '' // Get this in our Contract Addresses section
const receiver = '0x123..' // Address that will receive the shares

<strong>// 1) Approve Vault to spend stETH on your behalf
</strong><strong>const stETHAddress = '0xae7ab96520de3a18e5e111b5eaab095312d7fe84'
</strong><strong>const ERC20ABI = ''
</strong>const stETH = await ethers.getContractAt(stETHAddress, ERC20ABI)
await stETH.approve(podsStethvvAddress, amount)

// 2) Deposit into stETHvv
const PodsVault = await ethers.getContractAt(podsStethvvAddress, PodsVaultABI)

/**
  * @param receiver Address that will be the owner of the Vault's shares
  * @param amount Amount to be deposited into the vault
  * @return uint256 Amount of shares returned by vault ERC4626 contract
 */
await PodsVault.deposit(
  amount, 
  receiver
)
</code></pre>

{% endtab %}

{% tab title="Solidity" %}
Coming soon...
{% endtab %}
{% endtabs %}


# How to withdraw

In this guide, we will cover an example of how to deposit into the stETHvv Vault.&#x20;

### 1) If you are withdrawing ETH

If you want to withdraw ETH, it will be a 2-step process. You will need to first Permit (gasless transaction) the Adapter contract to withdraw on your behalf. Then the Adapter contract will convert stETH to ETH under the hood using Curve.

{% tabs %}
{% tab title="Javascript" %}

<pre class="language-javascript"><code class="lang-javascript">import BigNumber from 'bignumber.js'
import { ethers } from 'ethers'

<strong>// Parameters example
</strong>const podsAdapterAddress = '0x4aad0755efd63f4e9b7fac19bd426db4a0d9b5e8'
const podsStethvvAddress = '0x463f9ed5e11764eb9029762011a03643603ad879'
const podsAdapterABI = '' // You can find this information on the Contract Addresses page
const PodsVaultABI = '' // Get this in our Contract Addresses section
const userAddress = '0x123..'

// Instantiate contracts
const PodsAdapter = await ethers.getContractAt(PodsAdapterAddress, PodsAdapterABI)
const PodsVault = await ethers.getContractAt(podsStethvvAddress, PodsVaultABI)

// Check User balance
const userSharesBalance = await PodsVault.balanceOf(userAddress)

// Calculate Slippage tolerance
const slippageTolerance = 2/100; // (Eg: 2%)
const sharesWithSlippageTolerance = userSharesBalance * (1-slippageTolerance)

/////////////
// Ethers.js

const permit = await PodsVault.doPermitFor({
  signer, //This is the only parameter that we are omitting in this tutorial. This is the signer Ethers.js object
  address: PodsVault.address,
  sender: userAddress,
  spender: podsAdapterAddress,
  amount: userSharesBalance,
})

const args = [
  PodsVault.address,
  shares.toString(),
  userAddress,
  sharesWithSlippageTolerance.toString(),
  permit.deadline,
  permit.v,
  permit.r.toString(),
  permit.s.toString(),
]

const transaction = await PodsAdapter.redeemWithPermit(...args)
</code></pre>

{% endtab %}

{% tab title="Solidity" %}
Coming soon...
{% endtab %}
{% endtabs %}

### 2) If you are withdrawing stETH directly

Withdrawing `stETH` is a 1-step process

{% tabs %}
{% tab title="Javascript" %}

<pre class="language-javascript"><code class="lang-javascript">import BigNumber from 'bignumber.js'
import { ethers } from 'ethers'

// Ethers.js
<strong>// Parameters example
</strong>const podsStethvvAddress = '0x463f9ed5e11764eb9029762011a03643603ad879' // Change here for stETHvv or ETHphoria
<strong>const PodsVaultABI = '' // Get this in our Contract Addresses section
</strong>const userAddress = '0x123..' // Address that will receive the shares

// 1) Check address balance
const PodsVault = await ethers.getContractAt(podsStethvvAddress, PodsVaultABI)
const userShareBalance = await PodsVault.balanceOf(userAddress)
const amount = userShareBalance * (1- 0.5) // Withdraw 50% of the shares

/**
  * @param amount Amount to be deposited into the vault
  * @param receiver Address that will receive the token after the withdraw
  * @param receiver Address that will be the owner of the Vault's shares
  * @return uint256 Amount of shares returned by vault ERC4626 contract
 */
await PodsVault.redeem(
  amount, 
  userAddress,
  userAddress
)
</code></pre>

{% endtab %}

{% tab title="Solidity" %}
Coming soon...
{% endtab %}
{% endtabs %}


# How to read Vault info

This page will be braked into 2 sections. One regarding the Vault general information (eg: TVL) and the other regarding the user-specific information (Eg: Balances).&#x20;

### 1) Vault information

Inside the Vault information, the main info that you will have:&#x20;

* TVL
* Accumulated Returns (since creation)
* Estimated APY (Get the last 30 days and project this for the year)
* Monthly returns
* Historical transactions

**The easiest way to fetch this information is through our API**: <https://yield-backend.pods.finance/strategies/>&#x20;

There you will find the information needed from all our vaults.

In this table, you can find the relation between the information above and the response keys.

| Metric                  | Object Key Name              |
| ----------------------- | ---------------------------- |
| TVL                     | `tvlInTokenDeposited`        |
| Accumulated Returns     | `lastAccReturn`              |
| Estimated APY           | `projectedAPY`               |
| Monthly Returns         | `monthlyReturnsBreakdown`    |
| Historical transactions | not supported yet in the API |

### 2) User information

The basic information that you show about the user are:

* Amount Idle (waiting to be processed)
* Amount invested (already processed, waiting to earn yield)
* Historical transactions

**The easiest way to fetch this information is through our API**: [https://yield-backend.pods.finance/](https://yield-backend.pods.finance/strategies/)user/\<userAddress>

In this table, you can find the relation between the information above and the response keys.

| Metric                  | Object Key Name                  |
| ----------------------- | -------------------------------- |
| Amount idle             | `idleAmountInTokenDeposited`     |
| Amount invested         | `investedAmountInTokenDeposited` |
| Number of shares        | `totalShares`                    |
| Returns                 | `returns`                        |
| Historical transactions | `actions`                        |

This information is what we show in this part of our app:

<figure><img src="/files/nfso4eqTynOhUUfmxAkd" alt=""><figcaption></figcaption></figure>


# Brand Assets

Design components to be used in promotional materials.

### Logo <a href="#logo" id="logo"></a>

<figure><img src="https://3426507089-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MMTZ6iLmulhA48zQv8n%2F-MNUkUxHHvQ_mcgjlP3T%2F-MNUoMNbMZTMYxq9fm7_%2FLogo%20Gradient--2.svg?alt=media&#x26;token=59b30c4c-07ce-4401-87e3-3045da161427" alt=""><figcaption><p>Main logo</p></figcaption></figure>

The main version of the logo, together with some variations of shape and color. Available in multiple sizes and formats (`svg`, `png`).📦 Preview the latest version on Google Drive [here](https://drive.google.com/drive/folders/1J_yHuhw1G9t1izzt7O5ybIGWVfFGFTgh?usp=sharing).

### Covers <a href="#covers" id="covers"></a>

For usage on social media, we provide some cover suggestions. Zoom background included.📦 Preview the latest version on Google Drive [here](https://drive.google.com/drive/folders/1ZemWz1abmBQgHXHh3pQnHab0ZUknzQOf?usp=sharing).

### Elements <a href="#elements" id="elements"></a>

For various other graphic compositions, we release our "elements kit". It contains graphics related to our "pods factory", "smart collateral" and other abstract elements.📦 Preview the latest version on Google Drive [here](https://drive.google.com/drive/folders/1sSx28bDUgd8JZA8W5NkG1wz-LfLLHu12?usp=sharing).

### Platform kit

Platform screenshots coming soon. Contact us at <contact@pods.finance> for any custom content you might need.

### Color Kit <a href="#color-kit" id="color-kit"></a>

Colors we use for the logo and other digital-first elements.

| Color     | Value                                 |
| --------- | ------------------------------------- |
| Primary   | **`#B7156B`**                         |
| Secondary | **`#DF1D2C`**                         |
| Gradient  | **`#B7156B -> #DF1D2C`** at **`45°`** |
| Middle    | **`#C41857`**                         |
| Dark      | **`#262940`**                         |


# FAQ

🙋🏽‍♂️No-dumb-questions page.

## What are options? <a href="#eef2" id="eef2"></a>

An option is an agreement between two parties: a seller and a buyer. The seller writes the contract terms and sells them to the buyer for a premium. That means the seller now has an obligation, and the buyer has a right (but not an obligation) to exercise the contract terms upon expiration.

## **What types of options are there?** <a href="#ec54" id="ec54"></a>

There are two basic types of options: puts and calls. A put represents the right to **sell** the underlying asset at the strike price. On the other hand, a call conveys the right to **buy** an asset at the strike price.

## What is a strangle? <a href="#e318" id="e318"></a>

A strangle is an options strategy in which the investor holds a position in both a [call](https://www.investopedia.com/terms/c/call.asp) and a [put](https://www.investopedia.com/terms/p/put.asp) option with different [strike prices](https://www.investopedia.com/terms/s/strikeprice.asp) but with the same expiration date and underlying asset. A strangle is a good strategy if you think the underlying security will experience a large price movement in the near future but are unsure of the direction. However, it is profitable mainly if the asset prices swing sharply.

## What is the strike price? <a href="#id-2f53" id="id-2f53"></a>

The strike price is commonly used to designate the price at which the underlying asset will be sold or bought.

## What is Lido?

Lido is a decentralized staking protocol that allows users to stake their ETH and receive ETH 2 rewards.

## What is Aave?

Aave is a lending protocol that allows users to lend and borrow assets.&#x20;

## What is stETH?

stETH is the token that represents the staked [ETH in Lido](https://help.lido.fi/en/articles/5230610-what-is-steth).&#x20;

## What is aUSDC?

aUSDC is the interested bearing token that represents the supplied USDC into Aave.&#x20;

## What is the potential PnL ?

For stETHvv:

$$
Payoff stETHvv= (Principal Invested+0.8\*Profit fromExercise + ...
$$

$$
...+0.5\*LidoYield) \* 0.999
$$

For ETHphoria:

$$Payoff ETHphoria = PrincipalInvested + 0.9\* ProfitfromExercise$$

For FUD:

$$PayoffFUD = PrincipalInvested + 0.9\*ProfitfromExercise$$

## What are the tokens stETHvv, ETHphoria, and FUD I receive in the wallet once deposit into respective vaults?

The tokens represent your shares of the total vault.&#x20;

## Does the stETHvv, ETHphoria, and FUD token have a price?

Yes. right now the easiest way to calculate its price is by doing the math: TVL / Total Supply

NOTE: We will add a reading function directly in the contract to make that step easier.

## Are Pods Yield strategies tokens an [ERC-20](https://ethereum.org/en/developers/docs/standards/tokens/erc-20/)?

Yes.&#x20;

## What are the fees?

For stETHvv, the fee structure is composed of a 0.1% management fee at withdrawal and a 20% performance fee on exercised options.

For ETHphoria and FUD, the fee structure is composed of a 10% management fee on the weekly yield and a 10% performance fee on exercised options.&#x20;

## Do Pods Yield vaults follow the [ERC 4626 standard](https://ethereum.org/en/developers/docs/standards/tokens/erc-4626/)?

Yes.&#x20;

## Is there a withdrawal window?

**No**. You can withdraw anytime.\
\
Although it depends on whether or not your deposits have been processed. You can check if the deposit was processed by clicking on the "show breakdown" inside the vault page.

<figure><img src="/files/oUzpIz9CqqjLgjhbYRdv" alt=""><figcaption><p>Breakdown Position visualization</p></figcaption></figure>

* If your deposit has not been processed yet and you wish to withdraw, you can do it by using Etherscan directly using the `refund`  function on each vault address.

<figure><img src="/files/T8dmMpq0MkTRx2uCwVQj" alt=""><figcaption><p>Refund function on Contract/Write in Etherscan</p></figcaption></figure>

* If your deposit has been processed, you can withdraw at any time from the app's front-end.

**Tutorial video**: <https://youtu.be/FjCf59ldwxc>

Have more questions?&#x20;

Reach out to us on our channels:

* [Twitter](https://twitter.com/PodsFinance)
* [Discord](https://discord.com/invite/Qf7utym)


# Glossary of Terms

Find below a glossary of the commonly used terminology used throughout Pods' material.

If we're missing any, please let us know on our [Discord channel](https://discord.gg/Qf7utym), and we'll add it to the list.

| Term                    | Description                                                                                                                        |
| ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
| **stETH**               | staked ETH in Lido                                                                                                                 |
| **stETHvv**             | stETH Volatility Vault                                                                                                             |
| **Strike price**        | The agreed price in which the buyer will be able to sell or buy the underlying asset to the seller at any moment until expiration. |
| **Put**                 | A put option describes the right to **sell** the underlying asset at the strike price.                                             |
| **Call**                | A call option describes the right to **buy** the underlying asset at the strike price.                                             |
| **Premium**             | The premium is the option's price. It is the amount that the buyer has to pay for the seller to purchase an option.                |
| **Principal Protected** | The principal invested is never at market risk.                                                                                    |


# 3rd party integrations list

Find Pods Yield's metrics and keep track of your position

## Dune Analytics

{% embed url="<https://dune.com/aerhy/pods-yield>" %}

## Defillama

{% embed url="<https://defillama.com/protocol/pods-yield>" %}

## Zapper.fi

{% embed url="<https://zapper.fi/apps/pods-yield?network=ethereum>" %}

## DeBank

{% embed url="<https://debank.com/projects/pods>" %}

## Zerion

{% embed url="<https://twitter.com/PodsFinance/status/1565036129870643200>" %}

## Coinbase Wallet

{% embed url="<https://twitter.com/PodsFinance/status/1571893005119791104>" %}


