# MachBoost

**What is Mach Boost?**&#x20;

Mach Boost is a leverage automation tool built atop looping strategies within the Mach Finance ecosystem. It streamlines the process of leveraging positions by automating multiple loops into a single action. With Mach Boost, users can efficiently open and close long or short positions with just one click.

#### Key Benefits

* **One-Click Leverage:** Simplifies the complex, manual process of looping positions.
* **Flash Loan Integration:** Uses flash loans to boost liquidity, enabling efficient margin management.
* **Optimized for the SONIC Ecosystem:** Built to integrate seamlessly within Mach Finance, with future interoperability across DeFi protocols in the SONIC ecosystem.

***

### How It Works

#### Example Scenario

Let’s say you want to open a long position for **wBTC/USDC**. Traditionally, this would require several repetitive steps:

1. Deposit wBTC as collateral.
2. Borrow USDC against your wBTC.
3. Swap the borrowed USDC to wBTC.
4. Repeat the deposit-borrow-swap cycle until reaching the desired leverage.

\
Mach Boost automates these steps using flash loans:

* **Step 1:** User initiates a flash loan with margin for wBTC to cover the desired leverage
* **Step 2:** Deposits the wBTC (margin + flash loan amount) as collateral on Mach Finance.
* **Step 3:** Borrows USDC and swaps it for wBTC.
* **Step 4:** Repays the flash loan with a small fee, completing the leverage position in a single transaction.

To **close the long position**, Mach Boost reverses each step, paying off the borrowed assets and retrieving the original collateral with minimal interaction required from the user.\
For a **short position** on wBTC/USDC, Mach Boost follows a similar process but with USDC as collateral and wBTC as borrowed asset. Here’s how it works:

* **Step 1:** Mach Boost initiates a flash loan with USDC margin for USDC to cover the desired leverage.
* **Step 2:** The protocol deposits the USDC (margin + flash loan amount) as collateral on Mach Finance.
* **Step 3:** Mach Boost borrows wBTC and immediately sells it to acquire USDC.
* **Step 4:** The flash loan is repaid with a small fee, finalizing the short position in a single transaction.

***

### Model

\
**Architecture**&#x20;

Mach Boost is structured as a Beacon Proxy, which allows for the separation of account liquidity calculations. This design isolates Mach Boost's leveraged positions from a user’s main portfolio on Mach Finance, enhancing modularity and security.

**Fees**

There are fees associated with this strategy:

1. Flash loan fees depend on the flash loan provider, ranging from 0.09% on Aave to 0.3% on Uniswap
2. DEX Swap fees - Swapping between the Quote & Base tokens depends on the DEX
3. MachBoost fees - 0.1% fees towards the protocol treasury

\
**Future Potential**&#x20;

This architecture also supports future interoperability, making it feasible to expand Mach Boost into other DeFi protocols within the SONIC ecosystem, providing a broader range of strategies and liquidity sources.

<figure><img src="https://3654401082-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXbULk9DcZiaQfyS4WXal%2Fuploads%2FloVOCw0jjJPBhI4L7xTr%2Fimage.png?alt=media&#x26;token=114c33b7-2883-4d27-9390-fbd75bb511a5" alt=""><figcaption></figcaption></figure>
