Overview
Yearn is a decentralized suite of products that help individuals, DAOs, and other protocols to earn yield on their assets. The primary goal of the protocol is to simplify the process of yield farming for users by leveraging smart contract automation.
Through Yearn’s various products, notably its vaults, users can deposit digital assets to earn yields without the need to manage the investments directly or understand the underlying protocols.
Yearn Finance’s protocol is maintained by a decentralized network of independent developers and is governed by holders of its native governance token, $YFI. The governance structure allows $YFI holders to vote on proposals that influence the protocol’s operations and future development.
Why the Project was Created
Formerly known as iEarn, Yearn Finance was launched in February 2020 by Andre Cronje.
The project was created to help users maximize their yield-earning potential in the rapidly evolving and complex DeFi space. By utilizing various strategies, protocols, and platforms, Yearn Finance seeks to actively deploy users’ assets to generate the highest possible returns.
Rather than users having to research, monitor, and manually execute multiple DeFi strategies themselves, Yearn Finance automates the process, providing users with a streamlined and user-friendly experience. This would make it possible to democratize access to yield opportunities as well as embrace a community-driven governance model, empowering token holders to actively participate in decision-making processes and shape the future direction of the project.
More recently, the launch of Yearn V3 is seen as a natural progression of the project, adhering to the foundational principles of DeFi. It emphasizes the project’s commitment to providing simple, permissionless, and transparent financial products.
Despite the challenges faced in the bear market and the scarcity of yield opportunities, Yearn has persisted in its development efforts. V3 represents an evolution in response to these market conditions, aiming to strengthen Yearn’s position in the DeFi space.
Value Proposition
Yield farming involves lending or staking cryptocurrencies in liquidity pools to earn rewards, such as interest or additional tokens. However, manually managing these strategies can be time-consuming and complex. Yearn Finance aims to address this challenge by providing users with an aggregated platform that automates the process of finding the most profitable yield farming opportunities.
Through its vaults, Yearn offers the highest-yielding strategies available in the most efficient and optimized way for all kinds of users.
Yearn Vaults – yVaults
The protocol works by utilizing automated strategies that implement a yield strategy. This is achieved with smart contracts called Yearn Vaults. Unlike traditional finance, where banks allocate deposited funds for loans and other profit-generating activities, Yearn Vaults operate transparently on public blockchains, giving users complete control and visibility over their assets. As a result, Yearn Vaults serve as crypto savings accounts, enabling users to deposit their assets and earn yields generated from various strategies.
Yearn Vaults automatically move user funds between different DeFi protocols to optimize yield farming returns. By continuously monitoring and reallocating user funds, Yearn Finance maximizes the potential returns on deposited assets, saving users both time and effort.
To offer users the most favorable risk-adjusted yields in DeFi, Yearn employs a robust risk assessment framework for each strategy implemented within a Vault. This framework evaluates strategies based on eight key factors: Audit, Code Review, Complexity, Longevity, Protocol Safety, Team Knowledge, Testing Score, and TVL Impact.
Notably, Yearn Vaults do not charge deposit or withdrawal fees, making it seamless for users to manage their assets. Most Vaults also have no management fees, but a modest performance fee is charged. Leveraging smart contracts, Yearn maximizes capital efficiency, allowing the majority of earned yields to be passed on to users.
Vaults display a Net APY (Annual Percentage Yield), which represents the average APY of the previous month’s harvest. The Net APY provides users with an indication of the expected yield from their deposited assets. Since harvests don’t occur on a set basis, yield is estimated based on historical data.
yVaults V2
yVaults v2, the updated version of Yearn Finance’s vaults, introduces several improvements to enhance capital management, control, and automation.
- Increased Strategy Flexibility: yVaults v2 allows for up to 20 strategies per vault, providing greater flexibility in managing capital across different market scenarios. Each strategy is assigned a capital cap, enabling efficient allocation of funds and preventing overexposure to strategies that may no longer offer significant APY (Annual Percentage Yield).
- Introduction of Strategist and Guardian Controllers: The new framework involves two key roles: the Strategist and the Guardian.
- The Strategist creates the strategy
- The Guardian oversees the strategy’s performance and has the authority to take actions to improve capital management or address critical situations.
- Automated Vault Housekeeping through Keep3r Network: In yVaults v2, certain functions such as harvest() and earn() are automated using the Keep3r Network. These function calls involve selling earned tokens to purchase new underlying collateral and transferring profits back to the vault and strategies. The Keep3r bots network handles these automated housekeeping tasks, relieving humans from the associated responsibilities. Keep3r token holders bear the gas costs in exchange for performing these actions.
- Removal of Withdrawal Fees: Unlike the v1 iteration, yVaults v2 eliminates the one-time withdrawal fee charged on the balance when withdrawing funds. This change enhances user experience and eliminates the additional cost incurred during the withdrawal process.
Vaults and Strategies
Once funds are deposited into a Vault contract, they are deployed to one or more strategy contracts. Next, Guardians and Strategists will monitor deposits to ensure optimal returns.
- The token you deposit in a yVault is the token you’ll receive yield, always automatically compounded into the yVault.
- A yVault may have many active strategies at the same time. A yVault may change its strategies capital allocation when it deems necessary.
- yVaults tokens implement the ERC20 standard, which means that they can be easily moved between wallets and markets and can be used by any app that communicates with this standard (like decentralized exchanges).
Anyone can build a Strategy, but in order to get it added to a yVault, the strategist needs to pass the strategy through the strategy vetting process which includes concept vetting, code review, security review, and Ethereum mainnet testing.
For their efforts, strategists are rewarded with a portion of the strategy’s performance fee.
- Up to 10% of the generated yield fees by a specific strategy (performance fee) can go to the strategist.
- Up to 10% of the generated yield fees by all strategies (performance fee) can go to the Yearn DAO treasury.
- Over the year, 2% of the vault’s total assets are taken as fees which go to Yearn to pay for expenses like gas, developer grants, and other services.
Once a strategy is harvested, the gains are distributed during 6 hours. This is to prevent sandwich attacks of an account depositing tokens right before the harvest and withdrawing right after and getting the profits without staying in the vault.
Strategy Specification
A Strategy Specification outlines the behavior and capabilities of a strategy employed by Yearn Finance. Defining the rules and operations provides a framework for the behavior and functionality of any given strategy.
- Keeper: A keeper is a bot responsible for maintaining the strategy’s operations. It ensures that the strategy generates returns for the connected Vault at predefined intervals or events.
- Normal Operation: The strategy operates within predefined triggers and guidelines to maintain stability and prevent instability in the Vault and other strategies.
- Interaction with the Vault: The strategy can interact with the connected Vault and access capital based on its borrowing limit. It utilizes the borrowed capital to generate returns for the Vault.
- External System Interactions: The strategy can interact with external systems necessary to convert borrowed capital into returns for the Vault. These interactions may include utilizing other protocols, executing trades, or performing other operations to generate profits.
- Triggers for Updates and Profit-taking: The strategy defines triggers that signal either Governance, the Strategist, or the Keeper to update or adjust its positions. It also sets triggers to take profits and report them to the Vault.
- Migration of Positions: Either Governance or the Vault has the authority to migrate the positions of the strategy to another strategy. This flexibility allows for strategic adjustments and optimizations.
- Emergency Exit Mode: In the event of an emergency, the strategy can be triggered to enter Emergency Exit Mode. During this mode, the strategy follows a predefined set of actions to unwind and divest funds back to the Vault as quickly and smoothly as possible, minimizing losses.
- Limitations in Emergency Exit Mode: While in Emergency Exit Mode, the strategy cannot take on new debt from the connected Vault. It can still interact with external systems but must be prepared to handle any failures or issues that may arise from those systems.
- Irreversibility of Emergency Exit Mode: Once the strategy enters Emergency Exit Mode, there is no condition that can revert it back to normal operation. This ensures that the strategy follows the predefined actions to unwind and protect the Vault, prioritizing stability and minimizing losses.
Vault Tokens
After a deposit into a Vault, users receive yVault tokens as a receipt of the deposit. These are ERC20 tokens that represent a user’s share of the yVault they are participating in. For example, if you deposit $YFI in a yVault you will receive yvYFI in return. yvYFI would be the yVault Token.
- If a user’s yVault generates profit, the share price of the yVault tokens will increase (because there are more underlying tokens in the yVault to redeem upon withdrawal).
- Once a user’s liquidity is withdrawn from the yVault, the corresponding yVault tokens are burnt.
Vault Factory
The Vault Factory is a feature that allows anyone to permissionlessly deploy an official Yearn Vault with a predetermined yield strategy.
The easiest way to get started is through the user interface at https://yearn.finance/vaults/factory.
The fee structure enforces 0% management fees and 10% performance fees.
Only one factory vault can be live for each token. As a result, the Vault Factory will only deploy a new yVault if there is no vault for that token already deployed (excluding “legacy” vaults, though factory versions of these must be deployed from one of Yearn’s multisigs).
The harvest process also differs between traditional and factory strategies:
- Traditional Strategies: When a harvest call is triggered, it combines debt rebalancing and conversion of the debt into realized profit in a single transaction. This process allows for simultaneous optimization and profit generation.
- This is because the token swap logic is directly embedded within the strategy itself.
- Factory Strategies: The swap transactions are executed separately from the harvest process to ensure they remain permissioned. This design choice aims to protect against Miner Extractable Value (MEV) attacks, which can exploit transaction order manipulation.
- This is because the token swap logic is separated from the main strategy.
Harvests in factory strategies still involve debt rebalancing between strategies and the allocation of idle funds to different strategies. Additionally, accumulated rewards are pulled into the strategy contract and handed over to the ySwaps team for swapping. This swapping process can take several days to complete. After the swaps are done, anyone can call the harvest function again to acknowledge the profit generated by the swap and distribute it to the vault, resulting in an increase in the pricePerShare.
Although permissionless harvests are enabled for factory strategies, Yearn Finance continues to utilize standard keeper automation to call harvests. Automated harvests are performed by the keep3r.network, even if no other user triggers them. The timing and frequency of automated harvests may be affected by network congestion and transaction viability. Delays between harvests can occur if network conditions are consistently unfavorable.
Curve LP Tokens
- StrategyCurveBoostedFactory uses Yearn’s veCRV balance to give users the maximum 2.5x boost on their $CRV rewards.
- StrategyConvexFactory supplies any additional Curve LP tokens (beyond which would receive the maximum 2.5x boost via the Curve strategy) to Convex Finance to earn $CRV rewards (boosted by Convex’s veCRV balance) and $CVX rewards.
- StrategyConvexFraxFactory will only be added to the vault if the Curve LP token of the vault can be staked in Convex for Frax (currently available for over 20 Curve LPs). When that happens, this ConvexFrax strategy will be used instead of the standard Convex strategy to earn additional $FXS rewards (on top of the standard $CRV and$CVX rewards).
Velodrome LP Tokens
This is a strategy on Optimism that collects $VELO emissions from gauge incentives. These emissions are then sold for the LP token, to further optimize the flow of auto-compounding.
How to Create a Factory Strategy
- Visit the factory UI at https://yearn.finance/vaults/factory and connect your wallet.
- Choose a token to create a vault for.
- Review the details and create the vault.
- The vault will be created after signing the transaction.
Alternatively, this process can also be done directly on the smart contract.
- Open the factory contract on Etherscan at 0x21b1FC8A52f179757bf555346130bF27c0C2A17A
- Call the canCreateVaultPermissionlessly() function to make sure that a vault does not already exist for the gauge you want to create.
- Can the createNewVaultsAndStrategies() function to create a new permissionless vault.
- The permissionless vault will be deployed and the rewards will be auto-compounded.
yCRV – $CRV locked in Yearn
yCRV is Yearn’s veCRV wrapper system, designed to tokenize Curve locked positions and offer different benefits that stem out of Yearn’s ecosystem.
Yearn’s yCRV system is composed of a base-token called yCRV as well as 2 derivative tokens called activated tokens.
Base Token
yCRV, the base token, carries no native rewards, but lets users easily enter into the other activated tokens that do.
New yCRV can be minted in two ways:
- Lock $CRV to Yearn’s veCRV position (permanent 1-way lock).
- Migrate from legacy tokens yveCRV and yvBOOST.
Both operations mint at a 1:1 exchange rate in a single step.
Activated Tokens
Yearn passes all benefits of its veCRV position on to yCRV users who hold one of its activated-tokens:
- st-yCRV (Staking Rewards): yVault that receives admin fees and bribes from locked CRV.
- lp-yCRV (Liquidity Pool Rewards): yVault for CRV/yCRV LP tokens, autocompounds emissions and fees.
st-yCRV
st-yCRV is meant to be a passive ‘set and forget’ yield-optimized position for yCRV users. This yield comes from two primary places:
- Admin Fees: Every week, veCRV holders earn weekly “admin fees” from Curve. Staked yCRV is where 100% of admin fees earned by Yearn’s veCRV position are sent and auto-compounded into more yCRV.
- Bribes: For all the yCRV within st-yCRV, 1 veCRV worth of vote power will be used to vote in favor of the Curve gauge which optimizes bribe revenue for st-yCRV users. Bribes (or misc. revenue) collected from these votes will be allocated as supplemental yield to st-yCRV users.
lp-yCRV
lp-yCRV provides liquidity to the CRV/yCRV pool on Curve. This allows lp-yCRV holders to earn the LP fees as well as Curve emissions.
When a user zaps into lp-yCRV, they are effectively entering a LP position in the CRV/yCRV pool and depositing the LP tokens into the Yearn lp-yCRV yVault.
This represents a passive yield strategy that deposits all $CRV emissions back into the pool in order to grow the position and compound rewards.
Additionally, Yearn marks 1veCRV as the equivalent voting power for every 1 yCRV to vote in favor of the yCRV Curve gauge – increasing $CRV emissions to users as a result.
User Walkthrough
As yCRV is the base token and carries no native yield or voting power, you’ll likely want to position yourself into one of the activated-tokens
- Connect your wallet to the yCRV interface.
There are multiple ways to zap from $CRV or $yCRV to any of the 2 types of reward tokens.
- Go to the yCRV interface and decide which token you want to zap to, which you can do from either $CRV or $yCRV.
- Choose the desired position.
yETH
yETH is a user-governed liquidity pool token consisting of various Ethereum Liquid Staking Tokens (LSTs). As a result, yETH represents a one-to-one conversion to staked $ETH.
yETH does not accrue any yield. Instead, all of the yield goes to Staked yETH (st-yETH) holders, which makes yETH a good token to LP 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.
Staked yETH – st-yETH
Users stake their yETH to mint st-yETH and accrue yield as a result. Next, the user can later unstake st-yETH to receive yETH back, according to their earnings.
Stakers receive all yield and slashings from the Ethereum Beacon chain (Ethereum proof-of-stake validators) and can earn incentives if they participate and vote in yETH governance.
By bundling multiple LSTs together, st-yETH aims to generate the best risk-adjusted yield from $ETH staking.
Through protocol governance, st-yETH users can readjust pool weights in order to maximize yield, while mitigating catastrophic scenarios where one or several LSTs in the yETH composition suffer adverse events like de-pegging or security incidents.
Pool weights for each LST
In yETH, the pool weights for each Liquid Staking Derivative (LST) are dynamically managed to ensure diversification and balance within the pool. The weight assigned to each LST represents its proportionate share in the pool.
The weight management system is designed to optimize risk and yield distribution. When an LST’s weight increases, it signifies that it occupies a larger portion of the pool. This weight adjustment occurs when an LST performs well or gains popularity. As more liquidity flows into the LST, its weight increases, attracting further participation and potentially providing better returns.
On the other hand, if an LST underperforms or faces issues, its weight may decrease. The decrease in weight reduces its impact on the overall pool performance. This adjustment mechanism allows the pool to mitigate risk and maintain an optimal risk-adjusted yield for yETH users. By reducing the influence of underperforming or problematic LSTs, the pool can allocate more weight to LSTs that demonstrate better performance.
This dynamic management of pool weights in yETH ensures that the pool remains diversified, adaptable, and responsive to the performance and demand of different LSTs. This approach aims to optimize the overall yield and risk profile of the yETH pool, enhancing the experience for users participating in liquid staking through Yearn Finance.
Yearn V3
Yearn V3 aims to create a significant upgrade to V2. The main objectives are to increase decentralization and simplify the process of creating strategies. To achieve that, the system is designed to be an un-opinionated and customizable infrastructure.
Ultimately, the goal is to create a fully decentralized protocol that provides secure and trusted infrastructure for on-chain capital allocation, making generating yield as safe and easy as possible.
- Vision and Goals: Yearn V3 aims to commoditize what Yearn Vaults already do, making management and strategy writing easy for anyone. It envisions an open marketplace of V3 Vaults and strategies that can be operated by third parties, individuals, or entities without Yearn’s direct involvement. This marketplace of strategies is expected to attract capital and allow for a wide range of risk profiles.
- Decentralization and Autonomy: Yearn V3 introduces the concept of V3 Vaults and strategies, which are fully stand-alone ERC4626 compliant vaults. These strategies can accept capital from multiple vaults, allowing for more flexible allocation. Yearn aims to encourage other teams to build on top of the Yearn stack rather than launching full forks.
- Composability and Efficiency: By becoming ERC-4626 compliant, Yearn V3 becomes more composable with the DeFi ecosystem and Yearn’s own suite of products. The use of roles and periphery add-ons enhances efficiency and customization, allowing the management to iterate and implement new ideas.
- Profit Locking: Yearn V3 introduces a profit locking mechanism that allows users to earn yield continuously over time, rather than only at specific intervals. This helps to ensure that capital remains deployed.
- Tokenized Strategies: V3 Strategies include a “Tokenized” strategy template designed to simplify strategy writing. These strategies abstract security features and the 4626 implementation, allowing developers to focus on yield farming logic.
- Periphery Contracts: Yearn V3’s base contracts are designed to be customizable, and periphery contracts have been developed to enhance this customization. Examples of periphery contracts include Accountants for fee management, a 4626 Router for integration, custom registries for tracking vaults and strategies, and swappers for integrating with different swapping methods.
To understand V3, users should familiarize themselves with the following definitions:
- Vault: In V3, a “Vault” or “Meta Vault” refers to an ERC-4626 compliant contract. It accepts user deposits, mints shares representing the user’s portion of the underlying assets held in the vault, and then allocates those assets to various “strategies” that generate yield.
- Strategy: Within V3, a “Strategy” denotes a yield-generating contract integrated into a vault, featuring the necessary ERC-4626 interface. This strategy takes the underlying asset and deploys it to a single source to generate yield on that asset.
- TokenizedStrategy: This is a technical implementation of a Strategy, designed as a standalone ERC4626 compliant Vault. TokenizedStrategies serve as yield generators in the V3 ecosystem, enabling both Meta Vaults and individual users to deposit directly and receive corresponding shares.
- Vault Factory: Yearn Governance deploys a Vault Factory contract for the easy and trustless deployment of Vaults of a specific version, streamlining the process.
The new system introduces significant technological improvements. It features allocator vaults, which offer enhanced decentralization and customization for multi-strategy vaults, and tokenized strategies, which are standalone, permissionless single-strategy vaults that offer new levels of composability.
The redesign of profit reporting and debt management in V3 aims to increase capital efficiency by ensuring funds are deployed 100% of the time. Furthermore, the launch plan highlights a cautious and security-focused approach, continuing Yearn’s reputation for high-security standards in DeFi.
Furthermore, V3 is designed to not just improve Yearn’s offerings but to influence DeFi as a whole. The system is built to be ERC-4626 compatible and comes with a suite of contracts for customization. This aligns with Yearn’s goal to democratize DeFi, making it easier for others to build their vaults using Yearn’s infrastructure.
Yearn V3 Architecture
Yearn V3 taps on modular technology to provide an improved version of V2. While having the same functionality as V2, the newest version offers a more efficient product helping Yearn to achieve its long-term objectives. Yearn V3 is based on three pillars as shown below.
Robust Core
The Robust Core is designed to handle the essential functions of the vaults securely and efficiently. Its primary aim is to ensure stability and reliability for the vault operations.
- Deposits and Withdrawals: Manages user transactions by accurately minting and burning shares.
- Accounting: Maintains detailed records of all financial activities to ensure transparency and accuracy in share valuation.
- Fund Management: Allocates and retrieves funds from strategies, ensuring safe and effective asset management.
- Access Control: Implements a robust system of permissions to secure operations and govern interactions within the vaults.
Smart Modules
Smart Modules in Yearn V3 are designed to iterate core vault logic until they can become immutable. These modules, if failed, allow the vault to function minimally to safeguard depositor funds. Notable smart modules include:
- Debt Allocator: Optimizes debt allocation across strategies to maximize yields.
- Accountant: Manages dynamic fee structures for vault operations.
- Deposit/Withdraw Limit Modules: Provides customizable control over vault deposit and withdrawal limits.
Periphery
These modules are optional and facilitate the construction of user interfaces and other functionalities around yVaults, enhancing user interaction and integration capabilities:
- Router: Manages deposits and withdrawals across all vaults and strategies.
- Yearn Lens: Aggregates information for off-chain applications.
- ySwaps: Internal swap system designed to minimize slippage and improve net APY.
- Registry: Tracks and manages strategies and vaults.
- HealthCheck: Ensures vault operations remain within safe profit and loss thresholds.
- Swappers and APR Oracles: Provide strategy-specific swap functionalities and real-time APR data to optimize debt allocation.
Yearn V3 Vaults
V3 vaults maintain the same functionalities as V2 but with additional features that increase safety, and automation, reduce operational costs, and enable more complex strategies. The aim is to reduce friction in creating strategies and allow a broader spectrum, including those that lock funds or operate across multiple chains.
The upgrade introduces more automated processes, moving closer to a fully automated vault system. This includes the automation of functions that were previously manual in V2, enhancing efficiency and reducing human error.
The redesign of the strategy<>vault relationship minimizes the effort from strategists and lets the vault handle all the functions of the strategy.
Furthermore, decentralizing strategy endorsement is an area that Yearn focuses on. It will allow community involvement in strategy approval processes, increasing transparency and trust in the vault operations.
yJuniorTranches
yJuniorTranches in Yearn Finance V3 is an innovative financial product designed to offer differentiated risk and reward profiles within the Yearn ecosystem. This feature allows users to engage in higher-risk investment strategies with the potential for higher returns.
Users can provide first-loss capital to specific strategies. This means they absorb the initial losses in exchange for potentially higher returns if the strategies perform well.
It is an optional feature that users with higher risk tolerance can exercise on V3.
Deploying and Managing a V3 Vault
V3 empowers users to easily deploy and manage their Vaults, eliminating the need for Yearn to act as the sole manager. You can customize your Vault based on factors like risk, fee models, and decentralization preferences.
To deploy, users must follow these steps:
- Utilize the Vault Factory: Each Vault release includes a dedicated “Vault Factory.” This factory simplifies and ensures trustless deployment of your Vault. Deploying a Vault outside this factory may lead to compatibility issues.
- Deploying Your Vault: Find the factory’s address for the latest release, then call Factory.deploy_new_vault(params) with essential parameters:
- asset: The underlying ERC-20 token for yield generation.
- name: The name for your Vault’s token issued to depositors.
- symbol: The symbol used for depositors’ tokens.
- role_manager: The address granting permissions to other addresses for specific functions.
- profit_max_unlock_time: Time in seconds for profit distribution from strategies.
- Setup Roles: To manage access controls on permissioned functions. Roles include ADD_STRATEGY_MANAGER, REVOKE_STRATEGY_MANAGER, and more. An address can hold multiple roles.
- Set Deposit Limits: Vaults default to a 0 deposit limit, which means all deposits will be reverted. Set the deposit limit using the DEPOSIT_LIMIT_MANAGER.
- Miscellaneous configuration: Customize further with options like minimum_total_idle and profit_max_unlock_time to optimize yield distribution.
The next step is to run the vault:
- Strategy Management: Add strategies with vault.add_strategy(strategy_address), set max_debt using vault.update_max_debt_for_strategy(strategy, max_debt), and allocate funds with the DEBT_MANAGER role.
- Removing Strategies: To remove a strategy, clear its debt, then call vault.revoke_strategy(strategy). Use vault.force_revoke_strategy(strategy) to forcefully remove a problematic strategy.
- Debt Updates: The DEBT_MANAGER role handles debt allocation, respecting max_debt for each strategy, and minimum_total_idle for the vault.
- Reporting: Utilize REPORTING_MANAGER to record profits/losses, charge fees, and lock profits for distribution to depositors via vault.process_report(strategy).
Further customization:
- Accountant: Add a separate contract as the vault’s ‘accountant’ to charge fees. The accountant calculates fees during each report and receives them.
- Default Queue: Vaults have a default_queue for servicing withdrawals. Customize it with the QUEUE_MANAGER role if needed.
It is also worth noting that it is recommended to avoid using tokens with behaviors incompatible with ERC-20 standards, such as rebasing tokens, fee-on-transfer, and re-entrancy tokens (ERC-777), as underlying assets in V3 vaults.
yBribe
yBribe is a platform that facilitates the compensation of vote-escrowed Curve (veCRV) holders in exchange for their voting power. It enables veCRV holders, which can include protocols, DAOs, or individual users, to extract value from their voting power by receiving compensation from buyers interested in increasing $CRV emissions to their specific Curve pool’s gauge. In other words, yBribe pairs users looking to buy votes, with those looking to sell them.
In the decentralized finance (DeFi) space, incentives for voting are often referred to as “bribes.” yBribe serves as a marketplace where users looking to buy votes are paired with those looking to sell them. This platform allows DAOs, protocols, and users to influence the allocation of CRV rewards through weekly gauge votes conducted by Curve. By purchasing votes, buyers can sway the direction of the rewards and boost yields in pools that are beneficial to them.
To participate in yBribe, users can utilize the “Offer Bribe” function on the platform. By posting a bribe, voters will see the pending Annual Percentage Rate (APR) increase for that specific gauge. veCRV holders can then sell their gauge votes to the highest bidder each week by voting on the bribed gauge offering the highest APR.
The key advantages of yBribe are its fully trustless, permissionless, and non-custodial nature. The platform operates entirely on-chain and features a user-friendly interface that helps veCRV holders identify the best opportunities for selling their votes. Additionally, bribes on yBribe exclude Convex votes to enhance the efficiency of the bribing process.
User Walkthrough
This walkthrough is designed to guide users on how to effectively use the yBribe platform, whether you’re a veCRV holder looking to maximize returns on your voting power or a briber aiming to influence Curve pool emissions.
Voting and Claiming Bribes (veCRV holders)
Step 1: Visit the yBribe platform here.
Step 2: Review Available Bribes
- On yBribes, you’ll see a dashboard with all the available bribes for various Curve pools.
- Each pool gauge has a Current Period APR (claimable this week) and a Pending Period APR (claimable next week).
Step 3: Decide Which Gauge to Vote For
- Evaluate both APRs and determine which gauge offers the best returns for your vote.
Step 4: Vote on Curve
- After selecting a gauge, visit the Curve platform to vote.
- Click on “Vote for Gauge” on yBribe which redirects you to Curve’s vote page.
- You’ll be landed on this page on Curve where you have to select your gauge and submit your vote.
Step 5: Claim your Bribe
- Visit yBribe after the start of the next period to claim your bribes.
- Click on “Claim Bribe” on the yBribe page.
- Any claimable bribes will be on the dashboard.
Offering Bribes (Bribers)
Step 1: Visit the yBribe platform here.
Step 2: Select Pool to Bribe
- Click the “Offer Bribe” function at the top of the page.
- Review the pools and choose the one you want to support to increase its APR.
Step 3: Bribe
- Deposit any token as a bribe to the pool of your choice.
- Tokens are locked until the voting period ends.
Step 4: Track your Bribe
- You can track the performance of your bribe on the yBribe page.
General Tips
- Stay Informed: Keep an eye on the countdown timer on yBribe’s main page to track when the current claim period ends and the next begins.
- Security Practices: Always ensure you are on the correct website and double-check all transaction details before confirming, to avoid phishing and scams.
- Market Dynamics: Regularly check back for changes in APRs and market conditions, as these can influence the attractiveness of different gauges.
yPRISMA
yPRISMA is Yearn Finance’s innovative liquid locker designed for Prisma Finance’s governance token, PRISMA. It offers a tokenized version of vePRISMA, providing holders with liquidity and simplified governance participation. Similarly to yCRV, all of Yearn’s positions earning protocol yield will be distributed to yPRISMA stakers.
Key Features
yPRISMA offers some unique features for its users.
- Token Representation: yPRISMA represents max-locked vePRISMA within Yearn but is not directly redeemable for the underlying locked PRISMA.
- Liquidity and Transferability: Unlike vePRISMA, yPRISMA has no transfer restrictions and can be exchanged on decentralized exchanges.
- Governance and Earnings: Holding vePRISMA typically offers voting power and a share in fee revenue within the Prisma ecosystem. yPRISMA manages this governance participation automatically, aiming to maximize yields for its holders.
Utility
- Built-in Boost Delegation: This feature allows yPRISMA holders to boost their yields across various Prisma-related activities, including Prisma Vaults, Stability Pool, and Curve/Convex Farming.
- Automated Yield Optimization: yPRISMA automates incentive voting to maximize weekly bribe yields from governance activities.
Acquisition of yPRISMA
Unlike vePRISMA, yPRISMA is tradeable.
- Direct Purchase: Available on DEXs such as Curve and CowSwap.
- Minting: Users can mint yPRISMA 1:1 directly from PRISMA tokens or claim emissions directly as yPRISMA via Prisma Finance’s platform.
- Claim Emissions: Users can claim their emissions as yPRISMA from the Prisma dApp.
Financials Mechanics
Staking yPRISMA activates a performance fee paid to Yearn. The yield comes from various sources.
- Fee Structure: Staking yPRISMA incurs a performance fee on the yield, which is distributed weekly – 10% to the Yearn treasury and the remainder to stakers. Fees are distributed in the form of yvmkUSD, Prisma’s mkUSD stablecoin.
- Yield Sources: Yield for yPRISMA stakers originates from protocol fees, bribes, and boost rental fees from the utilization of Yearn’s vePRISMA.
Future Updates
- Phase 1: Yield Distribution: Begins with distributing Prisma protocol fees and incentive voting bribes to yPRISMA stakers.
- Phase 2: yPRISMA Staking: Plans to migrate to a final staking contract, offering boosted yield distributions and multiple token distributions for yield.
- Phase 3: Governance Voting: Implementation of weight-based governance voting power for yPRISMA stakers through the new staking contract.
Sector Outlook
Yearn Finance has positioned itself as a key player in the yield farming sector. Its focus on automation, optimization, and user-friendly experiences has attracted significant attention from both individual investors and institutional players. Yearn continues to innovate by bringing new updates and innovative solutions to yield farmers.
Competition
There is competition in the yield farming sector with many protocols offering automated DeFi strategies. Here are some notable ones:
- Beefy Finance: Multichain Yield Optimizer
- Sommelier: Automated Vaults for Yield
- ether.fi Liquid: Automated DeFi Strategy Vault
Chains
Yearn was first launched on the Ethereum chain back in 2020. Since then it now supports 5 more chains: Fantom, Polygon, Optimism, Arbitrum, and Base. On each chain, Yearn offers different products and services to users.
Using the Protocol
How Yearn Boosts Yield
Yearn Finance leverages $CRV vote locking on Curve Finance to increase yield for its users. By locking $CRV tokens into the Curve DAO, Yearn obtains veCRV tokens, which allow voting on Curve proposals and pool parameters, thereby directing $CRV rewards towards preferred pools. This vote locking can boost yields up to 2.5x depending on the liquidity provided by Yearn and its share of total veCRV. Yearn manages these operations through its yveCRV and yvBOOST vaults, where locked $CRV enhances yields not just from Curve fees but also by boosting rewards from liquidity provisions.
How to Understand yVault ROI
Return on Investment (ROI) in Yearn’s context is calculated based on the net profit over a period relative to the investment cost. Yearn displays this as an “Estimated Yearly Yield” on their vaults, which is an annualized figure assuming current strategies and yields remain constant. ROI helps investors measure the efficiency of their investment in comparison to other opportunities.
How to Understand yVault APYs
Annual Percentage Yield (APY) in yVaults considers the compounding of yields over a year. This figure adjusts as new strategies are employed and as the performance of underlying assets changes. The APY is calculated based on the vault token’s price change, which reflects earned interest and compounded returns. Yearn provides different APY metrics such as weekly, monthly, and since inception, to give investors a clear view of potential earnings over different time frames.
How to Understand strategy descriptions
Each strategy employed by a yVault involves specific actions taken in the DeFi ecosystem to generate yield. These can range from simple lending and borrowing mechanics to more complex interactions involving multiple protocols. Yearn’s strategy descriptions provide details on these operations, allowing investors to understand the risk profile and operational mechanics of their investments. To have an even better understanding of the strategy descriptions, users can familiarize themselves with relative terms.
Guide to V3 “Tokenized Strategies”
Yearn V3 introduces “Tokenized Strategies,” a significant evolution from V2. Unlike V2, where strategies were standalone contracts tied to a single vault, V3 strategies are fully ERC-4626-compliant standalone vaults. This means they can connect to multiple vaults or even accept direct deposits from users, vastly widening their potential depositor base. This functionality democratizes strategy development, allowing anyone to create, deploy, and benefit from their strategies without needing Yearn’s endorsement.
Note that this is a complex process and a product that doesn’t speak to all users. Advanced users who possess the skills to follow such a process can benefit from tokenized strategies.
Why Tokenized Strategies?
- Strategist Fees: V3 reintroduces strategist fees, allowing developers to earn from the strategies they create.
- Codify Yield Farming: These strategies allow you to privatize or publicize your yield-generating methods.
- Simple 4626 Wrappers: They provide an easy way to add an ERC-4626 interface to any protocol, facilitating integration into the 4626 ecosystem, including Yearn Allocator vaults.
Key Components and Terms
- Strategy: An ERC-4626 compliant contract that operates independently or alongside allocator vaults, handling asset deployment to generate yield.
- Vault: Also known as “Allocator Vault,” it’s a smart contract that allocates assets across various strategies.
- Asset: Any ERC-20 compliant token.
- Shares: Represent a depositor’s share in a strategy, denoted as an ERC-20 token.
- Strategist: The developer or team that creates and maintains a strategy.
- Depositor: The entity that provides assets to a strategy in exchange for shares.
- Management: Typically the strategist, is responsible for setting fees and other operational parameters.
- Emergency Admin: A designated authority that can perform emergency functions.
Architecture
Tokenized Strategies in V3 utilize an immutable proxy pattern, which separates the high-risk and complex code into a shared implementation contract, TokenizedStrategy.sol, used by all strategies of a specific API version. Strategists simply inherit from BaseStrategy.sol and customize their strategy logic.
How to Get Started
Yearn provides all the guidance and tools to those who want to be strategists. Here’s the complete guide.
Summary:
- Select Development Framework: Choose between Ape Worx or Foundry, based on your preference for Python or Solidity. Each one has a detailed outline of instructions.
- Setup and Testing: Follow the setup instructions specific to your chosen framework, ensure the environment is correctly configured, and pass all initial tests to proceed to the next step.
- Writing the Strategy: This is the part where users create their Tokenized Strategy by writing the parameters of the strategy. This process will handle three functions that need to be overridden to deploy assets, manage withdrawals, and handle harvests and reports.
- Deploying the Strategy: By following all previous steps the strategy is ready and completely functional to be deployed to interact as any other ERC-4626 vault.
- Complex Strategies (Optional): While the previous steps cover all the necessary steps to create a fully functional strategy, users may option for further customization and complexity with their strategies. This is possible by handling five more functions covering additional parameters of the strategy.
Business Model
Yearn Finance operates within the decentralized finance (DeFi) space, providing users with yield optimization and automated investment strategies through its vaults.
- Vaults and Yield Optimization: Yearn Finance’s primary offering is its vaults, which act as automated investment vehicles. Users can deposit their assets into these vaults, and Yearn’s smart contract technology manages the allocation and optimization of these funds across various DeFi protocols and strategies. The aim is to maximize yield generation for users by utilizing different DeFi opportunities and strategies.
- Fee Structure: Yearn Finance generates revenue through a fee structure that is applied to the performance of the vaults. The fees are generally structured as follows:
- Performance Fee: Yearn Finance charges a performance fee, typically around 10% of the generated profits. This fee is calculated based on the increase in the value of the assets within the vault resulting from successful yield optimization.
- Management Fee: In some cases, Yearn Finance may charge a management fee, which is a percentage of the total assets under management (AUM) within the vault. However, it’s important to note that most Yearn vaults currently do not have a management fee.
The fee structure ensures that Yearn Finance is incentivized to optimize and grow the value of the assets under its management while aligning the interests of users with the platform.
Revenue Streams
Performance fees for every type of yVault go to Yearn’s treasury, located at treasury.ychad.eth, and are calculated only on top of harvest profits.
Economics
Fee Breakdown
Yearn vaults never have a deposit or withdrawal fee, and most have no management fee but enforce a performance fee.
- Performance Fee: Deducted from yield earned every time a vault harvests a strategy.
- Management Fee: Flat rate taken from vault deposits over a year. The fee is extracted by minting new shares of the vault, thereby diluting vault participants. This is done at the time of harvest, and calculated based on time since the previous harvest.
Before YIP-69 vaults had 20% performance fees and 2% management fees, but this changed and a dynamic fee structure was introduced.
- Single asset vaults have no management fees.
- Fees for all vaults can be checked in real time at yearn.watch
Vaults created through Yearn’s vault factory have a 0% management fee and 10% performance fee.
The current fee structure for each yVault can be seen directly on the yearn.finance website by clicking on the vault.
- The Treasury (which benefits Governance) collects a “management fee” based on the total assets the Vault has over a period of time, assessed each time the Strategy interacts with the Vault, and is provided as newly minted shares to the Treasury.
- The Treasury (which benefits Governance) collects a “performance fee” based on the amount of returns a Strategy produces during Normal Operation, assessed each time the Strategy interacts with the Vault, and is provided as newly minted shares to the Treasury.
- Each Strategist collects a “performance fee” based on the amount of positive returns their Strategy produces during Normal Operation, assessed each time the Strategy interacts with the Vault, and is provided as newly minted shares to the Strategist.
Fee Structure in Yearn v3
In Yearn Finance V3, strategies are now independent vaults. This change results in fees being charged at both the meta vault level and within the Tokenized Strategies. Additionally, V3 introduces a “Protocol Fee,” which is determined by Yearn Governance. This Protocol Fee is a percentage of the total fees charged when any V3 vault or strategy reports earnings.
Fees are structured differently for various components:
- Yearn Managed Multistrategy Vault Fees: V3 Vaults do not have default fees. Instead, an external “Accountant” contract can be added to the vault, which will implement custom fee logic. This allows vault managers to experiment with different fee structures, such as management fees, capped fees, tiered performance fees, or any combination. Accountants can also act as Junior Tranches, charging specialized fees or even refunding fees back to the vault.
- Tokenized Strategy Fees: Tokenized strategies are designed to charge only performance fees. Since these strategies are now standalone vaults, they report, lock profits, and charge fees at the strategy level. Minimum and maximum fees are hardcoded for tokenized strategies to ensure balanced fee structures and prevent exploitative practices.
- Protocol Fees: V3 aims to decentralize ownership and power over vaults and strategies, which means not all fees will directly go to the Yearn Treasury. To ensure the treasury continues to earn revenue, V3 introduces a “Protocol Fee.” This fee is a configurable percentage of the fees charged during any V3 vault or strategy report, based on the total fees collected. It acts as a “tax” on fees earned from using the Yearn stack, while allowing vault and strategy managers to set their own fee structures.
For example, if a strategy generates a profit of 100 tokens with a performance fee of 10% and a protocol fee of 10%, the breakdown would be as follows:
- Total fees: 100 * 10% = 10 tokens
- Protocol fees: 10 * 10% = 1 token (paid to Yearn)
- Performance fees: 10 – 1 = 9 tokens (paid to the strategy)
The protocol fee is configurable by the VaultFactory Governance for each specific API version across all Vaults and Strategies. Governance can also set custom protocol fees for individual vaults and strategies, higher or lower than the default fee.
It’s important to note that the exact fee structures will be subject to market conditions and the preferences of vault managers, strategists, and veYFI holders.
Operating Expenses
The majority of Yearn’s operating expenses are comprised of administrative salaries and security. Additional operating expenses may derive from grants, token-based compensations, and gas to operate the yValuts.
Tokenomics
https://www.coingecko.com/en/coins/yearn-finance
$YFI
$YFI is the protocol’s governance token, which allows token holders to participate in the decision-making process regarding the protocol’s future developments and upgrades, fee adjustments, and other important decisions in the platform. The $YFI token also serves as an incentive mechanism for users, as they can earn $YFI by providing liquidity to Yearn Finance’s various pools.
veYFI
veYFI is a component of Yearn Finance’s tokenomics, introduced through YIP-56 to enhance $YFI utility by integrating buyback and building funds. Users lock $YFI tokens to receive veYFI, a non-transferable token that provides several benefits including enhanced vault rewards and governance voting power on the allocation of bought-back $YFI.
Similar to Curve’s ve-model, users can lock $YFI for a chosen duration ranging from one week to four years, with the ability to set locks for up to 10 years for convenience. However, additional veYFI is not awarded for locking periods beyond four years.
veYFI Utility
- Boosted Rewards: Locking $YFI into veYFI is necessary for earning boosted rewards on Yearn. Without a veYFI lock, users do not receive boosted rewards.
- Governance Power: veYFI holders retain voting rights in Yearn Governance. veYFI is the only form of voting power in Yearn’s governance.
- Penalty for Early Exit: Exiting the lock before maturity incurs a penalty of up to 75% of the locked amount, benefitting the remaining veYFI holders. This penalty decreases in proportion to the remaining lock time. Longer lock time remaining = higher penalty.
- Eligibility for Additional Rewards: In addition to early exit penalties, veYFI holders are subject to a share of unused gauge dYFI rewards.
dYFI and Gauges Reward
dYFI is an ERC-20 token emitted by gauges, which users can sell for $ETH or exchange for $YFI at a discount; upon redemption, dYFI is burned and the $ETH is used for $YFI buybacks. The circulating supply of dYFI is capped by the available $YFI to ensure tokenomics balance.
Vault Gauges and Voting
Vault gauges enable depositors to stake vault tokens and earn dYFI based on their veYFI weight.
- Lock Duration and Weight: Longer lock durations result in higher weights, with maximum weight achieved by locking for 4 years. As the remaining lock duration decreases the weights decline as well.
- dYFI Allocation: The allocation of dYFI to gauges is based on governance voting that happens twice a month. Different gauges get different amounts of dYFI emissions.
- Boost Mechanism: Users can boost their gauge rewards up to 10x, depending on their veYFI holdings and vault tokens deposited.
Governance
The protocol is controlled by $YFI holders, who are responsible for submitting and voting on off-chain proposals that govern the ecosystem. Proposals that achieve majority support (>50% of the vote) are implemented by a 9-member multi-signature wallet, and changes must be signed by 6 out of the 9 wallet signers to be implemented. These multisig members are also voted by $YFI holders and are subject to change as a result of future governance votes.
Initially, Andre had the exclusive ability to mint tokens but that privilege was later extended to 9 multi-sig owners requiring 6 signatures. These members were active in the DeFi community and Andre did not include himself as a signatory.
Risks
To provide users with the best risk-adjusted yields in DeFi, Yearn uses a comprehensive risk assessment framework for each strategy within a Vault. This framework assigns a Risk Score to each Vault.
Strategies are assessed against 8 different factors: Audit, Code Review, Complexity, Longevity, Protocol Safety, Team Knowledge, Testing Score, and TVL Impact.
Since Vaults use multiple strategies, riskier strategies can be paired with more conservative ones to ensure the Vault has a robust and balanced Risk Score.
Protocol Risks
Yearn Finance’s core products revolve around its vaults, each of which operates at least one strategy exposed to various protocols (lending protocols, AMMs…). The Safe Farming Committee is responsible for the careful risk assessment of which protocols are secure to be used by the protocol contracts.
Risk Scores
Yearn Finance employs a risk-scoring framework to quantify and assess the level of risk associated with each strategy and vault within its ecosystem. This framework allows Yearn to strike an optimal balance between security and innovation.
- Strategy Risk Score defines each dimension of risk for a strategy and how to quantify this.
- Vault Risk Score Proposal aggregates all strategy scores for a vault, averaging by TVL.
- Overall Risk Score Proposal aggregates strategy/vault scores into overall scores.
The risk of different strategies is evaluated using a 1-5 point system developed by Yearn. A higher risk score indicates a greater level of risk associated with the strategy.
The risk assessment encompasses 8 dimensions:
- Audit
- Code Review
- Complexity
- Longevity
- Protocol Safety
- Team Knowledge
- Testing Score
- TVL Impact
Strategy Risks
Yearn Finance utilizes a variety of strategies to generate income, including lending, liquidity mining, trading fees, and the use of leverage. While these strategies are key to maximizing returns, they also expose the protocol and its users to specific risks.
- Lending: Involves collateralized lending where assets are lent out for a yield. Risks include governance actions that could affect interest rates, technological risks linked to smart contracts, market conditions that could reduce demand for loans or drop collateral values, and operational challenges that might prevent timely withdrawals from lending protocols.
- Liquidity Mining: Participants earn native tokens by engaging with protocols. Risks here derive from potential governance changes like withdrawal penalties, technological risks from smart contracts and Automated Market Makers (AMMs), market volatility affecting token prices, and operational risks that could delay the withdrawal of liquidity.
- Trading Fees: Generated by providing liquidity to AMMs. Risks include governance changes that could reduce rewards, technological issues with AMMs, reduced trading volumes leading to lower fees, and impermanent losses due to price volatility of pool tokens.
- Leverage: Used to amplify returns, leverage introduces governance risks if lending protocol parameters are adversely changed, technological risks from smart contract vulnerabilities, market risks like liquidation during price falls, oracle risks from incorrect price feeds, and operational risks in managing debt positions.
Vault Risks
Yearn Finance’s vaults are designed to increase yield by employing multiple strategies. While this diversification is great for returns, it also introduces several layers of risk, each associated with the different strategies utilized.
- Governance Risks: The multi-signature governance mechanism could potentially approve strategies that lead to financial losses for vault participants.
- Technological Risks: Integrating multiple strategies and protocols increases the complexity and potential for smart contract vulnerabilities, which could lead to capital losses.
- Market Risks: Vaults face several market-related risks including:
- Liquidation of leveraged positions due to abrupt market price drops.
- Decline in token prices affecting yields from liquidity mining strategies.
- High transaction fees on the Ethereum network could diminish overall yields or make some strategies economically unfeasible.
- Operational Risks: Operational inefficiencies can occur, such as failing to maintain an optimal mix of strategies or mismanagement of debt positions. Misinterpretations by the Safe Farming Committee regarding the security of new yield farms can also lead to risks. Lastly, technical issues like a website outage could affect user access and trust.
- Oracle Risks: Incorrect price feeds from oracles can result in premature or unwarranted liquidations in strategies that employ leverage.
Security
Audits
Committed to security and protecting users, Yearn Finance goes through rigorous audits for all of its smart contracts from established third-party security firms in the space such as MixBytes, ChainSecurity, and Trail of Bits. Every product that Yearn releases goes through an audit and it is not released until it’s proven safe and robust.
Yearn V2 Generic – Lender – Strat Smart Contract Audit – February 19, 2021 (MixBytes)
Yearn V2 Vaults Security Assessment – April 30, 2021 (Trail of Bits)
Code Assessment of the veYFI and RewardPool Smart Contracts – November 22, 2022 (ChainSecurity)
Code Assessment of the V3 Vaults Smart Contracts – May 4, 2023 (ChainSecurity)
Code Assessment of the Tokenized Strategy Smart Contracts – May 4, 2023 (ChainSecurity)
Code Assessment of the Yearn yETH Smart Contracts – June 26, 2023 (ChainSecurity)
Code Assessment of the yETH Periphery Smart Contracts – August 29, 2023 (ChainSecurity)
Code Assessment of the Yearn ERC4626 Router Smart Contracts – August 29, 2023 (ChainSecurity)
Yearn Finance Vesting Escrow Security Audit Report – October 13, 2023 (MixBytes)
Code Assessment of yETH Governance Smart Contracts – November 3, 2023 (ChainSecurity)
Yearn commits to a community-recognized standard for responsible disclosure. The process involves initial contact, detail sharing, and setting dates for public disclosure, aimed at coordinated vulnerability management for anything related to the project.
Security researchers can report vulnerabilities directly to Yearn’s security team through specified contacts or via the Immunefi platform. All communications are expected to be encrypted and handled according to detailed guidelines provided by Yearn.
Bug Bounty Program
To encourage the identification and reporting of vulnerabilities, Yearn offers a Bug Bounty program that includes rewards based on the severity of the issue.
Specifications
- Severe: $20k – $200k
- High: $5k – $20k
- Medium: $1k – $5k
- Low: $100 – $1k
Multisig
The multisig (multi-signature) mechanism is crucial for maintaining the integrity and security of the Yearn protocol. It operates under the premise that the Governance role, which holds significant power over the protocol’s operations, is operated honestly and responsibly. The governance decisions are executed through a 6-of-9 Gnosis Safe multisig setup, where at least six out of nine designated signatories must agree for any transaction to be executed.
The members of the multisig are voted by $YFI holders and can change at any time through governance. The profiles of these individuals are shared by Yearn publicly.
Economic Attack Vectors
In the past, Yearn Finance has been the victim of flash loan attacks. In February 2021, an incident involved an arbitrage attack on the Yearn DAI v1 vault, leading to a loss of $11 million.
The attacker utilized 9 flash loans to execute the exploit. The breakdown of the lost funds includes $2.7 million going to the attacker, $3.5 million to Curve liquidity providers, $3.5 million to Curve stakers, and $1.4m paid in Aave v2 fees. The attacker executed 11 transactions, involving flash loans from dYdX and Aave v2, borrowing $USDC and $DAI using $ETH as collateral on Compound, and several transactions involving the 3crv Curve pool and the yDAI vault.
In an interesting turn of events, Tether, the centralized company behind $USDT, froze 1.7M $USDT that was stolen during the hack.
In April 2023, it was reported a loss of $10M from an original contract that had been deployed over three years ago when Yearn was still known as iearn finance.
Despite being superseded by newer versions, substantial funds remained in the original contract. The attacker exploited a misconfiguration in the yUSDT token contract, which generated yield via an underlying basket of yield-bearing tokens, including $USDT positions on Aave, Compound, DYDX, and BzX’s Fulcrum. A copy/paste error led to the use of the Fulcrum $USDC address instead of the Fulcrum $USDT contract, which the attacker leveraged to manipulate the underlying share prices of yUSDT and mint a large quantity of yUSDT using just 10k $USDT.
The exploit underscores the importance of meticulous contract auditing and the potential risks of legacy contracts in DeFi protocols. It took 1156 days to spot this multimillion-dollar vulnerability in one of DeFi’s longest-established protocols, raising questions about the effectiveness of current auditing and monitoring practices.
Yearn acknowledged the attack and reassured users that current contracts were unaffected. The exploit led to discussions about the “test in prod” attitude, a method preferred by Andre Cronje, the founder of Yearn Finance.
Dependencies and Access Controls
From a security perspective, Yearn Finance relies on various dependencies and implements access controls to protect its systems and user funds.
- Smart Contract Dependencies: Yearn Finance interacts with multiple smart contracts and protocols within the decentralized finance (DeFi) ecosystem. These dependencies include lending platforms, automated market makers, yield farming protocols, and more. The security and reliability of these external contracts directly impact Yearn Finance’s operations. Thorough security audits, code reviews, and due diligence are conducted to assess the security posture of these dependencies.
- External Oracle Services: Yearn Finance vaults don’t rely on oracles because they don’t require price information, it’s not lending, exchanging assets.
- Third-Party Integrations: Yearn Finance integrates with other DeFi protocols and platforms to access additional liquidity, yield farming opportunities, or lending options. These integrations introduce dependencies on the security practices and protocols of the third-party platforms. Careful vetting, security assessments, and ongoing monitoring of these integrations are essential to maintain the overall security of Yearn Finance.
- Governance and Multisig: Yearn Finance employs a governance model where veCRV token holders have voting power to influence decision-making. Access controls are implemented to manage voting rights and ensure proper governance procedures. Additionally, multisig wallets are used for key operations, requiring multiple authorized signers to execute critical transactions. These access controls reduce the risk of unauthorized access or rogue actions within Yearn Finance.
- Code Audits and Security Assessments: Regular code audits and security assessments are conducted to identify vulnerabilities and weaknesses in Yearn Finance’s smart contracts and codebase. External security firms or independent auditors review the code for potential vulnerabilities, design flaws, and best practices adherence. These assessments help identify and mitigate security risks, enhancing the overall security posture of Yearn Finance.
- Security Incident Response: Yearn Finance maintains a robust security incident response process to address and mitigate security breaches or vulnerabilities. This includes promptly identifying and remediating security incidents, communicating with stakeholders, and implementing necessary fixes or patches to protect user funds and the platform’s integrity.
Liquidity Risk
Liquidity risks are inherent in the operations of Yearn Finance due to its exposure to various protocols, market conditions, and the dynamics of decentralized finance (DeFi).
- Token Liquidity: Yearn Finance operates within DeFi, relying on the liquidity provided by users and external market participants. The availability and depth of liquidity for the tokens utilized in Yearn’s strategies and vaults can, therefore, impact their efficiency and performance. Insufficient liquidity for certain tokens can result in increased slippage, lower trading volumes, and potential challenges in executing transactions.
- Market Conditions: The liquidity risks in Yearn Finance are closely tied to the broader market conditions of the DeFi ecosystem. Market volatility, changes in supply and demand dynamics, and fluctuations in token prices can impact the liquidity and stability of Yearn’s strategies and vaults. During periods of extreme market stress or price volatility, liquidity may become scarce, leading to challenges in executing trades or rebalancing assets.
Other forms of liquidity risk would involve impermanent loss as a result of providing liquidity in AMMs, platform risk from external platforms (downtime, hacking incidents, changes in governance parameters…), as well as the TVL volatility of the underlying protocols (sudden changes in TVL due to significant inflows or outflows can affect the liquidity and stability of Yearn’s operations).
Emergency Shutdown Mode
Emergency Shutdown Mode is a feature implemented by Yearn Finance to ensure the safety and protection of user funds in extreme circumstances. It allows the Vault to swiftly recall its debt, minimize losses, and enable easy withdrawal of deposits by users.
- Deposits Restrictions: During Emergency Shutdown, users are restricted from making new deposits into the Vault.
- Governance Restrictions: Governance, the governing body of Yearn Finance, is unable to add new strategies to the Vault during this mode.
- Strategy Position Recall: In Emergency Shutdown Mode, the Vault communicates with each strategy within its operations. The goal is to ensure that each strategy returns its entire position as quickly as possible, minimizing any negative impact on their positions. This process aims to protect user funds and limit potential losses.
- User Withdrawals: Despite the Emergency Shutdown, users maintain their ability to withdraw their funds from the Vault without any additional restrictions beyond what is expected under normal operating conditions.
- Governance Control: Only Governance, which consists of token holders with voting power, has the authority to exit Emergency Shutdown Mode. This ensures that the decision to resume normal operations and lift the restrictions is made collectively and with consideration for the safety and best interests of the Yearn Finance community.
Team
At inception, the protocol was developed and bootstrapped by a single developer, Andre Cronje. After suffering an exploit in February, 2020 Andre announced he was stepping away from the project after facing backlash from the community. He later returned and the project re-branded to yEarn.finance introducing a suite of new tools such as Earn, Vaults, yInsure, and StableCredit.
Andre Cronje has historically been a prominent figure in the cryptocurrency space. He spent five years building bespoke FinTech solutions, using blockchain technology to provide financial products for the unbanked sector in Africa. In 2017, he entered the crypto space and became a prominent builder. Often associated with Fantom, Andre has been involved in protocols like K3pr, Yearn, Multichain, Deriswap, Cream Finance, and Solidly among others.
After Andre left, the community took over and the project is now run by a team of core contributors, DeFi strategists and engineers led by storm0x and banteg.
Project Investors
Yearn Finance was launched in 2020 with a “fair launch” approach, meaning it did not have pre-mined tokens or outside investors before its launch. This method aimed to distribute governance fairly and equitably, focusing on decentralization from the beginning.
The $YFI tokens were distributed to users who actively participated in the liquidity pools, without any allocation for the founders or early investors.
Additional Information
Protocol Integrations
Yearn Finance has many notable integrations with other DeFi protocols to improve its product and offer the best possible yields to its users. Over its lifetime, Yearn has integrated with protocols such as Curve, Aave, Compound, Sushiswap, Cover, MakerDAO, CoW Swap, Prisma, and more.
Delegated Funding DAO Vaults
Yearn Finance has developed Delegated Funding DAO Vaults, an innovative funding mechanism tailored for DeFi. This approach is inspired by prior funding models like ICOs and IDOs but uses the development of the DeFi ecosystem to offer a structured and efficient method for DAO funding and management.
Features and Process:
- Investment Input: Investors contribute $YFI to a fair launch vault and receive proportional liquidity provider shares.
- Funding Application: DAOs seeking funds must apply through Yearn’s governance platforms after setting up a Gitcoin grants page. Proposals undergo community signaling followed by an off-chain vote.
- Credit Access and Repayment: Approved DAOs are granted a credit line which can be accessed and managed via yborrow.finance, with flexible repayment options including token repayments.
- Governance and Adjustments: Yearn’s governance system can adjust credit limits based on DAO performance, enhancing or reducing funding access as needed.
- Profit Distribution: Profits generated from the operations are distributed among the vault’s liquidity providers, aligning incentives and rewarding participation.
FAQ
- How/when does Yearn move the funds inside a vault and charge fees?
- One of the key functions of a strategy is called “harvest”. When called, it triggers a rebalancing process where profit is realized and reinvested back into the strategy.
- How does Yearn guarantee a strategy always generates tokens instead of losing them?
- Strategists use a number of tools to monitor on-chain data to ensure strategy health. One of those tools is Yearn Watch, which presents a nice UI with many key metrics live from the blockchain.
- What are some of the things that strategists must take into account when designing their strategies?
- Vault funds should increase over time and avoid downside price action.
- Avoid Impermanent Loss (e.g. don’t provide YFI/ETH liquidity in a liquidity pool).
- Users should be able to withdraw at any time (so the strategy can’t timelock all vault funds, only a small fraction).
- Use only protocols with a proven track record and well-understood, immutable contracts.
- How does Yearn manage all these vaults?
- Yearn Finance manages its vaults by automating investment strategies through smart contracts and employing a decentralized governance system where $YFI token holders vote on key decisions. This approach is supported by an open contributor model that allows developers to propose new or improved strategies.
- How can someone buy $YFI?
- Users can acquire $YFI in the open market through a centralized exchange such as Coinbase or Binance, or in a decentralized exchange on a supported chain.
- What are the advantages of veYFI?
- Governance Power
- Boosted Rewards
- Financial Incentives
- Is yBribe only the Ethereum chain?
- Yes, and you can only claim there.