# Create A Leveraged Position

## Introduction

[Factor Studio](https://docs.factor.fi/factor-studio/factor-studio) enables the creation of leveraged strategies through combining multiple DeFi primitives (see Related Concepts below) into a single transaction:

1. Supply initial <mark style="color:green;">asset</mark> token to lending protocol (i.e. Silo, Aave, etc.)
2. Flash loan <mark style="color:red;">debt</mark> token from Balancer
3. Swap flash loaned <mark style="color:red;">debt</mark> token for <mark style="color:green;">asset</mark> token on OpenOcean
4. Add swapped <mark style="color:green;">asset</mark> token to lending protocol
5. Borrow <mark style="color:red;">debt</mark> token from lending protocol to repay flash loan from Balancer
6. Repay Balancer flash loan using borrowed <mark style="color:red;">debt</mark> token

By batching the generalized steps above, users get access to up to **multiple times leveraged exposure (maximum determined by underlying lending pool)** on their initial position. The flash loaned value is added to the position's collateral as <mark style="color:green;">asset</mark> token while the position incurs interest payments on the <mark style="color:red;">debt</mark> token equalling the flash loaned value.

This allows users to take either a:

* **Long position (**:ox:**):** Supply <mark style="color:green;">asset</mark> token which you believe will increase in value relative to the <mark style="color:red;">debt</mark> token thereby amplifying your exposure to any <mark style="color:green;">asset</mark> gains. For example, by taking a leveraged WETH/USDC position, the value of the debt (i.e. USDC) to the collateral (i.e. WETH) decreases if WETH increases in price relative to USDC.
* **Short position (**:bear:**):** Borrow <mark style="color:red;">debt</mark> token which you believe will decrease in value relative to the <mark style="color:green;">asset</mark> token thereby reducing your <mark style="color:red;">debt</mark> obligations. For example, by taking a leveraged USDC/WETH position, the value of the debt (i.e. WETH) to the collateral (i.e. USDC) decreases if WETH decreases in price relative to USDC.

{% hint style="success" %}
**Leverage Strategy Explainers**

Please refer to the [Leverage Strategy Explainer](https://docs.factor.fi/getting-started/strategy-explainers/leverage) if you would like to understand the leverage process and how Factor streamlines the management of leveraged positions.
{% endhint %}

<details>

<summary>Related Concepts</summary>

* [Collateralized Lending & Borrowing](https://docs.factor.fi/factor-building-blocks/leverage/concepts/collateralized-lending-and-borrowing) -> Borrowing <mark style="color:red;">debt</mark> token from lending protocols by collateralizing <mark style="color:green;">asset</mark> token.
* [Flash Loan](https://docs.factor.fi/factor-building-blocks/flash-loan/concepts/flash-loan) -> Uncollateralized lending that enables the creation of leverage.
* [Market Orders ](https://docs.factor.fi/factor-building-blocks/swap/concepts/market-orders)-> Instant swaps of tokens on Decentralized Exchanges.

</details>

{% hint style="info" %}
**Leverage Fees**

Factor charges a small transaction-based fee that supports the development of the Factor ecosystem. 50% of the protocol's ongoing revenue is [shared with veFCTR ](https://docs.factor.fi/governance/fctr-token/faq-tokenomics#vefctr)holders to encourage greater community governance.

The schedule of fees can be viewed [here](https://docs.factor.fi/governance/factordao/platform-fees#fee-structure).
{% endhint %}

## Amplify Your DeFi Gains

### Step 1: Select A Leverage Strategy

Navigate to[ Factor Discover](https://app.factor.fi/discover) where you will be able to sort and filter through a myriad of `Long`/`Short` curated strategies. This includes lending protocols, strategy types, projected APYs, vault protocol rewards, and much more.

{% hint style="success" %}
Take advantage of [Factor Boost](https://docs.factor.fi/governance/factor-boost) (:rocket:) and [Factor Scale](https://docs.factor.fi/governance/factor-scale) (:scales:) incentivized vaults to get even more profits!
{% endhint %}

<figure><img src="https://1496012388-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSEwRza4r80hmJsISwKFf%2Fuploads%2FrvZQDyBDr6onplf1GHSi%2FUG_Leverage_Create_1.png?alt=media&#x26;token=f4f7b03e-c19a-4760-9813-bd7133c4d224" alt=""><figcaption><p>Discover DeFi leverage strategies</p></figcaption></figure>

Once you have identified your preferred strategy, select the "Expand" button to get started on your leverage journey.

### Step 2: Create a leveraged position

By creating a position, you are configuring the leverage parameters which best suits your personal risk to reward tolerance. Factor enables you to create multiple positions per strategy whose parameters are editable.&#x20;

<figure><img src="https://1496012388-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSEwRza4r80hmJsISwKFf%2Fuploads%2FiVnzqDIZq0sNt4pPp1rq%2FUG_Leverage_Create_2.png?alt=media&#x26;token=aa12abc8-633c-4a6c-9023-efbdb2d5bc0c" alt=""><figcaption><p>Open strategy position</p></figcaption></figure>

The Factor dApp enables you to adjust the following:

* **Select initial collateral amount (*****B*****):** Specify the amount of collateral (i.e. supply/<mark style="color:green;">asset</mark> token) that will be deposited into the leverage vault. This is the amount of <mark style="color:green;">asset</mark> tokens which will be debited from your wallet to fund the leveraged position.
* **Select leverage multiplier (*****C*****):** Specify the amount of leverage that you are willing to take for the position. The higher the leverage, the greater the potential gains OR losses. **A 2x leverage means your leveraged position value is twice that of your initial collateral amount**.

With the above parameters configured, you can then proceed to create the position by clicking on the "Open Position" button. As your personalized position parameters will be stored on-chain, this will require a signature via your connected web3 wallet (i.e. MetaMask, etc.).

### Step 3: Approve leverage contract

With the position created, you will then need to approve a spending amount for the Factor strategy contract. This allows the strategy contract to debit the <mark style="color:green;">asset</mark> token (i.e. collateral) from your wallet for the purposes of funding the leveraged strategy. This is an on-chain transaction which requires a signature.

<figure><img src="https://1496012388-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSEwRza4r80hmJsISwKFf%2Fuploads%2FuTh1VRNPPA929YyFjMlK%2FUG_Leverage_Create_3.png?alt=media&#x26;token=4e95d6dd-63d7-4969-9cc4-69b23859d9aa" alt=""><figcaption><p>Approve Factor contract</p></figcaption></figure>

### Step 4: Add liquidity to your leveraged position

Once approval has been given, you can then start to earn yields by adding liquidity to your newly created position!&#x20;

By signing the deposit transaction request, Factor executes the steps outlined in the [Introduction](#introduction) that adds liquidity and therefore leverage to your newly created active position.

<figure><img src="https://1496012388-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSEwRza4r80hmJsISwKFf%2Fuploads%2FoHYFSbajLWXjjgIq4CuY%2FUG_Leverage_Create_4.png?alt=media&#x26;token=17053d46-74ea-4eac-b546-c8a704eecc59" alt=""><figcaption><p>Add leverage to position </p></figcaption></figure>

### Step 5: View your active position

Factor dApp makes it easy for you to view and manage the performance of your leveraged position.

<figure><img src="https://1496012388-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSEwRza4r80hmJsISwKFf%2Fuploads%2Fin5KJl6WtspscqLmclus%2FUG_Leverage_Create_5.png?alt=media&#x26;token=9a032340-e81d-4590-9a76-cf031d32c092" alt=""><figcaption><p>Position summary</p></figcaption></figure>

The leverage position dashboard consists of the following metrics:

* **Net Value:** The USD value the position's collateral minus the position's debt.
* **Liquidation Price:** The <mark style="color:green;">asset</mark> token price at which the leveraged position will be exposed to liquidation risks.&#x20;
* [**Health Factor**](https://docs.factor.fi/getting-started/glossary#health-factor)**:** The lower the Health Factor, the higher the likelihood of liquidation with a Health Factor of 1 indicating that the position is at risk of being liquidated.
* **Leverage Multiplier:** The additional borrow value as a ratio of the collateralized <mark style="color:green;">asset</mark> value (i.e. the multiplier between a position's total collateralized + borrowed <mark style="color:green;">assets</mark> against the collateralized <mark style="color:green;">asset</mark> amount).

In addition to the position specific factors above, you can also view the following strategy information:

* **Projected Yield:** The estimated percentage returns which comprising the strategy APY, [Factor Boost ](https://docs.factor.fi/governance/factor-boost)APY, and [Factor Scale](https://docs.factor.fi/governance/factor-scale) APY.
* **Supply APY:** The yield generated from supplying <mark style="color:green;">asset</mark> token as collateral to the underlying lending protocol.&#x20;
* **Borrow APY:** The interest owed on the <mark style="color:red;">debt</mark> token amount which was borrowed from the underlying lending protocol.
