# magicGLP

Before using magicGLP (also known as mGLP), make sure to fully understand how GLP works [here](https://gmxio.gitbook.io/gmx/glp). \
\
\&#xNAN;*Note: magicGLP staking is available only on the Arbitrum and Avalanche network. Join magicGLP* [***here***](https://app.abracadabra.money/#/magicGLP)*.*

**magicGLP is Abracadabra’s auto-compounder for GLP tokens, in which ETH /AVAX yield is produced by GLP farming, which is therein automatically auto-compounded back into magicGLP.**

<figure><img src="https://2388475231-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mc9U0yE30Tc9xb3mVGA-1703796690%2Fuploads%2Fj9h0iPJs1c1zXV7RQK2F%2FToken-mGLP.png?alt=media&#x26;token=203f94ca-0032-4221-97a2-504db3c1313c" alt=""><figcaption></figcaption></figure>

With **magicGLP**, the **ETH/AVAX** yield generated from **GLP** farming is automatically reinvested into **magicGLP**, helping you maximize your returns. Like other vault tokens, the value of **magicGLP** will increase over time due to the auto-compounding, causing the **magicGLP:GLP** ratio to rise.

### Deposit GLP tokens into magicGLP

*The following example is set on Arbitrum, the same user experience can be found on Avalanche Mainnet!*

\
\&#xNAN;*In order to join the magicGLP auto compounder, you must first have GLP tokens in your wallet. You can purchase GLP tokens with various assets* [*here*](https://app.gmx.io/#/buy_glp)*.*

<figure><img src="https://2388475231-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mc9U0yE30Tc9xb3mVGA-1703796690%2Fuploads%2FxmWI6lXy5rDcLi4PkUoP%2FStake%20GLP%3D.gif?alt=media&#x26;token=62d0049f-94eb-4be9-9c97-d3ae0a7202bd" alt=""><figcaption></figcaption></figure>

Once in the wallet, you can deposit **GLP** tokens by entering the desired amount in the box at the top right of the screen. The first time you interact with the contract, you will need to approve **GLP** token spending before you can click **Stake**.

After approving the transaction in **MetaMask**, you will receive **magicGLP** tokens in your wallet, and rewards will begin compounding!

### Withdraw magicGLP tokens into GLP

<figure><img src="https://2388475231-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mc9U0yE30Tc9xb3mVGA-1703796690%2Fuploads%2F1XT5iqiX5eZ50QvMPwpa%2FGMP_TW9yZUdIMDE%3D.gif?alt=media&#x26;token=61bd22cb-77d7-4815-b990-609c5d4da621" alt=""><figcaption></figcaption></figure>

To **Unstake**, click on the two arrows on the left side of the screen (as shown above).

Once clicked, you can specify the amount of **magicGLP** tokens to unstake. The first time you interact with the contract, you will need to approve **magicGLP** token spending before you can click **Unstake**.

After approving the transaction in **MetaMask**, you will receive **GLP** tokens in your wallet and will resume earning the base **GLP** rewards!

**Note:** The exchange rate between **GLP** and **magicGLP** changes twice a day—each time a harvest is called and rewards are compounded!

### magicGLP Dashboard:

The **dashboard** features a graph showing the historical performance (APY) of **magicGLP** across various time frames. The **y-axis** represents the **APY**, while the **x-axis** represents the date.

In the top right corner of the screen, users can view the **magicGLP APY**, which includes the effects of auto-compounding. This calculation assumes two harvests per day and factors in the 1% management fee taken by the protocol.

In the middle right section, users will see the **magicGLP:GLP exchange rate**. As more fees are added, **1 magicGLP** will become worth more than **1 GLP**.

Finally, users can check the amount of **GLP** or **magicGLP** tokens available in their wallet, as well as the dollar value of those tokens. Below that, the total supply of **magicGLP** and the total rewards earned by **magicGLP** will also be displayed!

### APY Computation&#x20;

The APY displayed by magicGLP is computed using GLP's APR (taken from GMX) and computed using the following formula, using two compounding actions per day:

$$
Magic GLP APY = (1+GLPAPR/N)^N - 1)\*0.99
$$

\
\&#xNAN;*N= (Days in a Year) \* (Number of Compounding action per day) = 730*<br>

<br>

<br>


---

# 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.abracadabra.money/learn/intro/stake/magicglp.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.
