USDC yVault ‘Generic Leverage Compound Farm’ Strategy Analysis
In this dashboard, we take a explain the main behaviors the strategy uses to maximize its returns. Analyze how the strategy performed using these behaviors, taking a look at both the profit amount and the APR. We also try to understand just how important Flash Loans are for the strategy.
Conclusion
- The strategy has around %6.8 APR in the last 30 days.
- The gains are pretty stable, total gains graph looks almost linear.
- Flash Loans are really important for the strategy since around 72% of the USDC it leverages on Compound is composed of Flash Loans. Which it repays by borrowing USDC from Compound. Maximizing the amount of COMP returns. It has borrowed more than 748M USDC using Flash Loans!
It is really easy to distinguish between the different behaviors of the strategy in the graph above. When the ratio is 100% the strategy is shuffling. We can also see that it is pretty consistent in its Flash Loan ratio when leverage boosting, when it uses Leverage Boosting(FL) the flash loans constitute around 72% of the total USDC supplied to Compound and the rest is covered by the vault assets and when it uses Leverage Boosting(Combined) the ratio is around 30%. Finally the jump starts are easy to spot with their close to 0% FL ratio.
As a final touch lets see how much USDC the strategy utilized in Flash Loans.
We can see that Jump-Starts and Leverage Boosting (Combined) get less and less frequent. The strategy only uses leverage boosting (FL) or shuffles after Jul 25. It probably used up all the collateral it generated by supplying USDC to compound in the jump-starts during the following Leverage Boostings (Combined).
To really understand the Flash Loan's role in the strategy. Lets define Flash Loan Ratio as:
Leverage Coming From the Flash Loan / Leverage Supplied to Comp
We can see the crazy jump-start on July 9. Where the strategy uses the assets from the vault to supply USDC to Compound and then keeps borrowing and resupplying more to maximize the COMP returns. I am not going to include this data point in the following charts to increase visibility.
Now, lets examine where the leverage comes from.
Before we breakdown the amount leveraged to Compound as vault assets vs Flash Loans, lets take a look at the overall amount.
It looks like the strategy has an APR close to %6.8 in the last 30 days.
We can see that after the strategy starts using really large sums of assets from the vault (July 9 onwards) the APR rate starts to take shape around its stable value. It starts with around 10% and finally stabilizes around 7%. However, APR seems to increase in the first week of August.
Finally, lets take look at the APR for the last 30 days to get an idea of the recent performance of the strategy. To calculate the APR this time around, we are going to replace the previous report in our formula with the first report appearing in the given time period and compare it with the most recent report.
The jump-starts are fairly obvious to locate in the graph above, just take a look at the sharp increases of the total debt. It looks like the main jump-starts were on July 9-10. Where the strategy leveraged around $223M worth of USDC using the vault assets.
After these jump-starts the gain graph is looks almost linear meaning that the strategy is pretty consistent on its gains.
The smaller increases in the total debt are caused by the leverage boosting since the strategy combines assets from the vault with flash loans to supply USDC on Compound.
Annual Percantage Rate
Now, lets go a bit further than just raw numbers and calculate the Annual Percentage Rate (APR) of the strategy for each report. APR is the annual rate charged for borrowing or earned through an investment. How are we going to calculate it using the reports coming from the strategy? Lets show the math. First we define the profit of the strategy for the duration the report covers as:
profit = Current Total Gain - Total Gain In the Previous Report
Which basically is profit made by the strategy in the time interval between the previous report and this report.
timeBetweenReports = (Timestamp of the current report - Timestamp of the previous report)
Which represent how many seconds passed between the creation of the two reports.
yearOverDuration = (365 * 86400) / timeBetweenReports
This represent how many such reports would be created in a year (365 days in a year and 86400 seconds in a day) if we create reports with this time interval (timeBetweenReports).
profitOverTotalDebt = profit / Current Total Debt
This ratio shows how much the strategy gained as a portion of the principal. It also represents the profitability of the strategy, more profits using less assets -> better strategy.
APR = profitOverTotalDebt * yearOverDuration
So APR basically shows how much of the principal we are going to earn back if the strategy maintains the same performance for a year.
A more detailed explanation
It looks like the strategy has 3 main behaviors (which I have named arbitrarily for explaining purposes).
- Jump-starts: These are reports where the strategy, using the assets given to it by the vault, supplies huge amounts of USDC to Compound without using any flash loans. Then borrows from Compound to supply more USDC to Compound in order to maximize COMP returns. Example report: Click
- Leverage boosting: These are reports where the strategy combines the USDC leverage from the vault with a Flash Loan from dYdX in order to gain additional leverage. There are two versions to this one.
- First one, which we will call Leverage Boosting (FL), is when the strategy takes a Flash Loan from dYdX and combines it with the assets from the vault to supply USDC to Compound. Then it borrows from Compound to repay the Flash Loan and boosts APY (More COMP returns). Example report: Click
- Second instance, which we will call Leverage Boosting (Combined), is when the strategy borrows from Compound, combines it with the vault assets and a Flash Loan to supply USDC to Compound. It then borrows once more from Compound to repay the Flash Loan. Example report: Click
- Shuffles: These are reports where the strategy takes a Flash Loan from dYdX to repay a borrow on Compound. Then it borrows the same amount from Compound to repay the Flash Loan. It then widthdraws some amount of USDC from Compound. Example report:Click
Introduction
According to yearn.watch, Generic Leverage Compound Farm strategy controls around 73% of the assets in the USDC yVault. Which means more than $462M! So the performance of the strategy is really important for the APY of the vault.
How does the strategy work?
Strategy supplies USDC on Compound and borrows an additional amount of USDC from Compound to maximize COMP earnings. Flash Loans ⚡💸 are used to borrow USDC from dYdX in order to gain additional leverage and boost the APY. Earned COMP is harvested and sold for more USDC and re-deposited into the vault.