Protocol Risks

Protocol Risks

Lending Protocols

Automated Market Makers

Leverage-enabling protocols

Liquidity mining protocols

# Protocol Risks

Yearn’s core products are the vaults. Each vault runs at least one strategy, and each strategy is exposed to at least one protocol. Strategy and protocol risks are described here (https://docs.yearn.fi/developers/security/risks/strategy-risks) and here (https://docs.yearn.fi/developers/security/risks/protocol-risks) respectively.

The key protocols to which Yearn’s vaults are exposed are lending protocols, AMMs and protocols that enable leverage.

## Lending Protocols

One of the simplest strategies is collateralized lending which involves lending assets on lending protocols to earn a yield. For example, a lending strategy will lend the underlying asset to the highest yielding lending protocol that meets the risk score requirements. This type of strategy is the most widely used in the single asset V3 vaults.

Examples of Lending protocols that Yearn strategies may use are Aave, Morpho, Spark, LlamaLend, and more.

RiskDescriptionGovernanceAdmin key holders (or token holders) change the lending protocol adversely, e.g. accept risky assets with lenient risk parametersTechnologicalSmart contract risk from interacting with lending protocolsLiquidations do not occur as expectedMarketThe value of the loans exceed the value of the collateralLow demand for borrowing leads to low yieldsAccepted assets become impairedOracleIncorrect price feed causes the collateral to go to such a value that the loan is liquidated

## Automated Market Makers

AMMs are used some of Yearn’s vault strategies to earn trading fees (and liquidity mining rewards if available) and may be used to exchange earned tokens for more of the underlying token.

Yearn's Factory vaults are the main consumers of AMM strategies. Examples of the AMMs to which Yearn’s vaults are exposed, are Curve Finance, Aerodrome, and Velodrome.

Yearn's process to sell reward tokens for the underlying and compound earnings has evolved over the years and now typically uses Auctions that fall back to cowSwap.

RiskDescriptionMarketLack of liquidity for the token being exchangedTrading volumes reduce leading to lower feesImpermanent loss due to the pool’s token prices changing relative to each otherTechnologicalSmart contract risk from interacting with AMMsGovernanceToken holders vote to change the AMM adversely

## Leverage-enabling protocols

Leverage-enabling protocols are used in Yearn’s vault strategies to increase the yield. This is possible when a non-leveraged strategy earns a higher return than the cost of borrowing.

Examples of the leverage-enabling protocols to which Yearn’s vaults are exposed are Aave, Morpho, Moonwell, etc.

These kinds of strategies are typically reserved for higher risk Vaults. Sometimes a vault with a risk score of 2 can have some very light leverage, but typically these will be -3 and -4 vaults.

RiskDescriptionGovernanceMulti-sig or token holders vote to change the protocol adverselyPoorly chosen risk parameters for onboarded collateral of underlying market e.g. collateralization ratios that are too lowTechnologicalSmart contract riskMarketLiquidations are not processed correctly on Maker or Unit ProtocolStablecoin peg is not maintainedCost of uncollateralized borrowing increases such that Yearn’s strategies cannot utilize itOracleIncorrect price feed leads to incorrect liquidation of positions

## Liquidity mining protocols

A core strategy for Yearn’s vaults is to liquidity mine (or yield farm) protocols.
Liquidity mining involves interacting with a protocol to earn the protocol’s native tokens.

RiskDescriptionGovernanceAdmin key holders change protocol adversely, e.g. introduce penalties for withdrawals or steal fundsTechnologicalSmart contract risk of protocol or rewards contractMarketFall in price of token being farmed reducing the APYLiquidity of liquidity mined token on AMM is reduced or removedOracleDelays or inability to withdraw liquidity in an emergency

These factors are all taken into account by the Yearn Security Team when scoring strategies using the Risk Score Framework (https://docs.yearn.fi/developers/security/risks/risk-score).


Yearn Multisig

Yearn Multisig

How it works

Protocol Guardian Role

Members

History

# Yearn Multisig

## How it works

The multisig is implemented by a 6-of-9 multi-signature wallet. The members of the multi-signature wallet were voted in by YFI holders and are subject to change from future governance votes. Specific powers are delegated to the governance multisig, as defined by Governance 2.0 (https://gov.yearn.fi/t/yip-41-temporarily-empower-multisig/3630).

The multisig is implemented as a Gnosis Safe. The multisig's assets, transactions, and signers can be viewed using Gnosis's Web UI (https://app.safe.global/home?safe=eth:0xFEB4acf3df3cDEA7399794D0869ef76A6EfAff52). If there is a need to trustlessly audit Yearn's multisig (without trusting the Gnosis site), the Gnosis Safe web app source code can be found on GitHub here (https://github.com/safe-global/safe-wallet-web).

## Protocol Guardian Role

Per YIP-81 (https://snapshot.box/#/s:veyfi.eth/proposal/0x6f3082db2cef3e0c254e569580d063cb14130a92d0bf1729bef342a386e419f2), the Yearn Multisig (AKA yChad) serves in the Guardian role to steward and protect the Yearn Protocol and its participants. The Guardian role is defined as being able to "nullify a proposal or governance decision but cannot make proposals".

## Members

Multisig membership can be validated from the Gnosis UI here (https://app.safe.global/settings/setup?safe=eth:0xFEB4acf3df3cDEA7399794D0869ef76A6EfAff52).
Cryptographic membership attestations can be validated against the PGP keys in the yearn-security (https://github.com/yearn/yearn-security/tree/master/keys) repository.

AddressMember NameMembership Attestation0x6F2A8Ee9452ba7d336b3fba03caC27f7818AeAD6 (https://etherscan.io/address/0x6F2A8Ee9452ba7d336b3fba03caC27f7818AeAD6)Mariano Conti (nanexcool.com, prev. MakerDAO)Twitter (https://x.com/nanexcool/status/1491900804223041540)0xeA6c0837fef621E77329f85820F503cA09f2B3a9 (https://etherscan.io/address/0xeA6c0837fef621E77329f85820F503cA09f2B3a9)Leo Cheng (C.R.E.A.M. Finance)Twitter (https://x.com/lumbergdoteth/status/1923382177200218580)0x70aF5a3368606c6557D2B3ce2EEC8796B914EAa3 (https://etherscan.io/address/0x70aF5a3368606c6557D2B3ce2EEC8796B914EAa3)omnifient (Katana)Twitter (https://x.com/omnifient/status/2015032813326643230)0xf5D3dbda5F41A0E26D71B948e29522398e71cFaE (https://etherscan.io/address/0xf5D3dbda5F41A0E26D71B948e29522398e71cFaE)0xngmi (DefiLlama)Twitter (https://x.com/0xngmi/status/1590047391797088257)0x5Db9926c93085a92F14A85daBF6FF27b07362Cae (https://etherscan.io/address/0x5Db9926c93085a92F14A85daBF6FF27b07362Cae)Ephy (Sky/MakerDAO)Twitter (https://x.com/0x3phemeralsoul/status/1923374073440080069)0x2B888954421b424C5D3D9Ce9bB67c9bD47537d12 (https://etherscan.io/address/0x2B888954421b424C5D3D9Ce9bB67c9bD47537d12)Lefteris Karapetsas (rotkiapp)Twitter (https://x.com/LefterisJP/status/1590083336210644992)0xFe45baf0F18c207152A807c1b05926583CFE2e4b (https://etherscan.io/address/0xFe45baf0F18c207152A807c1b05926583CFE2e4b)Michael Egorov (Curve)Twitter (https://x.com/newmichwill/status/1849912651163250755)0x962228a90eaC69238c7D1F216d80037e61eA9255 (https://etherscan.io/address/0x962228a90eaC69238c7D1F216d80037e61eA9255)CryptoHarry (Inverse)Twitter (https://x.com/0xCryptoHarry/status/1848394875659776430)0x700F1a984C962b447CcDb95c4c2D8074C65098a3 (https://etherscan.io/address/0x700F1a984C962b447CcDb95c4c2D8074C65098a3)Tapir (Yearn)GitHub Gist (https://gist.github.com/tapired/3b26a56b8847dc6f608edb9403dfc61d)

## History

- December 2025 - YIP-89: Proposal to rotate multisig signer (https://snapshot.box/#/s:veyfi.eth/proposal/0x02ac9f5cc91ad090938195c37e17fd24941a668082b2b6b58f20e11e32d73003)

- April 2025 - YIP-84: Proposal to rotate multisig signer (https://snapshot.box/#/s:veyfi.eth/proposal/0xeecd2a9ca79f9b22071d79d436a7e5ccc56593eb4c3bc8ef1b57c8389809a101)

- October 2024 - YIP-79: Proposal to rotate multisig signers and provide compensation (https://snapshot.org/#/veyfi.eth/proposal/0xc7ded2863a10154b6b520921af4ada48d64d74e5b7989f98cdf073542b2e4411)

- June 2022 - YIP-68: Change Three Multisig signers (https://gov.yearn.fi/t/yip-68-rotate-multisig-signers/12582)

- May 2021 - YIP-62: Change Two Multisig Signers (https://gov.yearn.fi/t/yip-62-change-two-multisig-signers/10758)

- April 2021 - YIP-61: Governance 2.0 (https://gov.yearn.fi/t/yip-61-governance-2-0/10460)

- August 2020 - YIP-41: Temporarily Empower Multisig (https://gov.yearn.fi/t/yip-41-temporarily-empower-multisig/3630)

- August 2020 - YIP-40: Replace inactive multisig signers (https://yips.yearn.fi/YIPS/yip-40)


Emergency Procedures for Yearn Finance

Emergency Procedures for Yearn Finance

TL;DR: Emergency Checklist

Introduction

Definitions and Examples of Emergencies

Roles

Facilitator

Multi-sig Herder

Strategist Lead

Core Dev Lead (Guardian)

Web Lead

Ops

Emergency Steps

Emergency Checklist

Tools

Incident Post Mortem

Post Mortem Outputs

Post Mortem Steps

# Emergency Procedures for Yearn Finance

## TL;DR: Emergency Checklist

## Introduction

This document details the procedures and guidelines that should take place in the event of an emergency situation. Its purpose is to minimize the risk of loss of funds for Yearn's users, Treasury, and Smart Contracts.

## Definitions and Examples of Emergencies

For this document, an emergency situation is defined to be:

Any situation that may lead to a considerable amount of loss of funds for Yearn users, Yearn's Treasury, or Smart Contracts deployed by Yearn.

This is a non-exhaustive list of possible emergency scenarios:

- Bug/Exploit in Vault/Strategy code that can cause a loss of funds for users

- Bug/Exploit in an underlying protocol that a Yearn Strategy is utilizing that may lead to loss of funds

- Loss of private keys for a key role, such as a Strategist

- Potential exploit discovered by a team or bounty program researcher

- Active exploit/hack in progress discovered by an unknown party

## Roles

In the event of an emergency situation, the following roles should be assigned to Yearn contributors working to resolve the situation:

- Facilitator

- Multi-sig Herder

- Strategist Lead

- Core Dev Lead (Guardian)

- Web Lead

- Ops

A contributor may be assigned up to two of these roles concurrently.

### Facilitator

Facilitates the emergency handling and ensures the process described in this document is followed, engaging with the correct stakeholders and teams for the necessary decisions to be made quickly. A suitable Facilitator is any person familiar with the process and is confident that they can drive the team to follow through. It's expected that the person assigned to this role has relevant experience either from having worked real scenarios or through drill training.

### Multi-sig Herder

Responsible for ensuring that different Yearn teams' Multi-sig wallets (i.e. dev.ychad.eth, brain.ychad.eth, ychad.eth) can execute transactions on time during the emergency.

Main responsibilities:

- Help clear the queue of any pending operations once the War Room starts

- Coordinate required signers so they can respond quickly to queued transactions

- Prepare or help with transactions in different multi-sigs
Reference:

- emergency-toolbox (https://github.com/yearn/emergency-toolbox)

### Strategist Lead

In charge of coordinating quick changes to management and strategist roles during the emergency, including but not limited to:

- Prepare and Execute Strategist Multi-sig transactions and operations

- Set strategy in emergency exit mode

- Update debt ratios

- Remove Strategies from Queue

- Coordinate Harvests

### Core Dev Lead (Guardian)

Coordinates quick changes to Governance and Guardian roles during the emergency, including but not limited to:

- Prepare and Execute Core Dev Multi-sig transactions and operations

- Revoke a Strategy

- Set vault in emergency shutdown mode

### Web Lead

Coordinates quick changes to UI and Websites as required, including but not limited to:

- Disable deposits/withdrawals through the UI

- Display alerts and banners

- Other UI-related work

### Ops

In charge of coordinating comms and operations assistance as required:

- Clear with War Room what information and communication can be published during and after the incident

- Coordinate Communications

- Take note of timelines and events for disclosure

## Emergency Steps

Also see Check list (https://docs.yearn.fi/developers/security/EMERGENCY#emergency-checklist) and Tools (https://docs.yearn.fi/developers/security/EMERGENCY#tools).

This acts as a guideline to follow when an incident is reported requiring immediate attention.

The primary objective is to minimize the loss of funds, in particular for Yearn's users. All decisions made should be driven by this goal.

- Open a private chat room (War Room) with a voice channel and invite only the team members that are online that can cover the roles described above (https://docs.yearn.fi/developers/security/EMERGENCY#roles). The War Room is limited to members that act in the capacities of the designated roles, as well as additional persons that can provide critical insight into the circumstances of the issue and how it can best be resolved.

- All the information that is gathered during the War Room should be considered private to the chat and not to be shared with third parties. Relevant data should be pinned and updated by the Facilitator for the team to have handy.

- The team's first milestone is to assess the situation as quickly as possible: Confirming the reported information and determining how critical the incident is. A few questions to guide this process:

- Is there confirmation from several team members/sources that the issue is valid? Are there example transactions that show the incident occurring? (Pin these in the War Room)

- Is the Strategist that knows the most about the code in the War Room? Can the Strategist in question be reached? If not, can we reach the backup Strategist?

- Are funds presently at risk? Is immediate action required?

- Is the issue isolated or does it affect several vaults/strategies? Can the affected contracts be identified? (Pin these in the War Room)

- Which Multi-sig will require signing to address the issue? The Multi-sig Herder should begin to notify signers and clear the queue in preparation for emergency transactions.

- If there is no immediate risk of loss of funds, does the team still need to take preventive action or some other mitigation?

- Is there agreement in the team that the situation is under control and that the War Room can be closed?

- Once the issue has been confirmed as valid, the next step is to take immediate corrective action to prevent further loss of funds. If the root cause requires further research, the team must err on the side of caution and take emergency preventive actions while the situation continues to be assessed. A few questions to guide the decisions of the team:

- Disable deposits to the affected Vaults? Should migrations and deposits be removed from the UI?

- Activate Emergency Exit on the affected Strategies?

- Remove one or more strategies from the withdrawal queue from the affected vaults?

- Activate Emergency Shutdown in the Vault?

- Revoke 1 or more Strategies?

- Are multiple Team members able to confirm the corrective actions will stop the immediate risk through local Ganache fork testing? Strategist and Core Dev main roles in particular to confirm this step.

- The immediate corrective actions should be scripted or taken from the repository emergency-toolbox (https://github.com/yearn/emergency-toolbox) and executed ASAP. Multi-sig Herder and Strategist Lead should coordinate this execution within the corresponding roles. NOTE: This step is meant to give the War Room time to assess and research a more long-term solution.

- Once corrective measures are in place and there is confirmation by multiple sources that funds are no longer at risk, the next objective is to identify the root cause. A few questions/actions during this step that can help the team make decisions:

- What communications should be made public at this point?

- Can research among members of the War Room be divided? This step can be open for team members to do live debug sessions sharing screens to help identify the problem using the sample transactions.

- Once the cause is identified, the team can brainstorm to come up with the most suitable remediation plan and its code implementation (if required). A few questions that can help during this time:

- In case there are many possible solutions can the team prioritize by weighing each option by time to implement and minimization of losses?

- Can the possible solutions be tested and compared to confirm the end state fixes the issue?

- Is there agreement in the War Room about the best solution? If not, can the objections be identified and a path for how to reach consensus on the approach be worked out, prioritizing the minimization of losses?

- If a solution will take longer than a few hours, are there any further communications and preventive actions needed while the fix is developed?

- Does the solution require a longer-term plan? Are there identified owners for the tasks/steps for the plan's execution?

- Once a solution has been implemented, the team will confirm the solution resolves the issue and minimizes the loss of funds. Possible actions needed during this step:

- Run in ganache fork simulations of end state to confirm the proposed solution(s)

- Coordinate signatures from multi-sig signers and execution

- Enable UI changes to normalize operations as needed

- Assign a lead to prepare a disclosure (https://github.com/yearn/yearn-security) (should it be required), preparing a timeline of the events that took place.

- The team agrees when the War Room can be dismantled. The Facilitator breaks down the War Room and sets reminders if it takes longer than a few hours for members to reconvene.

### Emergency Checklist

This checklist should be complemented with the steps (https://docs.yearn.fi/developers/security/EMERGENCY#emergency-steps)

- Create War room with audio

- Assign Key Roles to War Room members

- Add Strategist or other Expert (or their backup) to the War Room

- Clear related Multi-sig queues

- Disable deposits and/or withdrawals as needed in the web UI

- If share price has been artificially lowered, then call `vault.setDepositLimit(0)` from governance

- Confirm and identify Issue

- Take immediate corrective/preventive actions to prevent (further) loss of funds

- Communicate the current situation internally and externally (as appropriate)

- Determine the root cause

- Propose workable solutions

- Implement and validate solutions

- Prioritize solutions

- Reach agreement in Team on best solution

- Execute solution

- Confirm incident has been resolved

- Assign ownership of security disclosure report

- Disband War Room

- Conduct immediate debrief

- Schedule a Post Mortem

### Tools

List of tools and alternatives in case primary tools are not available during an incident.

DescriptionPrimarySecondaryCode SharingGitHubHackMd (https://hackmd.io/), CodeShare (https://codeshare.io/)Communications*TelegramDiscordTransaction DetailsEtherscan (https://etherscan.io/)Tenderly (https://tenderly.co/)DebuggingBrownieTenderly (https://tenderly.co/)Transaction Builderape-safe (https://github.com/banteg/ape-safe)Backup if gnosis safe Api is not working?Screen Sharing*jitsi (https://jitsi.org/)Google Hangouts

Facilitator is responsible to ensure no unauthorized persons enter the War Room or join these tools via invite links that leak.

## Incident Post Mortem

A Post Mortem should be conducted after an incident to gather data and feedback from War Room participants in order to produce actionable improvements for Yearn processes such as this one.

Following the dissolution of a War Room, the Facilitator should ideally conduct an immediate informal debrief to gather initial notes before they are forgotten by participants.

This can then be complemented by a more extensive Post Mortem as outlined below.

The Post Mortem should be conducted at most a week following the incident to ensure a fresh recollection by the participants.

It is key that most of the participants of the War Room are involved during this session for an accurate assessment of the events that took place. Discussion is encouraged. The objective is to collect constructive feedback on how the process can be improved, and not to assign blame to any War Room participants.

Participants are encouraged to provide input on each of the steps. If a participant is not giving input, the Facilitator is expected to try to obtain more feedback by asking questions.

### Post Mortem Outputs

- List of what went well

- List of what be improved

- List of questions that came up in the Post Mortem

- List of insights from the process

- Root Cause Analysis along with concrete measures required to prevent the incident from ever happening again.

- List of action items assigned to owners with estimates for completion.

### Post Mortem Steps

- Facilitator runs the session in a voice channel and shares a screen for participants to follow notes.

- Facilitator runs through an agenda to obtain the necessary outputs (https://docs.yearn.fi/developers/security/EMERGENCY#post-mortem-outputs).

- For the Root Cause Analysis part, the Facilitator conducts an exercise to write the problem statement first and then confirm with the participants that the statement is correct and understood.

- Root Cause Analysis can be identified with the following tools:

- Brainstorming (https://en.wikipedia.org/wiki/Brainstorming) session with participants

- 5 Whys Technique (https://en.wikipedia.org/wiki/Five_whys)

- Once Root Causes have been identified, action items can be written and assigned to willing participants that can own the tasks. It is recommended that an estimated time for completion is given. A later process can track completion of given assignments. Note: The action items need to be clear, actionable and measurable for completion

- The Facilitator tracks completion of action items. The end result of the process should be an actionable improvement in the process. Some possible improvements:

- Changes in the process and documentation

- Changes in code and tests to validate

- Changes in tools implemented and incorporated into the process


Governance Apps (Repo)

Governance Apps (Repo)

Live apps

User-facing docs

Local development

# Governance Apps (Repo)

The stYFI and veYFI/LLYFI dashboards are developed in a separate repository:

- Code: yearn/governance-apps (https://github.com/yearn/governance-apps)

## Live apps

- stYFI: https://styfi.yearn.fi

- veYFI / LLYFI: https://veyfi.yearn.fi

## User-facing docs

This repository documents how the system works from a governance/user perspective:

- stYFI (https://docs.yearn.fi/contributing/governance/styfi)

- Migrate from veYFI (https://docs.yearn.fi/contributing/governance/migrating-from-veyfi)

- Liquid Lockers (LLYFI) (https://docs.yearn.fi/contributing/governance/liquid-lockers)

## Local development

Follow the README in the `yearn/governance-apps` repository (Node.js 22.x).


Building on Yearn

Building on Yearn

Core Tools

V3 Vaults

V2 Vaults

Strategy Development

Frontend Integrations

Data Sources

Data Analysis

Research

# Building on Yearn

![image](https://docs.yearn.fi/assets/images/pixie-wide-no-logo-858fe33d6bb6764b1912dc30edf46e68.jpg)

Welcome! This is the spot to be for all things related to building products on, for, and with Yearn. If you are looking for more general information about Yearn and its products, check out the Getting Started (https://docs.yearn.fi/getting-started/intro) section of the docs. If you are looking to build, read on!

## Core Tools

- Solidity (https://docs.soliditylang.org/en/v0.8.6/index.html)

- Brownie (https://eth-brownie.readthedocs.io/en/stable/)

- ethers.js (https://docs.ethers.io/v5/)

- Web3.js (https://web3js.readthedocs.io/en/v1.4.0/)

- Ganache (https://trufflesuite.com/ganache/)

- Foundry (https://github.com/nicolasgarcia214/damn-vulnerable-defi-foundry)

## Yearn Vaults & Smart Contract Integrations

Yearn’s core product is the Vault (also known as yVault) — a set-it-and-forget-it yield aggregator running on top of DeFi’s yield-generating protocols like Compound, Aave, Curve, and Convex.

### V3 Vaults

This Repository (https://github.com/yearn/yearn-vaults-v3) includes the set of smart contracts that are used for the Yearn 4626-compliant V3 vaults.

Check out the V3 Vaults (https://docs.yearn.fi/developers/v3/overview) section of this documentation for more information.

### V2 Vaults

This repository (https://github.com/yearn/yearn-vaults) includes the set of smart contracts that are used for the Yearn V2 Vaults. It contains the requirements, code, deployment scripts, and tests necessary for the core protocol, including an inheritable template strategy for use with Solidity-based strategies that interact with Yearn Vaults. These contracts are used to create a simple way to generate high risk-adjusted returns for depositors of various assets via best-in-class lending protocols, liquidity pools, and community-made yield farming strategies on Ethereum.

Check out the V2 Vaults (https://docs.yearn.fi/developers/v2/getting-started) section of this documentation for more information.

### Strategy Development

A Yearn Strategy is a set of smart contracts that implement different farming strategies that utilize deposited assets to generate yields. Vaults move assets from one farming application to another by switching between strategies. Rewards/profits generated by strategies are regularly updated, harvested, swapped for the original vault asset, and deposited again for compound farming.

V2 and V3 vaults implement strategies differently, so it is important to get familiar with the differences when deciding which Vault product you wish to use. More information about V3 strategies can be found here (https://docs.yearn.fi/developers/v3/strategy_writing_guide) and information on V2 strategies can be found here (https://docs.yearn.fi/developers/v2/DEPLOYMENT#deploying-a-new-strategy)

### Frontend Integrations

Yearn uses a JavaScript SDK for formatting protocol data and generating transactions for reading/writing protocol data. Yearn SDK integrates several components, both on-chain and off-chain.

The repository here (https://github.com/turtlemoji/yearn-sdk-examples) contains a live preview and example usage of the Yearn SDK. Explore this codebase to learn how to start interacting with the Yearn protocol in your own app.

Check out the Frontend Integrations (https://docs.yearn.fi/developers/front-end-development) section of this documentation for more information about Frontend Integrations.

### Data Sources

yDaemon (https://ydaemon.yearn.fi/) is a public API for a broad range of Vault data.

- Learn more about yDaemon in the README (https://github.com/yearn/ydaemon)

The Graph - Query contract data with GQL using the Yearn subgraphs

- Learn more about the Graph and Subgraphs that Yearn provides here (https://docs.yearn.fi/developers/data-services/subgraph-info).

## Data Analysis

Yearn aims to provide more insights into our products to our customers and partners through analyzing the on-chain and off-chain data. Given that all Yearn protocol data is publicly stored on-chain, there are lots of insights to be gained from analyzing these transactions.

Dune Analytics- Query contract data and generate dashboards with SQL

- Vaults Dashboard (https://dune.com/zootrop/yearn-vaults)

## Research

Some of the research questions that we are interested in:

- Screening profitable liquidity pools for our strategies

- Assessing the impact of TVL on the impermanent loss

- Screening the volume of various pools

- Providing risk metrics to our vaults

- Price volatility of the underlying token

- Addressing the protocol risks

- Optimizing our strategies according to the change in gas fees

- Decide on when to deleverage and trade the governance tokens

- Decide on when to harvest

- Predicting impermanent loss for Uniswap V3 pools

- Portfolio construction across yearn products

More details on these topics can be seen in our issues tab.


Auctions

Auctions

Introduction

How it works

Addresses

Specification

Events

AuctionEnabled

AuctionDisabled

AuctionKicked

AuctionTaken

View methods

auctionLength

auctionCooldown

auctionInfo

getAmountNeeded

price

kickable

Write methods

kick

take

# Auctions

## Introduction

Yearn regularly holds permissionless Dutch auctions, most notably for V3 strategies and YFI buybacks. This process has been standardized to encourage integration by searchers.

### How it works

- Each `want` token has a dedicated auction contract. Many different `sell` tokens can be offered through distinct auctions through this contract, receiving the same asset in return. In other words, "Sell DAI for YFI" and "Sell WETH for YFI" can both supported through the same contract with WETH as the asset, but any one auction will only sell either DAI or WETH, never both.

- Tokens for sale accumulate either in their respective auction contracts directly, or in the contracts that rely on the auctions (and get transferred to the auction contract at the start of the auction).

- An auction can be initiated either once a sufficient `sell` amount accumulates, or upon a manual `kick()` call that is permissionless.
Auctions can last up to 24 hours and occur no more than once within some configurable interval, like weekly.

- The initial price is set high and decreases with time, halving every hour.

- Takers can `take()` the sell token on offer at the current price, providing asset to the contract in return.

- The auction concludes once all sell in the batch is sold or 24 hours elapse.

- Unsold sell carries over to the subsequent auction.

### Addresses

NameAddressAuction factory0xE6aB098E8582178A76DC80d55ca304d1Dec11AD8 (https://etherscan.io/address/0xE6aB098E8582178A76DC80d55ca304d1Dec11AD8)YFI buyback auctions0x4349ed200029e6Cf38F1455B9dA88981F1806df3 (https://etherscan.io/address/0x4349ed200029e6Cf38F1455B9dA88981F1806df3)

## Specification

### Events

#### AuctionEnabled

Emitted when an auction is enabled to tell parties to track it.

```
- name: AuctionEnabled type: event inputs: - name: auctionId indexed: false type: bytes32 - name: sell indexed: true type: address - name: want indexed: true type: address - name: auctionAddress indexed: true type: address
```

#### AuctionDisabled

Emitted when an Auction is disabled so it no longer needs to be tracked.

```
- name: AuctionDisabled type: event inputs: - name: auctionId indexed: false type: bytes32 - name: sell indexed: true type: address - name: want indexed: true type: address - name: auctionAddress indexed: true type: address
```

#### AuctionKicked

Emitted when a new auction is kicked off.

```
- name: AuctionKicked type: event inputs: - name: auctionId indexed: true type: bytes32 - name: sellAvailable indexed: false type: uint256
```

#### AuctionTaken

Emitted when some amount of sell is taken.

```
- name: AuctionTaken type: event inputs: - name: auctionId indexed: true type: bytes32 - name: amountTaken indexed: false type: uint256 - name: amountLeft indexed: false type: uint256
```

### View methods

#### auctionLength

Get the time length of each auction.

```
- name: auctionLength type: function stateMutability: view inputs: [] outputs: - name: auctionLengthTime type: uint256
```

#### auctionCooldown

Get the minimum time inbetween auction kicks.

```
- name: auctionCooldown type: function stateMutability: view inputs: [] outputs: - name: auctionCooldownTime type: uint256
```

#### auctionInfo

Get all of the info for a specific auction.

```
- name: auctionInfo type: function stateMutability: view inputs: - name: auctionId type: bytes32 outputs: - name: sell type: address - name: want type: address - name: kicked type: uint256 - name: available type: uint256
```

#### getAmountNeeded

Get the exact amount of `want` needed to buy `sell`.

- Will return `0` if nothing to take.

```
- name: getAmountNeeded type: function stateMutability: view inputs: - name: id type: bytes32 - name: amoutToTake type: uint256 - name: timestamp type: uint256 default: block.timestamp outputs: - name: currentPrice type: uint256
```

#### price

Get the current price of `sell` in terms of `want`.

```
- name: price type: function stateMutability: view inputs: - name: id type: bytes32 - name: timestamp type: uint256 default: block.timestamp outputs: - name: currentPrice type: uint256
```

#### kickable

Get the expected amount of `sell` that would be available if auction was kicked.

- Inclusive of anything left over unsold from the last auction

- May not be entirely accurate of the effect of an actual kick.

```
- name: kickable type: function stateMutability: view inputs: - name: id type: bytes32 outputs: - name: expectedAvailable type: uint256
```

### Write methods

#### kick

Kicks an auction.

```
- name: kick type: function stateMutability: nonpayable inputs: - name: auctionId type: bytes32 outputs: - name: amountAvailable type: uint256
```

#### take

Take some amount of `sell` for `want` at the current price.

```
- name: take type: function stateMutability: nonpayable inputs: - name: auctionId type: bytes32 - name: maxAmount type: uint256 default: 2 ** 256 - 1 - name: receiver type: address default: msg.sender - name: data type: bytes default: empty
```

NOTE:

If the optional 'data' parameter is supplied the auction will do a callback to the receiver address after sending the `sell` but before pulling the `want`.

The receiver will need to implement following function to receive the callback:

```
- name: auctionTakeCallback type: function stateMutability: nonpayable inputs: - name: auctionId type: bytes32 - name: sender type: address - name: amountTaken type: uint256 - name: amountNeeded type: uint256 - name: data type: bytes default: empty
```


Frontend Integrations

Frontend Integrations

# Frontend Integrations

Yearn uses a JavaScript SDK for formatting protocol data and generating transactions for reading/writing protocol data. Yearn SDK integrates several components, both on-chain and off-chain.

The repository here (https://github.com/turtlemoji/yearn-sdk-examples) contains a live preview and example usage of the Yearn SDK. Explore this codebase to learn how to start interacting with the Yearn protocol in your own app.


yPRISMA Interface Guide

yPRISMA Interface Guide

Quick Start

Stake yPRISMA

1. Stake

2. Unstake

3. Claim Rewards

4. Get yPRISMA

Auto-Compound yPRISMA

1. Deposit

2. Withdraw

Prisma Vaults

# yPRISMA Interface Guide

## Quick Start

- On the landing page, click "Launch App" to enter the yPRISMA app.

- Click "Connect Wallet" (top right) to connect to your preferred wallet.

- When you see your wallet address, instead of "Connect Wallet", you're connected!

## Stake yPRISMA

You'll begin on the "EARN mkUSD" tab, which is the home for yPRISMA staking.

![image](https://docs.yearn.fi/assets/images/screen-1-01eeee2914532ca9a5d2f323175ee5b5.png)

Inside this tab, you can perform the following actions:

- Stake

- Unstake

- Claim Rewards

- Get yPRISMA

There's also a helpful data panel on the right-hand side with the following information:

- Max Staking APR: The current APR for stakers with the maximum 2.5x boost

- Your Boost: The average boost of all your staked yPRISMA - it will be somewhere between the minimum (0.5x) and the maximum (2.5x)

- Staked Amount: The total amount of yPRISMA you have in the Yearn Boosted Staker

- Your APR: The current APR you are receiving based on your boost

- Claimable Rewards: The current $ value of your mkUSD rewards available to claim

- Total Staked: The total amount of yPRISMA staked in the Yearn Boosted Staker

- Min/Max APR: The current minimum APR (based on 0.5x boost) and maximum APR (based on 2.5x boost)

- Total Rewards Last Week: The total $ value of mkUSD rewards shared between Yearn Boosted Staker users last week

### 1. Stake

First, you'll need some yPRISMA. You can mint or buy yPRISMA with PRISMA via the zapper on the "Get yPRISMA" tab. Alternatively, yPRISMA can be purchased directly through the following platforms:

- Curve Finance (https://curve.finance/#/ethereum/swap?from=0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee&to=0xe3668873d944e4a949da05fc8bde419eff543882) - The primary liquidity source for yPRISMA

- CowSwap (https://swap.cow.fi/#/1/swap/ETH/YPRISMA) - DEX aggregators like CowSwap should also work well

![image](https://docs.yearn.fi/assets/images/stake-1-c67dfc2ec8947ff1d9fd8822900640e8.png)

You'll need to approve the Yearn Boosted Staker contract and then you can stake your yPRISMA. Once staked, the data panel on the right-hand side will update to display your new boost multiplier, staked amount, and APR.

![image](https://docs.yearn.fi/assets/images/data-panel-1-d1c22959b75fc2b8a58fc3095b41880d.png)

### 2. Unstake

You're free to unstake your yPRISMA at any time with no lock-ups or penalties.

![image](https://docs.yearn.fi/assets/images/unstake-1-d324c1e25adbcb368a2b657564290d2c.png)

The total amount of yPRISMA you have staked will appear below the unstaking field. To unstake your full balance, simply click the max button which will auto-fill the amount. Then click "Unstake" to receive your yPRISMA tokens back to your wallet.

Again, the data panel on the right will update following your unstaking. A max unstake will reset your boost, staked amount and APR to zero. A partial unstake may increase your boost and APR as the least-weighted amounts are unstaked first.

### 3. Claim Rewards

You can view the $ value of your claimable rewards in this tab, as well as the amount in yvmkUSD-A vault tokens.

![image](https://docs.yearn.fi/assets/images/claim-1-eda64293dfccaf1a6beea255cda94dba.png)

As the vault earns yield, the price of your vault tokens will increase as there is more underlying mkUSD in the vault for you to redeem upon withdrawal. For example, 100 yvmkUSD-A could represent 150 mkUSD (~$150.00), dependent on the total cumulative earnings of the vault.

Your mkUSD rewards accrue week over week and are never lost if unclaimed. To claim them to your wallet, all you need to do is click "Claim All" and confirm the transaction .

### 4. Get yPRISMA

Here you'll find an interface for Yearn's yPRISMA zapper contract. You'll need to have PRISMA tokens in your wallet in order to use it.

![image](https://docs.yearn.fi/assets/images/zap-1-c03e1d275caa4b992c6d56b96b74bc7b.png)

Using the zapper is as simple as clicking "Mint". Your PRISMA will then either be locked with Yearn (minting you new yPRISMA at a 1:1 ratio) or swapped for yPRISMA via the Curve pool (if this would output more yPRISMA).

## Auto-Compound yPRISMA

Clicking the "EARN yPRISMA" tab switches you to our auto-compounding yPRISMA V3 vault.

![image](https://docs.yearn.fi/assets/images/auto-comp-screen-1-0320175c8ca04feebebcb889ea97cd2c.png)

Inside this tab, you can perform the following actions

- Deposit

- Withdraw

There's also a helpful data panel on the right-hand side with the following information:

- Estimated Vault APY: The "live" APY of the vault, after fees, and with the compounding of returns taken into consideration

- Deposited Amount: The $ value of your yPRISMA deposited in the vault

- Earned: The $ value of yPRISMA you have earned whilst in the vault

- Total Deposits: The total amount of yPRISMA deposited in the vault by all users

- TVL: The $ value of all yPRISMA deposited in the vault

### 1. Deposit

You'll need to approve the vault contract to allow it to access your yPRISMA and then you can go ahead and deposit your yPRISMA.

![image](https://docs.yearn.fi/assets/images/auto-comp-deposit-1-ad5fe6e321b8978b798722576d79146f.png)

And that's it. There's nothing more for you to do.

You'll receive "yvyPRISMA" vault tokens to your wallet, which are like a deposit receipt. They represent your share of the yPRISMA yVault. As the vault earns yield, the price of your vault tokens will increase as there is more underlying yPRISMA in the vault for you to redeem upon withdrawal.

### 2. Withdraw

You can make a withdrawal from the vault at any time.

![image](https://docs.yearn.fi/assets/images/auto-comp-withdraw-e499db645d0870b6a146e5c99f7619ab.png)

The total amount of yvyPRISMA vault tokens you have in your wallet will appear below the withdraw field. To withdraw your full balance, simply click the max button which will auto-fill the amount. Then click "Withdraw" to receive yPRISMA tokens back to your wallet.

## Prisma Vaults

At the bottom of the Earn page, you'll find a list of Yearn's Prisma-based auto-compounding vaults.

![image](https://docs.yearn.fi/assets/images/vaults-list-6c7bc555b9e915d7a803c435e2dcbaa0.png)

Clicking on a vault will open up the vault detail page in a new tab. Here you can make deposits and withdrawals, as well as finding more data on the vault and strategies themselves.

![image](https://docs.yearn.fi/assets/images/vault-factory-32172bd1c03b08c314a3e7580a7780d2.png)

info

You can find more information on Yearn's vaults here (https://docs.yearn.fi/getting-started/products/yvaults/overview).


yPRISMA FAQ

yPRISMA FAQ

Where can I buy yPRISMA?

What is yvmkUSD-A?

# yPRISMA FAQ

### Where can I buy yPRISMA?

yPRISMA can be purchased through the following platforms:

- If you already have PRISMA tokens, you can ZAP directly into yPRISMA using Yearn's yPRISMA zapper contract here (https://yprisma.yearn.fi/app/get)

- Curve Finance (https://curve.finance/#/ethereum/swap?from=0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee&to=0xe3668873d944e4a949da05fc8bde419eff543882) - The primary liquidity source for yPRISMA

- CowSwap (https://swap.cow.fi/#/1/swap/ETH/YPRISMA) - DEX aggregators like CowSwap should also work well

### Should I stake my yPRISMA directly or auto-compound it in the vault?

That's totally up to you and depends on your personal situation and preferences. Here are a few things to consider:

- Max Boost:

- Direct stakers will need to wait four weeks before their yPRISMA is max boosted and earning the maximum staking APR displayed.

- Vault depositors join a single shared boost position, but this is unlikely to reach the maximum and will adjust up and down as other users deposit and withdraw.

- Rewards:

- Direct stakers receive their yield in stablecoins, making them less exposed to the price fluctuations of the underlying governance token and the yPRISMA peg.

- Vault depositors are "all in" on yPRISMA.

- Gas Fees:

- Direct stakers must manually claim their mkUSD stablecoin rewards. Although earned rewards automatically accumulate and earn interest, this requires at least one additional transaction and can be expensive, depending on gas pricing and network congestion.

- Vault depositors have their mkUSD stablecoin rewards claimed, swapped and reinvested into the yv-yPRISMA vault each week. And Yearn covers the gas.

- Composability:

- Direct stakers do not receive a receipt token in their wallet.

- Vault depositors receive back a yv-yPRISMA token into their wallet which has the potential to be accepted as collateral across DeFi.

### Can yPRISMA users vote with their yPRISMA?

No. User voting is not part of the yLockers system, instead...

- Gauge voting is automated to optimize for the maximum weekly vote incentive yield.

- Governance voting is handled by a team of core contributors on behalf of veYFI holders.

### Why is the yPRISMA peg currently below 1:1?

It is normal for a yToken such as yPRISMA (or any liquid locker token) to trade at a discount to the governance token it is built upon. The strength of the peg is dependent on the supply and demand of each yToken.

Each yLocker has been designed to create an attractive yToken that offers value to users and provides incentives to attract liquidity. However, we cannot control the market price of our yTokens.

### What is yvmkUSD-A?

yvmkUSD-A is a Yearn V3 vault that allows yield to auto-compound. Currently, there is no active strategy for compounding, but a strategy is nearly completed and will undergo reviews soon.

### What are the fees associated with yPRISMA?

When you stake yPRISMA, a 10% performance fee is applied. Yield accumulates in the receiver contract throughout the week. The yield is distributed once per week, at which point 10% is sent to the Yearn treasury.

### Where does the yield come from and how does it flow?

The yield for yPRISMA stakers comes from two main sources:

- Protocol Fees: Fees generated from the Prisma protocol

- Vote incentives: Incentives provided for voting power

All these yields are claimed to the yPRISMA fee receiver at 0x76DF88Aa8711822472Cb40Ed8c972A461A20ecdc

At the beginning of each week, the collected yield is converted to mkUSD (Prisma Stablecoin), deposited into the yvmkUSD-A vault, and then distributed to stakers. This process occurs once per week, and the yield is claimable at the start of the following week.

## Converting native Prisma farming rewards to yPRISMA

If you use Prisma Finance directly, the Rewards are paid in locked vePRISMA. You can accept these rewards as vePRISMA or as yPRISMA.

### Why would I claim my Prisma protocol emissions as yPRISMA?

There are several key reasons to claim your emissions as yPRISMA instead of locking yourself.

- When minting yPRISMA, you get to utilize Yearn's boost, which is among the highest of total Prisma accounts.

- yPRISMA is minted 1:1 against your max locked claim amount.

- yPRISMA is fully transferrable and can be swaped on DEXes like Curve, or staked for benefits in the ecosystem.

### How can I claim my Prisma protocol emissions as yPRISMA?

-

Browse to https://app.prismafinance.com/rewards

-

Select "Lock All"

![Liquid Lockers](https://i.imgur.com/FKpkwcG.png)

-

In the modal, choose "Liquid Lockers"

![Liquid Lockers](https://i.imgur.com/tVEGdkI.png)

-

Tick the checkbox for Yearn's `yprisma.eth` delegator and press "Confirm".

![Liquid Lockers](https://i.imgur.com/NVvfVUG.png)

When the transaction is complete, congratulations! You now have yPRISMA tokens in your wallet!


yPRISMA Contract Addresses

yPRISMA Contract Addresses

Core Protocol

Expired Farms and Contracts

# yPRISMA Contract Addresses

A list of deployed yPrisma contracts.

## Core Protocol

NameAddressYearnBoostedStaker0xF4C6e0E006F164535508787873d86b84fe901975 (https://etherscan.io/address/0xF4C6e0E006F164535508787873d86b84fe901975)Rewards Distributor0xc480b481dD194EAc469EC9c4484D23d54B868EDD (https://etherscan.io/address/0xc480b481dD194EAc469EC9c4484D23d54B868EDD)yPRISMA Fee Receiver0x76DF88Aa8711822472Cb40Ed8c972A461A20ecdc (https://etherscan.io/address/0x76DF88Aa8711822472Cb40Ed8c972A461A20ecdc)Boosted Staker Utilities0xf04037D102b64E365eF6Eb81937bDf59B31fE5B8 (https://etherscan.io/address/0xf04037D102b64E365eF6Eb81937bDf59B31fE5B8)PRISMA0xdA47862a83dac0c112BA89c6abC2159b95afd71C (https://etherscan.io/address/0xdA47862a83dac0c112BA89c6abC2159b95afd71C)yPRISMA0xe3668873d944e4a949da05fc8bde419eff543882 (https://etherscan.io/address/0xe3668873d944e4a949da05fc8bde419eff543882)yvyPRISMA Vault/Token0x10537D7bD661C9c34F547b38EC662D6FD482Ae95 (https://etherscan.io/address/0x10537D7bD661C9c34F547b38EC662D6FD482Ae95)yvmkUSD-A Vault/Token0x04AeBe2e4301CdF5E9c57B01eBdfe4Ac4B48DD13 (https://etherscan.io/address/0x04AeBe2e4301CdF5E9c57B01eBdfe4Ac4B48DD13)

## Expired Farms and Contracts

NameAddress*legacy yPRISMA0xfd37356c1a62288b32Fa58188c77Ab0D694a0f4E (https://etherscan.io/address/0xfd37356c1a62288b32Fa58188c77Ab0D694a0f4E)*yPRISMA Staking (yvmkUSD-A rewards)0xE3EE395C9067dD15C492Ca950B101a7d6c85b5Fc (https://etherscan.io/address/0xE3EE395C9067dD15C492Ca950B101a7d6c85b5Fc)*yPRISMA Staking (wstETH rewards)0x774a55C3Eeb79929fD445Ae97191228Ab39c4d0f (https://etherscan.io/address/0x774a55C3Eeb79929fD445Ae97191228Ab39c4d0f)*yPRISMA Staking (dYFI rewards)0x93283184650f4d3B4253ABd00978176732118428 (https://etherscan.io/address/0x93283184650f4d3B4253ABd00978176732118428)*yPRISMA LP Staking (yPRISMA rewards)0x6806D62AAdF2Ee97cd4BCE46BF5fCD89766EF246 (https://etherscan.io/address/0x6806D62AAdF2Ee97cd4BCE46BF5fCD89766EF246)*yCRV Staking (yPRISMA rewards)0x84c94d739e075b3C7431bdb1A005F0412DF828a5 (https://etherscan.io/address/0x84c94d739e075b3C7431bdb1A005F0412DF828a5)*expired
yPRISMA Docs (https://docs.yearn.fi/developers/deprecated-products/yPrisma/overview)


yPRISMA Overview

yPRISMA Overview

What is yPRISMA?

Earn Yield on yPRISMA

Links

Read More

# yPRISMA Overview

![image](https://docs.yearn.fi/assets/images/yprisma-banner-484f7ffae75ad1345f334b8a7d1b62ff.png)

Claim and deposit at yprisma.yearn.fi (https://yprisma.yearn.fi)

## What is yPRISMA?

yPRISMA is Yearn's latest liquid locker, built for Prisma Finance's governance token (PRISMA). Let's review the basics of liquid locker tokens like yPRISMA:

- They represent 1 vePRISMA max-locked to Yearn

- They are not redeemable for the underlying locked PRISMA

- They have no transfer restrictions and thus can always be swapped in DEX pools

Governance for Prisma is controlled by vePRISMA, a locked token position that grants users voting power, fee revenue, and boosted PRISMA emissions.

Because all PRISMA emissions come as locked vePRISMA, it is often inconvenient for users who want to avoid managing their position or want to cash out. yPRISMA aims to offer users a tokenized version of this position, giving them instant liquidity and auto-managing governance participation to maximize yield.

## Earn Yield on yPRISMA

Yearn has 2 ways to earn yield on your yPRISMA; depositing to the `YearnBoostedStaker` contract to earn mkUSD or depositing to the yPRISMA Auto-Compounder V3 vault to earn more yPRISMA. The intricacies and details are documented here (https://docs.yearn.fi/getting-started/products/ylockers/overview#earning-yield-with-ylockers). Once you know which path you want to take, you can follow the step by step guide here (https://docs.yearn.fi/developers/deprecated-products/yPrisma/yprisma-guide).

More questions Anon? Head over to the FAQ (https://docs.yearn.fi/developers/deprecated-products/yPrisma/yprisma-faq).

## Links

Contract Addresses (https://docs.yearn.fi/developers/deprecated-products/yPrisma/yprisma-contracts)
yPRISMA UI (https://yprisma.yearn.fi/)
UI Source Code (https://github.com/yearn/ylockers-ui)
Yearn Boosted Staker Source Code (https://github.com/yearn/yearn-boosted-staker)
PRISMA.lol - Liquid Lockers Tracker (https://www.prisma.lol/)
yLockers Discord Channel (https://discord.com/channels/734804446353031319/1186417376275730552)

## Read More

Upcoming yPRISMA YBS Staking Launch: All You Need to Know (https://blog.yearn.fi/ybs-yprisma-launch)
yPRISMA Roadmap (https://medium.com/iearn/yprisma-roadmap-8fb3e2376594)
Introduction to Yearn PRISMA Incentives Farming and FAQ (https://docs.yearn.fi/developers/deprecated-products/yPrisma/yprisma-faq)


yTrade

yTrade

yTrade

# yTrade

## yTrade

yTrade (https://ytrade.finance/) is a leveraged stablecoin exchange. It enables users to borrow stablecoins with up to 1000x leverage. Four stablecoins (DAI, USDC, USDT, BUSD) are currently enabled as collateral. Users deposit one of the four stablecoins identified above and receive another stablecoin on margin. Leverage tiers are: 75x, 100x, and 1000x.

This is a unique product in the market and it enables users to conduct arbitrage trades whenever certain stablecoins are not pegged exactly to 1.Forexample:DAIisintendedtobepeggedat1. For example: DAI is intended to be pegged at 1.Forexample:DAIisintendedtobepeggedat1, however, occasionally in the past it has traded at 1.05.Ausercandepositastablecoinascollateralandborrowupto1000xofhisorhercollateral,receiveDAI,sellitfor1.05. A user can deposit a stablecoin as collateral and borrow up to 1000x of his or her collateral, receive DAI, sell it for 1.05.Ausercandepositastablecoinascollateralandborrowupto1000xofhisorhercollateral,receiveDAI,sellitfor1.05 each, use the proceeds to buy back the amount of DAI they borrowed and profit the difference.

This has significant implications in the broader DeFi space as stablecoins are frequently off their pegs, but some traders don’t possess sufficient capital to conduct profitable arbitrage trades.


yGift

yGift

How to send a yGift

How to Tip a yGift

Collecting your yGift funds

Contribute!

# yGift

Brighten someone's day by sending a virtual gift. yGift is an NFT (Non-Fungible Token) that can be used to reward someone for their work, or to simply share some love.

## How to send a yGift

Anyone can create and send a yGift. It is possible to add an image or mp4 video, a nice message and even a monetary reward:

- Access yGift (https://ygift.to/) website and click on "create gift"

- Add an image or mp4 video that means something to you both, then upload it to IPFS

![""](https://i.imgur.com/DtrbCtH.png)

- Add a receiver ETH or ENS addresses. Make sure it is the correct Ethereum wallet address, or the yGift will be lost

- In case you want to add funds to your yGift, choose the token and amount. Adding funds is optional

- Choose a name and write a nice message for your yGift

- Locking period: Optionally set a period of days to lock tokens added to the yGift when you create it. You may send the yGift immediately and although it will be available to the recipient, the tokens will be locked until this period ends

- Vesting period: Optionally set a period of days for the tokens to vest. If a locking period has been set, tokens will start vesting immediately after unlocking. Tokens will vest linearly until all become available after this period of days expires.

![""](https://i.imgur.com/F9iUgTm.png)

## How to Tip a yGift

After a yGift has been sent, people can add more funds to it by tipping it! Are you feeling generous? Tip contributors gift and share some love!

- Access the page of the yGift you want to tip;

- Click on "tip". Set amount and write a nice message

![""](https://i.imgur.com/7crWB2h.png)

You can only tip a yGift on the previously chosen token. If the yGift was minted with yUSD being the token (even if initial amount was set to 0), then the tips have to be in yUSD.

Tips are always immediately available and not subject to locking or vesting.

## Collecting your yGift funds

Received a yGift? Congratulations! If the gift contains a non-zero "Gift Amount" you can collect your unlocked funds. Just click on "Collect" on the top right corner of your gift.

![""](https://i.imgur.com/ok83Onu.png)

## Contribute!

yGift is a Yearn project built by the community, for the community! Want to be part of it? Check out yGift GitHub (https://github.com/yearn/ygift) and share your ideas!


yEarn

yEarn

Resources

# yEarn

Earn is a lending aggregator that strives to attain the highest yield for supported coins (DAI, USDC, USDT, TUSD, sUSD, or wBTC) at all times. It does this by programmatically shifting these coins between several lending protocols (AAVE (https://aave.com), dYdX (https://dydx.exchange/), and Compound (https://compound.finance)) operating on the Ethereum blockchain.

For example, a user can deposit DAI into the Earn yDAI pool. Yearn will programmatically deposit DAI into one of three lending protocols (AAVE, dYdX, Compound). Yearn will withdraw from one protocol and deposit to another automatically as interest rates change between protocols. As a result, the user will receive the optimal interest rate on his or her DAI deposit at all times.

![""](https://i.imgur.com/jLlg0WU.png)

Earn is a key component of the yPool at Curve.Finance, which represents a basket of four yTokens: yDai, yUSDC, yUSDT, and yTUSD. The underlying four yTokens are constantly optimizing to yield the highest available interest in the market (described above), while also serving as a liquidity pool for these tokens. Users can interact with this pool to swap between any of the four tokens with little slippage. Therefore, liquidity providers of the yPool receive the optimized interest rates on their stablecoin deposits and trading fees from users swapping tokens from the pool.

As of September 2020, the YTD annualized return for yPool liquidity providers is estimated to be 9.11%. Since yDAI+yUSD+yUSDT+yTUSD is a continuously accruing interest-bearing token, its price is above $1 and is constantly increasing.

![""](https://i.imgur.com/U4KcWyE.png)

## Resources

- Earn Homepage (https://v1.yearn.fi/earn)


yBribe

yBribe

Why yBribe

# yBribe

yBribe (https://ybribe.com) is a platform where vote-escrowed Curve (veCRV) holders can receive compensation from buyers interested in increasing CRV emissions to their Curve pool’s gauge.

In DeFi, incentives for voting are commonly referred to as ‘bribes’. yBribe enables veCRV holders — be they protocols, DAOs, or individual users, to extract the value of their voting power.

![""](https://i.imgur.com/WedS2iP.png)

yBribe pairs users looking to buy votes, with those looking to sell them.

Curve conducts weekly gauge votes that determine the allocation of CRV rewards to various pools. By buying votes, DAOs, protocols, and users can influence the direction of these rewards while boosting yields in pools beneficial to them. To do this, use the ‘Offer Bribe’ function on yBribe. Once the bribe is posted, voters will see the pending APR for that gauge increase.

veCRV holders can sell their gauge votes to the highest bidder each week by voting on the bribed gauge with the highest APR.

## Why yBribe

#### yBribe is fully trustless, permissionless and non-custodial

- A new UI makes it easy for veCRV holders to identify the best opportunities.

- Convex votes are excluded from the system to make bribes more efficient.

- Fully trustless design and 100% on-chain design.

- The codebase is fully audited.


Woofy

Woofy

How to Woof and Unwoof

Converting YFI to WOOFY

Converting WOOFY to YFI

# Woofy

The WOOFY token is the blue dog companion token of YFI. Utilizing special Woof technology, it allows two-way conversion between the two tokens, allowing holders to be exposed to YFI in a fluffier package.

At its core, WOOFY solves two problems: YFI not being dog themed, and the price of a single YFI being too high in USD terms.

1 YFI = 1,000,000 WOOFY. YFI and WOOFY can always be exchanged with one another at that fixed rate using either the WOOFY Ethereum contract (https://etherscan.io/address/0xd0660cd418a64a1d44e9214ad8e459324d8157f1#code), or the Woofy website (https://woofy.finance/).

## How to Woof and Unwoof

![""](https://i.imgur.com/HqfCYZX.png)

WOOFY (https://etherscan.io/address/0xd0660cd418a64a1d44e9214ad8e459324d8157f1) can be created ("woofed") by depositing YFI on the Woofy website (https://woofy.finance/). It can also be redeemed ("unwoofed") for the equivalent amount of YFI at any time.

#### Converting YFI to WOOFY

- Step 1: Visit https://woofy.finance

- Step 2: Select 'Woof' above the swap interface

- Step 3: Enter the amount of YFI you would like to convert

- Step 4: Approve the YFI

- Step 5: Click 'Woof' below the swap interface

#### Converting WOOFY to YFI

- Step 1: Visit https://woofy.finance

- Step 2: Select 'Unwoof' above the swap interface

- Step 3: Enter the amount of WOOFY you would like to convert

- Step 4: Click 'Unwoof' below the swap interface

If it's your first time holding either token after the exchange, make sure to click 'Add Token' above the token's logo so that it will appear in your wallet.


veCRV Boosts

veCRV Boosts

Curve Finance Synergy

veCRV Boosts

Backscratcher yVaults

Auto-compounding yield

Leverage

Partnerships

# veCRV Boosts

This page is outdated since yveCRV was deprecated in favour of yCRV. Check the new yCRV page (https://docs.yearn.fi/getting-started/products/ylockers/ycrv/overview).

Almost everything that yVaults interact with is available to the public. So how is Yearn able to offer users better yield than they'd be able to achieve on their own?

![""](https://i.imgur.com/6lmhESr.png)

## Curve Finance Synergy

Many of Yearn's strategies utilize Curve Finance's liquidity mining program. Curve Finance (https://curve.finance/) has a 300 year token distribution program for those who provide liquidity for their low slippage decentralized exchange.

### veCRV Boosts

CRV is distributed continuously to users who stake certain liquidity provider tokens in Curve's gauge (https://resources.curve.finance/base-features/understanding-gauges). Those CRV rewards can be increased when the user locks up their CRV in the Locker (https://dao.curve.finance/locker). This locker gives the staker veCRV in return, which bears the right to vote in governance and to claim a portion of the protocol's fees.

Locking CRV allows users to boost the CRV rewards they are receiving when providing liquidity in eligible pools. The amount of the boost is determined by how much CRV was locked and their relative stake in the pool.

![""](https://i.imgur.com/QaMMdr7.png)

Using the Backscratcher yVault, Yearn locks up a significant amount of CRV indefinitely, and distributes the boosts to various yVaults.

### Backscratcher yVaults

The Backscratcher yVault, yvBOOST and pSLPyvBOOST-ETH, capitalizes on liquidity mining in a way that's beneficial to both Curve and Yearn.

Users deposit CRV into the yVault which is locked infinitely. In return they receive a token that represents a share of the Backscratcher pool. Revenue earned from Curve through Curve fee sharing is distributed in the Backscratcher pool and can be redeemed by depositors on a weekly basis.

Additionally, 10% of all CRV earned by Yearn Finance is deposited into Backscratcher and locked infinitely. Because of this, people who want to stake CRV will always receive a higher share of the Backscratcher yVault's revenue than staking directly through Curve. They also can earn emissions of tokens like SUSHI and PICKLE for providing liquidity.

Users will never be able to withdraw their original CRV, but because of the incentives on yveCRV liquidity and the value that the token accrues from various sources of revenue, they will be able to swap it for another asset for some price.

In return, control over the locked CRV's boosts is given to Yearn, and utilized throughout various yVaults.

## Auto-compounding yield

Compounding yield requires transaction fees to be paid to the Ethereum blockchain. This can be expensive and cut into returns.

Because yVaults batch your transaction with many other depositors, it is cumulatively lower cost and higher return to earn yield using the vaults. Currently, gas costs are covered by the Keep3r network, meaning that users are compounding returns while bearing no cost.

## Leverage

Yearn utilizes the Iron Bank (C.R.E.A.M. Finance) (https://docs.ib.xyz/) to access credit that is used to enhance yVault yields. Only white-listed addresses have this feature available to them, meaning that typically, individuals are not able to do this on their own.

![""](https://i.imgur.com/WJIjOKv.png)

Some strategies also implement flash loans, which is typically a backend service that requires development experience to take advantage of.

## Partnerships

The Backscratcher yVault is only possible due to synergistic relationships with protocols like Curve, SushiSwap and Pickle Finance. Our relationships across DeFi allow yVault depositors benefits that they cannot get elsewhere.

Yearn actively collaborates on development with protocols like the ones mentioned to create new opportunities for yield and further DeFi as an industry.


StableCredit

StableCredit

Mechanics

Summary

# StableCredit

StableCredit combines three pillars of existing DeFi infrastructure:

- Minting synthetic debt (DAI, Synthetix).

- Decentralized lending platform (Compound, AAVE).

- Automated Market Maker (AMM) functionality (Uniswap, Sushiswap).

## Mechanics

StableCredit will enable users to deposit assets as collateral and obtain a line of credit (denominated in StableCredit USD) based on the dollar value of the assets at deposit. For example, a user can deposit 100 LINK and will obtain 1,100worthofStableCreditUSD(atthetimeofwritingLINKis 1,100 worth of StableCredit USD (at the time of writing LINK is ~1,100worthofStableCreditUSD(atthetimeofwritingLINKis 11). StableCredit USD can then be traded for other assets available in the protocol.
Exchange rates between StableCredit USD and assets in the protocol are determined by price feeds from oracles (Chainlink), and current utilization ratios of assets within the platform. For example, if liquidity providers have lent 100 DAI to the pool and 90 DAI is borrowed, the utilization ratio is 90%. Similar to how bonding curves work, there will then be a significant premium for any additional DAI borrowing (the cost to borrow DAI will be > $1). Users will be able to borrow up to 75% of the value of their collateral (i.e., utilization ratio of 75%).
The AMM will also support single-sided liquidity exposure for liquidity providers (LPs). Current popular AMM models, such as Uniswap and Sushiswap, require LPs to deposit both assets in a liquidity pool. For example, in a ETH-USDC liquidity pool, the liquidity provider would be required to deposit ETH and USDC in a 50/50 ratio. This increases the barrier to entry for liquidity providers and also the capital requirements. Single-sided liquidity provisioning will enable LPs to deposit only one of the assets in the liquidity pool (i.e., either ETH or USDC). As a result, the barriers of entry to be a LP will be greatly reduced, and should contribute to an overall increase in capital efficiency.

## Summary

Users can:

Deposit collateral and obtain a line of credit (StableCredit USD).
Borrow other assets with this line of credit (similar to Aave or Compound).
Trade the asset borrowed for another asset in the pool (existing AMM functionality).

## Additional Learning Resources & Background

Initial Medium Post introducing StableCredit

- Animation illustrating the mechanics of StableCredit (https://twitter.com/finematics/status/1305188626008100865)

- Bankless video about StableCredit, featuring Andre Cronje (https://www.youtube.com/watch?v=SkTuMVBLBNQ)

- CODEUP 38 video about StableCredit, featuring Andre Cronje (https://www.youtube.com/watch?v=bdC3rNDChbw&feature=youtu.be&t=2002)


yPools Roles and Modes

yPools Roles and Modes

Management Role

Guardian Role

Pause mode

Killed mode

# yPools Roles and Modes

## Management Role

Trusted addresses with privileged access for limited operations. Should eventually be replaced by a smart contract:

- Can start a gradual weight change, as long as no weight change is active yet.

- Can whitelist a new asset, which sets an initial weight, sets the rate provider, and requires an initial deposit. New assets can only be whitelisted if no weight change has been scheduled yet.

- Can update the rate provider for every whitelisted asset.

- Can approve rate increases above 10%.

- Can update the staking contract.

- Can set the pool swap fee.

- Can set the tolerance range.

- Can set the new management address.

- Can set the new guardian addresses.

- Can trigger `pause mode`.

- Can trigger `killed mode`.

## Guardian Role

Trusted addresses with emergency privileges:

- Can trigger pause mode.

### Pause mode

This mode is to be activated in the event of extreme market conditions or detected suspicious behavior, either in the protocol itself or in the underlying LST tokens that back it.

- No user may swap assets with the contract.

- No user may deposit assets into the contract.

- Users may only withdraw assets in a balanced manner, single-sided withdrawals are not allowed.

- Weights, rates, and rate providers cannot be updated during this mode.

- Management or guardian can undo pause mode to resume normal operation.

### Killed mode

This mode is to be activated in the event of critical failures, whether in the protocol itself or in any of the underlying LST tokens that back it. This can also be used to migrate to a new version of the yETH protocol.

- No user may deposit assets into the contract.

- Users may only withdraw assets in a balanced manner.

- The reward controller may not update the beacon chain amounts.

- Pause mode may not be undone.

There is no way to undo `killed mode`.


yPools

yPools

Governance at a Glance

Live Governance Info

Definitions

Overview

Staked yTokens

st-yToken User Vote Weight

Pool Weights For Each LST

Single-Sided Deposits and Withdrawals

Single-Sided Deposits

Single-Sided Withdrawals

Protocol Specs

# yPools

![image](https://docs.yearn.fi/assets/images/ypools-banner3-bc72c42e29f88ea458d5dd7f2be25c14.png)

yPools are user-governed baskets of similar assets, typically liquid staking tokens(LSTs). They serve as both a re-balancing index and liquidity pool (AMM) of the underlying tokens. This AMM model, combined with governance and incentive mechanisms, aims to provide an optimal risk-adjusted yield by dynamically adjusting the weights of the LST tokens in the pool.

Users can stake their yPool tokens to mint st-yTokens, accrue yield, and later unstake st-yTokens to receive yPool tokens back according to their earnings. Only stakers receive yield and slashings from the underlying yield sources and earn incentives if they participate and vote in their respective yPool's governance process.

## Governance at a Glance

yPools are governed by their depositors, who stake their yPool tokens for governance power. Once staked, yPool token holders can set pool parameters, weights as well as vote on whitelisted pool assets. The governance process follows a 4 week cadence of epochs where the first 3 weeks are reserved for proposals for new LSTs to be added to the pool and a final week where proposals and pool weights are voted on.

![Yearn Logo](https://docs.yearn.fi/img/logo.svg)

##### Live Governance Info

Fetching contract data...

## Definitions

- yToken: A token received when depositing an LST into its corresponding yPool. (e.g. yETH)

- st-yToken: A token received when staking a yToken. (e.g. st-yETH)

## Overview

yPools are user-governed liquidity pool tokens consisting of various like-kind Liquid Staking Derivatives (LSTs).

The yPools protocol is an Automated Market Maker (AMM) for LSTs. Each LST in the pool is priced according to the amount of underlying assets it represents. This lets users deposit their LSTs into the pool and receive yPool tokens pegged 1:1 with the underlying. Users can also stake their yPool tokens to mint st-yTokens, accrue yield, and participate in their respective yToken governance.

This AMM model, combined with the governance and incentive mechanisms of the yPools protocol, aims to provide an optimal risk-adjusted yield for LST staking by dynamically adjusting the weights of the LSTs in the pool. It also offers users flexibility with single-sided deposits and withdrawals, and maintains the pool's balance and diversification through a weight management system.

Each yPool is governed by its users who can vote to adjust the weights of the LSTs in the pool, helping to maximize yield and mitigate risks associated with individual LSTs.

All yields generated by a yPool go to the Staked yPool token holders, making yTokens an ideal token for Liquidity Providing in stableswap pools like those on Curve. To acquire a yToken, users can mint it by depositing LSTs or swap against the Curve pool.

## Staked yTokens

Users stake their yTokens to mint staked versions (st-yToken), accrue yield, and can later unstake to receive the yToken back according to their earnings. Stakers receive all yield and slashings from the underlying yield sources and earn incentives if they participate and vote in their respective yPool governance.

By bundling LSTs, yPools aims to generate the best risk-adjusted yield from LSTs. Through protocol governance, st-yToken users can readjust pool weights to maximize yield while mitigating catastrophic scenarios where one or several LSTs in the composition suffer adverse events like de-pegging or security incidents.

### st-yToken User Vote Weight

Each user has an internal vote weight that increases asymptotically to the user's share count. After `t` seconds, their vote weight is `s * t / (t + t_half)` where `s` is the number of shares and `t_half` is the voting half-time. The voting half-time variable determines the time it takes until half the voting weight is reached for a staker.

The user's external vote weight equals the internal vote weight at the end of the previous week.

For yETH, you can find the current voting half-time on Etherscan (https://etherscan.io/address/0x583019fF0f430721aDa9cfb4fac8F06cA104d0B4#readContract#F20) in seconds. Thus the wait to get to half of your st-yETH voting power is 60 days.

## Pool Weights For Each LST

Each Liquid Staking Derivative (LST) has an assigned weight representing its proportion in the pool. The weight management system ensures that the pool remains diversified and balanced. As an LST performs well or gains popularity, its weight in the pool may increase, attracting more liquidity and providing better returns. Conversely, if an LST underperforms or faces issues, its weight may decrease, reducing its impact on the overall pool performance. This dynamic adjustment helps maintain an optimal risk-adjusted yield for yPool users.

For each epoch, users can vote to adjust the weights of the LSTs in the pool. The voting process also involves a "do nothing" option, allowing the current weight distribution to remain unchanged. If a new LST is added during the voting process, it starts at 0% weight and gradually increases to 1% in the first epoch. In the subsequent epoch, they participate like all other LSTs.

Example

Suppose we have four LSTs: A, B, C, and D with weights 10%, 20%, 30%, and 40% respectively in epoch n. For the next epoch (n+1), C has incentives worth $100.

The voting outcome for epoch n+1 is:

- Do nothing: 30%

- A: 7%

- B: 10%

- C: 43%

- D: 10%

Here's how the voting outcome affects the weights:

- The "do nothing" vote is distributed to the current weight, reducing the total redistribution to 7%.

- The incentives for voting are distributed only to those who explicitly voted for a particular LST, making the incentive system more effective.

- If a new LST, say E, is added during the voting process, they start at 0% weight and do not fight for the 7% redistribution. They are gradually increased to 1% in the first epoch. In the next epoch, they participate like all other LSTs.

## Single-Sided Deposits and Withdrawals

Single-sided deposits and withdrawals allow users to add or remove a specific asset from the pool. This differs from balanced operations where users deposit or withdraw a proportionate amount of all assets in the pool. Single-sided operations can be more convenient but may also incur bonuses or penalties.

### Single-Sided Deposits

When a user makes a single-sided deposit, they add a specific amount of one asset to the pool. The system calculates the equivalent amount of yPool tokens to mint based on the current rate of the deposited asset.

However, single-sided deposits can distort the balance of assets in the pool. The system applies a deposit penalty if the deposited asset's weight increases above its target weight due to the deposit. This penalty reduces the amount of yPool tokens minted for the depositor, making the deposit operation more expensive. The penalty serves as an incentive for users to maintain the balance of assets in the pool.

Conversely, the system applies a deposit bonus if the deposited asset's weight is below its target weight. This bonus increases the yPool tokens minted for the depositor, making the deposit operation cheaper. The bonus serves as an incentive for users to restore the balance of assets in the pool.

### Single-Sided Withdrawals

Users who make a single-sided withdrawal burn a specific amount of yPool tokens to withdraw one asset from the pool. The system calculates the amount of the asset to send based on the current rate.

Like single-sided deposits, single-sided withdrawals can also distort the balance of assets in the pool. If the withdrawn asset's weight decreases below its target weight due to the withdrawal, the system applies a withdrawal penalty. This penalty reduces the amount of the asset sent to the withdrawer, making the withdrawal operation more expensive.

Conversely, the system applies a withdrawal bonus if the withdrawn asset's weight exceeds its target weight. This bonus increases the amount of the asset sent to the withdrawer, effectively making the withdrawal operation cheaper.

Example

Let's consider a pool with two assets, A and B, with a target weight of 50%. Due to market fluctuations, the current weights are 60% for A and 40% for B.

- If a user deposits asset A, they will incur a deposit penalty because the deposit increases the weight of A above its target weight. The system will mint fewer yPool tokens for the depositor than the rate would suggest.

- If a user deposits asset B, they will receive a deposit bonus because the deposit brings the weight of B closer to its target weight. The system will mint more yPool tokens for the depositor than the rate would suggest.

- If a user withdraws asset A, they will receive a withdrawal bonus because the withdrawal brings the weight of A closer to its target weight. The system will send more asset A to the withdrawer than the rate would suggest.

- If a user withdraws asset B, they will incur a withdrawal penalty because the withdrawal decreases the weight of B below its target weight. The system will send less asset B to the withdrawer than the rate would suggest.

For a deeper dive into the math behind the calculation of yPool weighted stable swap check this paper: https://github.com/yearn/yETH/blob/main/whitepaper/derivation.pdf

## Protocol Specs

- The yETH specification can be found in the source repo: https://github.com/yearn/yETH/blob/main/SPECIFICATION.md


yETH Overview

yETH Overview

# yETH Overview

yETH is a user-governed yPool consisting of various Ethereum Liquid Staking Derivatives (LSTs).

The yETH protocol is an Automated Market Maker (AMM) for LSTs. Each LST in the yETH pool is priced according to the amount of beacon chain (https://ethereum.org/en/upgrades/beacon-chain/) ETH it represents. This lets users deposit their LSTs into the pool and receive yETH tokens pegged 1:1 with beacon chain ETH. Users can also stake their yETH tokens to mint st-yETH, accrue yield, and participate in yETH governance.

This AMM model, combined with the governance and incentive mechanisms of the yETH protocol, aims to provide an optimal risk-adjusted yield for ETH staking by dynamically adjusting the weights of the LSTs in the pool. It also offers users flexibility with single-sided deposits and withdrawals, and maintains the pool's balance and diversification through a weight management system.

The yETH protocol is governed by its users who can vote to adjust the weights of the LSTs in the pool, helping to maximize yield and mitigate risks associated with individual LSTs.

All yields generated by yETH go to Staked yETH (st-yETH) holders, making yETH an ideal token for Liquidity Providing in stableswap pools like those on Curve. To acquire yETH, users can mint yETH by depositing LSTs or swap against the yETH/ETH Curve pool.

yETH follows the standard yPools (https://docs.yearn.fi/developers/deprecated-products/yPools/ypools-overview) specification for

- Staked Tokens (https://docs.yearn.fi/developers/deprecated-products/yPools/ypools-overview#staked-ytokens)

- Staked Token User Vote Weight (https://docs.yearn.fi/developers/deprecated-products/yPools/ypools-overview#st-ytoken-user-vote-weight)

- Pool Weights for each LST (https://docs.yearn.fi/developers/deprecated-products/yPools/ypools-overview#pool-weights-for-each-lst)

- Single Sided Deposits and Withdrawals (https://docs.yearn.fi/developers/deprecated-products/yPools/ypools-overview#single-sided-deposits-and-withdrawals)

Source Code Repo (https://github.com/yearn/yETH)
yETH Specification (https://github.com/yearn/yETH/blob/main/SPECIFICATION.md)
yETH dApp (https://yeth.yearn.fi)


Frequently Asked Questions

Frequently Asked Questions

How does yETH earn APY?

How is yield passed onto stakers?

Can I withdraw multiple LSDs?

# Frequently Asked Questions

### How does yETH earn APY?

yETH earns APY through various sources:

- Swap fee income from the Automated Market Maker (AMM)

- Incentives fee income, which are incentives for staker participation in governance

- Liquid Staking Derivative (LSD) income from staked ETH yield

- Buying LSTs at a discount

- Whitelisting fees

However, there are also deductions such as Beacon Chain slashings and a 10% Yearn performance fee on profits.

Please note that yield is paid out one week after it is generated. The yield generated in week n is streamed out in week n+1.

### What other benefits does yETH give holders?

yETH provides diversification by holding a basket of LSDs, which helps to spread the risk.

### How is yield passed onto stakers?

LSD Protocols generate yield and update their on-chain rates. This results in yETH being minted and sent to st-yETH.

### Can I withdraw multiple LSDs?

Yes, you can withdraw multiple LSDs or just one LSD. However, your withdrawal cannot cause an LSD to leave its safety bands around its target weight. For example, if a pool has a weight of 20% and a band of 5%, the actual weight is allowed to be between 15% and 25%. This caps losses to, at most, 25%, assuming a token permanently depegs and goes to 0. In that worst-case scenario, yETH depegs to 0.75 ETH, because you can always do a balanced withdrawal of all the assets, of which only 25% is worthless. Compare this to holding the depegged token yourself, where you would have a loss of 100%.

### Is there slippage with proportional withdrawal?

No, there is no slippage with proportional withdrawal.


Adding Assets to yETH

Adding Assets to yETH

Live yETH Governance Info

Step 1: Enable One-Off Inclusion Vote

Step 2: Apply for Inclusion

Step 3: Outcome

# Adding Assets to yETH

Prerequisites

You will need access to the necessary governance contracts and a sufficient voting weight of at least 100 to create proposals. You can check your voting weight here (https://etherscan.io/address/0x583019fF0f430721aDa9cfb4fac8F06cA104d0B4#readContract#F13).

![Yearn Logo](https://docs.yearn.fi/img/logo.svg)

##### Live yETH Governance Info

Fetching contract data...

## Step 1: Enable One-Off Inclusion Vote

Since the adoption of this proposal (https://snapshot.org/#/ylsd.eth/proposal/0x139698bed7752b80a16bb6d2fc0d9e8c82b622916ded2f064022be3c46ec9bb4), inclusion voting is off by default and needs to be enabled for the next epoch. Here is how you do that.

To enable a one-off inclusion vote, a governance call must be made to the `set_enable_epoch(next_epoch)` function on the InclusionVote contract (https://etherscan.io/address/0x6bc0878939669339e82dbFa13d260c89230f2c31#code). This requires crafting and getting a governance proposal approved. Follow the instructions below:

-

Create the text of your proposal and pin it to IPFS. The ipfs_hash should point to a document hosted on IPFS with details explaining the proposal and its rationale. You can host your own IPFS document or use a provider like Piñata (https://pinata.cloud/). For this, you should explain why you want to enable an inclusion vote, what assets you want to propose, etc.

-

Generate a script by calling the `script(_to, _data)` view function on the yPools Executor contract (https://etherscan.io/address/0x71258Ee726644f1D52d6A9F5E11C21d1E38c2bF1#readContract#F1). In this case, you want this script to call `set_enable_epoch()` on the InclusionVote contract with the value of the next epoch.

- Set the`_to(address)` field to the InclusionVote contract (https://docs.yearn.fi/developers/addresses/ypools-contracts#yeth-contract-address): `0x6bc0878939669339e82dbFa13d260c89230f2c31`.

- Then create the ABI-encoded data for the function `set_enable_epoch()` with the argument set to the next epoch. Below is a ABI encoding widget that you can use. It should be pre-populated with the correct contract and function, but you need to enter the next epoch into the "Function Argument" box. The current epoch should be listed at the top of this page in the `Live Governance Info` admonition. Just add 1 to that number. Then hit "Encode" and take the output from the widget and put it in the `_data(bytes)` field on etherscan.

- Click `query` and copy the result.

Encode

-

You can now create the proposal via the proposal page (https://yeth.yearn.fi/propose) or directly by calling the `propose(ipfs_hash, script)` function on the GenericGovernor contract (https://etherscan.io/address/0xB7a528CF6D36F736Fa678A629b98A427d43E5ba5). Enter the IPFS pin and the script value that you created in steps one and 2.

-

Once the proposal is created, the governance process will need to:

- Approve the proposal.

- Execute the set_enable_epoch(next_epoch) function to enable the inclusion vote for the next epoch.

## Step 2: Apply for Inclusion

To apply to have an LST included in yETH's basket of tokens, you will need to fill out the application form and pay a non-refundable application fee. Any token that has applied for inclusion and has a rate provider set by Yearn will be eligible for the inclusion vote that was enabled above.

## Step 3: Outcome

Once the vote is complete, the winner (if any) will be included into yETH.


yETH

yETH

# yETH

![image](https://docs.yearn.fi/assets/images/yeth-banner3-7b57caf92c3f227d3f1ff04b9b063547.png)

yETH is a user-governed liquidity pool token consisting of various Ethereum Liquid Staking Derivatives (LSTs).

The yETH protocol is an Automated Market Maker (AMM) for LSTs. Each LST in the yETH pool is priced according to the amount of beacon chain (https://ethereum.org/en/upgrades/beacon-chain/) ETH it represents. This lets users deposit their LSTs into the pool and receive yETH tokens pegged 1:1 with beacon chain ETH. Users can also stake their yETH tokens to mint st-yETH, accrue yield, and participate in yETH governance.

This AMM model, combined with the governance and incentive mechanisms of the yETH protocol, aims to provide an optimal risk-adjusted yield for ETH staking by dynamically adjusting the weights of the LSTs in the pool. It also offers users flexibility with single-sided deposits and withdrawals, and maintains the pool's balance and diversification through a weight management system.

The yETH protocol is governed by its users who can vote to adjust the weights of the LSTs in the pool, helping to maximize yield and mitigate risks associated with individual LSTs.

All yields generated by yETH go to Staked yETH (st-yETH) holders, making yETH an ideal token for Liquidity Providing in stableswap pools like those on Curve. To acquire yETH, users can mint yETH by depositing LSTs or swap against the yETH/ETH Curve pool.

Want to dive into the details? check out the Developer Docs:
yETH Developer Docs (https://docs.yearn.fi/developers/deprecated-products/yPools/yETH/yeth-overview)s

Frequently Asked Questions (https://docs.yearn.fi/developers/deprecated-products/yPools/yETH/yeth-faq)
GitHub Repo (https://github.com/yearn/yETH)


Delegated Funding DAO Vaults

Delegated Funding DAO Vaults

Resources

# Delegated Funding DAO Vaults

YFI holders can provide capital to DAOs approved to accept funding in the DAO vault ecosystem. DAOs wishing to receive funding are required to setup Gitcoin Grants (https://gitcoin.co/grants/) page and apply for funding via the Yearn governance forum (https://gov.yearn.fi/). If there is sufficient interest to approve the DAO for funding an off-chain vote will be conducted (https://vote.yearn.fi (https://yearn.snapshot.page/#/)). If voting is successful the DAO will be added to the DAO vault ecosystem.

Governance determines weekly, monthly, and yearly credit limits that the DAO can access via the DAO vault (https://yborrow.finance/). The DAO is free to repay the credit line on their own terms, and in tokens or other collateral options accepted in the yearn ecosystem. Any profits are shared between vault LPs.

### Resources

- Medium article: Delegated Funding DAO Vaults (https://medium.com/iearn/delegated-funding-dao-vaults-7ab05a63d7ba)