# magicAPE

**magicAPE is Abracadabra’s auto-compounder for APE tokens, where APE yield produced by APE farming on** [**https://apestake.io/**](https://apestake.io/) **is automatically auto-compounded back into magicAPE.**

<figure><img src="https://2388475231-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mc9U0yE30Tc9xb3mVGA-1703796690%2Fuploads%2FaciJrMgxgLpvdgQXDNTh%2Fape_01%201.png?alt=media&#x26;token=28195084-360a-480f-afaf-527cd0ada974" alt=""><figcaption></figcaption></figure>

With magicAPE, the APE yield generated from APE staking is automatically reinvested into magicAPE, which helps you maximize your returns. **Like other vault tokens, over time, the value of magicAPE will increase, due to auto-compounding, causing the magicAPE:APE ratio to rise.**&#x20;

### Deposit APE tokens into magicAPE

*In order to join the magicAPE auto compounder, you must first hold APE tokens in your wallet. You can purchase APE tokens with various assets on the macha.xyz or 1Inch protocols.*

<figure><img src="https://2388475231-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mc9U0yE30Tc9xb3mVGA-1703796690%2Fuploads%2FH6JYDqrE64xkLmqlEVmj%2FGMP_TW9yZUdNQVgwMQ%3D%3D.gif?alt=media&#x26;token=b0adeb61-0633-4c0e-a00f-fd94b95885bc" alt=""><figcaption></figcaption></figure>

Once in the wallet, you can deposit **APE** 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 **APE** token spending before you can click **Stake**.

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

### Withdraw magicAPE tokens into APE

In order to “Unstake”, please click on the two arrows on the left side of the screen.

<figure><img src="https://2388475231-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mc9U0yE30Tc9xb3mVGA-1703796690%2Fuploads%2F8Jov7RZvlk8INfWG5j1S%2FGMP_TW9yZUdNQVgwMQ%3D%3D.gif?alt=media&#x26;token=7baec624-377b-4cdd-b3ee-7ecd3584d574" alt=""><figcaption></figcaption></figure>

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

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

**Note:** The exchange rate between **APE** and **magicAPE** changes twice per day, each time a harvest is called and rewards are compounded!

### magicAPE Dashboard:

The dashboard contains a graph of magicAPE’s historical performance (APY), TVL and Price across various time frames. The y-axis represents the statistics that is showed, and the x-axis represents the date.

<figure><img src="https://2388475231-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mc9U0yE30Tc9xb3mVGA-1703796690%2Fuploads%2FhCp4KA6FmArVwvvyo6dk%2FGMP_TW9yZUdNQVgwMQ%3D%3D.gif?alt=media&#x26;token=45a9e75c-7f66-48ec-abdd-8bac9a210969" alt=""><figcaption></figcaption></figure>

On the **Yield** page, you can compare the performance of **magicAPE** yield against that of plain **APE** staked!

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

In the middle right section of the screen, users can view the **magicAPE:APE exchange rate**. As more fees are added, **1 magicAPE** will become worth more than **1 APE**.

Finally, users can check how many **APE** or **magicAPE** tokens are available in their wallet, as well as the dollar value of those tokens. Below that, the total supply of **magicAPE** and the total rewards earned by **magicAPE** will be displayed!

### APY Computation&#x20;

The APY displayed by magicAPE is computed using APE's APR (taken from apestake.io backend) and computed using the following formula, using two compounding actions per day:

$$
Magic APE APY = (1+APEAPR/N)^N - 1)\*0.99
$$

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