# Leverage

Calculating leverages

### Calculating the Maximum Leverage

It is recommended to understand Health Factor before proceeding.

Each asset has its own LT (%) as decided by the DAO, please refer to the LT page to see the parameters. The formula to calculate the maximum leverage is:

$MaxLeverage = 1/(1-LT)$

Let's say you go into Convex GUSD3crv farm [stkcvxgusd3CRV] with debt as USDC. If LT for that is 90, the max leverage would be: 1/(1-0.90) = 10x. Let's do yvCurve-stETH [Yearn farm for stETH/ETH Curve pool] with WETH as debt. The LT for both of them are 90 right now. That means 1/(1-0.90) = 10x as well.

If LTs for some farms become higher, more leverage could be used.

This is the maximum leverage that can be taken while keeping HF = 1. Given that there are no deviations in asset prices, then it can remain that way. However, it is risky that that is the case, therefore, it would be advised to account for volatility in price and prepare some buffer to ensure that your the HF does not go below 1, so that your N-Account does not get liquidated

### Accounting for volatility

These tips are for absolute degen users. More leverage = more risk, proceed with caution. It's better if you are able to understand Etherscan WRITE functions in case anything goes wrong with the interface. Be careful and read the code!

Keep in mind that practically, you may encounter slippage, volatility, and other unforeseen circumstances, so do not try to milk every drop unless you are an MEV pro. It's better to be safe than sorry, so it is generally recommended to put a buffer of at least 0.25-0.5 from your desired leverage. This way it keeps your position maxed out, yet helps avoid liquidation.

For instance, you want to go into FRAX3Crv. From the assets inside, you think that FRAX has some volatility. Your debt asset is USDC, and you want to milk this farm. Let's say the LT is 90. The formula to calculate your maximum leverage accounting for FRAX's volatility is:

$MaxLeverage_*= 1(1-LT*p)$

Where $MaxLeverage_*$ is the maximum leverage accounting for asset volatility, and p is the price you think that that asset price could drop to.

If you think that the lowest FRAX could go to is $0.95. So then it is: $6.896 = 1/(1-0.90*0.95)$ That means with leverage of x6.8 you are still fine even if FRAX price drops to$0.95.

This solely depends on each users' risk appetite. If you are more risk-averse, you may think the price can go lower, so you can input a lower number. Your leverage will be lower corresponding to your p variable and vice versa.

Last updated