Strategies

Last Update: August 2023

What is a Strategy?

Strategies are the core product which of Beefy's protocol, as - unlike the vault contract - each strategy is generally unique. Because each strategy involves a different combination of assets, pools, protocols and chains, each requires individual testing to ensure it is working as intended before it can be pushed into production.

How do liquidity pool strategies work?

Beefy's most common product is a standard liquidity pool vault, often built on the Uniswap V2 standard (i.e. a 50/50 balance of two assets with uniform concentration across the pool).

Taking this as an example, the workflow of the strategy starts with user deposits, which can be either the LP token, the underlying assets of the vault, or (with ZAP V2) any supported bluechip asset or stablecoin. The deposit is secured in the vault to handle the deposit/withdrawal workflows, before being transmitted to the strategy.

The strategy then deposits the assets into the liquidity pool, and in turn the LP tokens into a farm, which begins to accrue both trading fees and farm rewards for the user.

The vault then regularly claims the accrued rewards, routes them to a core liquidity pool for swap them back into the underlying asset, and then redeposits the underlying asset into the Beefy vault and strategy.

How do lending strategies work?

Standard lending vaults work in a very similar way, taking assets deposited in the vault and deploying them into the lending pool of choice.

Instead of trading fees and farm rewards, lending pools pay out interest on deposits and lending incentives, which need to be redeemed, exchanged and redeposited by the strategy.

Who is in control of the strategies?

Each vault and strategy link is hardcoded, and the code has been built to be immutable, so once they are released, they become unalterable. No one can modify the vaults and strategies.

Modern Beefy strategies do however rely on the standard set out in EIP-1167, known as "minimal proxy" contracts. Minimal proxies reduce deployment costs for repetitive contracts (e.g. strategies) by maintaining the vast majority of core functionality in a single implementation contract. They then configure the individual characteristics of the specific strategy (e.g. the relevant tokens and pools) through the minimal proxy contract - which is a much smaller contract to deploy - which directs instructions through to the implementation contract.

Users should be aware of the distinction between minimal proxy contracts and the proxy pattern used to upgrade contracts. Beefy's minimal proxy contracts are not upgradeable, so Beefy cannot take your funds by a sly upgrade. The proxy is only used to reduce deployment costs.

How can I make a strategy?

For users looking to get more involved and become a part of Beefy's team of strategists, you can post and discuss your strategy ideas in Beefy’s Discord in the #🎯-strategy-devs channel. Please make sure to provide detail of what pool and farm you're considering, what type of protocol they're on and what the APY is. There will be a template to help you get started.

What is APR and APY?

APR reflects the simple interest rate over a year’s time, while APY describes the rate with the effect of compounding.

Is APY/365 the right way to determine daily gains?

No, the effect of compounded interest is exponential, not linear. A daily compounded interest of 1% would yield 3678.34% a year. The correct formula for daily yield is: Daily Yield = ((1 + Annual Yield) ^ (1/365.25)) - 1.

How does Beefy optimize APY?

Beefy automates the entire compounding process, making it close to optimal as possible. The key factor is the frequency of compounding events, which depends on different variables in the system, like current gas prices, rewards accrued and liquidity for swaps. Beefy's sophisticated harvesting automation technology is watching all of the protocol's vaults around the clock, waiting eagerly for the next optimal opportunity to harvest.

Last updated