Yearn's Vault Factory allows anyone to permissionlessly deploy an official Yearn Vault with ready-made yield strategies.
The easiest way to get started using the factory is through the User Interface:
The current version of the Vault Factory works with the following:
- Curve LP Tokens
- Balancer LP Tokens (soon)
The Vault Factory is a massive step forward in automation. We're significantly reducing our operational costs for all vaults deployed with this new method. Here's the fee structure for them:
- 0% management fee (previously 2%)
- 10% performance fee (previously 20%)
Performance fees for every type of yVault go straight to Yearn treasury (treasury.ychad.eth) and are calculated only on top of harvest profits. The current fee structure for each yVault can be seen directly on the new yearn.fi website by clicking on the vault.
Only one factory vault can be live for each token, so 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).
Harvests: Traditional vs. Factory Strategies
Factory vaults introduced a key change in the harvest process, enabling permissionless harvests (meaning anyone willing to pay transaction costs can perform them). Here is how harvests work in each case:
Traditional strategies have the token swap logic directly embedded in them. As a result, a harvest call simultaneously performs debt rebalances and converts them into realized profits in one transaction.
Factory strategies separate swap logic from the strategy, executing it in a different transaction from the harvest. This ensures that swap transactions remain permissioned, safeguarding them from Miner Extractable Value (MEV) attacks.
Harvests in factory strategies still rebalance debt between strategies and allocate idle funds to strategies, pulling accumulated rewards into the strategy contract to be swapped by the ySwaps team. Once swaps are completed, which may take several days, anyone can call harvest a second time to acknowledge the profit generated by the swap and distribute it to the vault, making
Although harvests will be permissionless for this specific group of vaults, Yearn will continue utilizing standard keeper automation to call harvests, even if no one else does. These automated harvests are run by keep3r.network and often depend on network congestion and transaction viability. For example, if the network conditions are consistently unfavorable, harvests may have delays.
To call harvest, use the harvest() function on the keeper found at keeper.factory.ychad.eth. Simply enter the strategy address from the factory vault you wish to call harvest on and click “write.”
Curve LP Tokens
The first Vault Factory deployed live on Ethereum is the Curve LP Token Vault Factory. This factory allows users to deploy yVaults for any Curve LP token representing a Curve pool with an active gauge (allowing it to receive CRV emissions).
Factory-deployed yVaults for Curve LP tokens contain up to three ready-made yield strategies:
StrategyCurveBoostedFactory uses Yearn's veCRV balance (currently 62.8m) 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). 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).
In all three strategies, any earned tokens are regularly claimed, sold for more of the underlying Curve LP token, and then deposited back into the strategy to compound the yield.
Velodrome LP Tokens
On Optimism, we have deployed the Velodrome LP Token Vault Factory. Several vaults have already been deployed and users can now permissionlessly deploy a new vault for any Velodrome V2 pool. The strategy collects VELO emissions from gauge incentives, swaps them for the LP token making auto-compounding effortless! At the moment, harvests for the Velodrome Vault Factory are permissioned and called regularly by keepers.
Balancer LP Tokens
Balancer is another protocol we have integrated with our Vault Factory. The process is nearly identical to the Curve integration, with a few key differences relating to the unique features of Balancer.
StrategyAuraFactory is currently the only strategy used for Balancer factory vaults. It leverages the Aura rewards program on Balancer to earn additional yield.
The main difference between Balancer and Curve lies in their respective veTokens. Balancer's veBAL is their LP token (an 80/20 BAL/WETH pair), and their maximum lock duration is 1 year (compared to 4 on Curve). Unlike our Curve strategies where we use our veCRV balance to boost rewards, we currently do not have a large amount of veBAL in the treasury. Therefore, the strategy focuses on earning Aura rewards.
Aerodrome LP Tokens
On Base, we have deployed the Aerodrome LP Token Vault Factory. Aerodrome is a fork of Velodrome V2 and was deployed by the Velodrome team on Base.
The Aerodrome Vault Factory works identically to the Velodrome Factory. It allows users to deploy new vaults permissionlessly for any Aerodrome V2 pool. The strategy collects AERO emissions from gauge incentives, which are sold for the LP token, making auto-compounding effortless.
Like with the Velodrome Vault Factory, harvests for the Aerodrome Vault Factory are permissioned and regularly called by keepers.
Determine Accumulated Rewards
This section helps you know how much profit has accumulated, but calling harvest will not recognize profits unless they are sitting in the strategy's contract address. Also if there are reward tokens in the strategy's contract, those values should be added to your calculation in the section below.
For curve strategies, you can view how much rewards have accumulated for that vault by using Curve.Fi's dashboard and putting in Yearn's Curve Voter Proxy address
0xF147b8125d2ef93FB6965Db97D6746952a133934 (curve-voter.ychad.eth). This will show you the dollar amount accumulated in the strategy for all factory vaults.
Convex and Convex Frax Strategies
For Convex and Convex Frax you can view how much rewards have accumulated in USD by viewing claimableProfitInUsdc() on the strategy under the Read Contract tab.
- Curve LP Factory Address: 0x21b1FC8A52f179757bf555346130bF27c0C2A17A
- Balancer LP Factory Address: 0x06393857dB733b76DD3ec91F3681cE85db275438
- Velodrome LP Factory Address: 0x8eb53a4fD9D2727a49E9e68a32108C18049bFf86
- Aerodrome LP Factory Address: 0x2d12caFfa46ab3b6c5cEb224620de8b4DE3cDff1
The LP Factory contract provides a few main functions:
allDeployedVaults(): returns an array of all the deployed vaults.
numVaults(): returns the number of vaults deployed.
canCreateVaultPermissionlessly(): takes in an address for a gauge and returns a boolean that indicates whether a vault can be created permissionlessly.
createNewVaultsAndStrategies(): takes in an address for a gauge and a boolean that determines whether duplicate vaults are allowed, and creates a new vault and strategy.
latestDefaultOrAutomatedVaultFromGauge(): takes in an address for a gauge and returns the latest default or automated vault from that gauge.
~StrategyImplementation(): Has the name of the strategy in front of
StrategyImplmentationand returns the strategy contract template address used in the vault factory each factory will have at least one.
Create with UI
- User Interface: https://yearn.fi/vaults/factory
Follow these steps to create a new vault with the UI:
- Make sure your wallet is connected
- Chose a token to create a vault for
- Review details and click "Create Vault"
- Sign the transaction and the vault will be created
Create from Contract
Open the contract at etherscan: 0x21b1FC8A52f179757bf555346130bF27c0C2A17A
canCreateVaultPermissionlessly()function to make sure that a vault does not already exist for the gauge you want to create
createNewVaultsAndStrategies()to create a new permissionless vault.
- Now your new Yearn Vault will be deployed and you can sit back while it auto-compounds your rewards into more of your Curve lp position.