# Multiply

Pike's Multiply feature enables users to amplify their exposure to assets through automated leveraged positions using flash loans and atomic transactions.

### Overview

Multiply automates the creation of leveraged positions by combining flash loans, automated market making, and Pike's lending protocol. Users can achieve up to 10x leverage in a single transaction without the complexity and cost of manual looping.

The sections below cover leverage calculations, APY formulas and fee structures

### How Multiply Works

Multiply automatically creates leveraged positions by combining flash loans with Pike's lending protocol. When you create a Multiply position, the protocol uses a flash loan to borrow additional assets, converts those assets to collateral through automated swaps, and then supplies the combined collateral to Pike. The protocol then borrows against this new collateral to repay the flash loan, leaving you with a leveraged position where your original deposit controls a larger amount of collateral.

The entire process happens atomically in a single transaction, either everything succeeds or the transaction reverts, ensuring your position is always in a valid state.

**Key Properties:**

* **Atomic Execution**: All steps succeed together or the entire transaction reverts
* **No Manual Steps**: Protocol handles all intermediate operations automatically
* **Instant Setup**: Position is fully configured in one transaction

### Leverage & Multipliers

#### Understanding Multipliers

The **multiplier** determines how much leverage you apply to your position. For example:

* **2x multiplier**: Your $1,000 deposit creates a $2,000 total collateral position
* **5x multiplier**: Your $1,000 deposit creates a $5,000 total collateral position
* **10x multiplier**: Your $1,000 deposit creates a $10,000 total collateral position

Higher multipliers amplify both potential returns and risks.

#### **Leverage APY**

At its core, Leverage APY is defined the same way as Net APY: income minus cost, divided by the actual capital deposited:

```jsx
Leverage APY = (TotalSupply × Supply APY − TotalBorrow × Borrow APY) / NetPosition
```

Where:

* **NetPosition:** the original deposit (the equity put in)
* **TotalSupply:** total collateral in the protocol (the deposit × multiplier)
* **TotalBorrow:** total debt borrowed to build leverage (`TotalSupply − NetPosition`)

Take a $100 deposit with a 3x multiplier as a concrete example:

* **NetPosition:** $100
* **TotalSupply:** $100x3 = $300
* **TotalBorrow:** $300 - $100 = $200&#x20;

```jsx
TotalSupply = Multiplier × NetPosition

TotalBorrow = TotalSupply − NetPosition
            = Multiplier × NetPosition − NetPosition
            = (Multiplier − 1) × NetPosition
```

Hence, the Leverage APY formula can be simplified as follows:

```jsx
Leverage APY = (TotalSupply × Supply APY − TotalBorrow × Borrow APY) / NetPosition
             = (TotalSupply ×  Supply APY / NetPosition) - (TotalBorrow × Borrow APY / NetPosition)
             = (Multiplier ×  Supply APY) - (Borrow APY × (multiplier -1))
             = Multiplier ×  Supply APY - Multiplier × Borrow APY + Borrow APY
             = (multiplier × ( Supply APY - Borrow APY)) + Borrow APY
```

The effective Leverage APY on a Multiply position is therefore:

```jsx
Leverage APY = (Multiplier × (Supply APY - Borrow APY)) + Borrow APY
```

Formula factors:

* Multiplier: Your chosen leverage level (e.g., 2x, 5x, 7.5x)
* Supply APY: Annual percentage yield earned on your collateral deposited in Pike
* Borrow APY: Annual percentage yield paid on your borrowed assets
* Leverage APY: Your net APY from the leveraged lending position (Net APY on the equity deposited)

Example:

With a 5x multiplier, 8% Supply APY, and 4% Borrow APY:

```jsx
Leverage APY = (5 * (8% - 4%)) + 4%
             = (5 * 4%) + 4%
             = 20% + 4%
	     = 24%
```

#### Category-Based Strategies

Each Multiply strategy is designed with specific asset pairs:

* Asset correlation and risk parameters determine the maximum multiplier available
* Users select the strategy that matches their desired collateral and borrow assets

### Fees & Costs

Understanding the fees involved in Multiply operations helps you evaluate the total cost of your leveraged position.

**Flash Loan Fees**

A small fee charged for borrowing assets via flash loans to create your position. This fee varies by strategy.

**Swap Fees**

When the protocol converts borrowed assets to collateral, swaps are executed through a DEX aggregator and Tapio liquidity pools. DEX swaps incur standard fees and are subject to market slippage based on your tolerance settings

**Protocol Fees**

For more details, please refer to the [Protocol Fees](/protocol/protocol-fee.md) page


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.pike.finance/markets/multiply.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
