One of the key features of Abracadabra's Cauldrons Technology is the ability for users to leverage their positions. Here at Abracadabra, we have developed a one-click UI that allows you to do so automatically. Let's explain how it works under the hood before showing how to use the app yourself!

Leveraging on Abracadabra: How it works

Cauldrons allow withdrawing more MIMs than it should be possible, as long as the collateral required is supplied to the position eventually, within the same transaction. To better explain this, let's use the example of a user that wants to leverage his yvUSDT position.

This process can be visualized using the following infographic:

  • Step 1 and 2 - The user selects the desired leverage, obtains the yvUSDT, and deposits them as collateral.

  • Step 3 - Given the selected leverage, the protocol borrows the respective amount of MIMs.

  • Step 4 - These MIMs are swapped into USDT (current price peg and slippage play an important role here).

  • Step 5 - These USDT are deposited into a Yearn Vault to receive yvUSDT.

  • Step 6 - These yvUSDT tokens are deposited back into the Abracadababra to collateralize the user's position.

Notice that all of these steps happen in one single transaction, and therefore only one gas fee will be required. If one of these steps fails, the whole transaction fails. Note that if the token is not an Interest Bearing Token, STEP 4 and STEP 5 are substituted by a simple market buy of the token the user is leveraging.

Depositing Collateral and Leveraging

Leverage enables you to gained an oversized exposure to your collateral. You will not receive MIM in your wallet.

To leverage your position using Abracadabra, go to abracadabra.money and launch the app. This will take you to our community deployed and maintained interface.

From here, you can see all of the available cauldrons (markets), search for a specific one, filter and sort them however you like (by chain, by MIM availability, by APR, by TVL…)

Once you have selected the markets you were interested in, the cauldron's page will open, showing you market-specifc information and allowing you to borrow MIM.

The Cauldron page contains several parts, with the top layer giving us information about the market we've selected (here it's wAVAX).

  1. This enables you to switch between Borrow mode and Repay mode.

  2. This is where you select how much collateral you want to deposit Some cauldrons can accept the collateral in their wrapped (wAVAX) or naked (AVAX) versions. A switch enables you to go between the 2.

  3. In this section, you'll first need to toggle on the Leverage button. Then, you will have access to this slider enabling you to chose the amount of leverage you want. The leverage is a multiplier of the amount of collateral you deposit. A 3x leverage on 1 AVAX of collateral means you'll borrow enough MIM buy 2 AVAX that will be added to the AVAX you deposited, resulting in a 3 AVAX position.

  4. This pane shows you how step 2 and 3 will impact your position, showing you the amount and value of the collateral deposited, which gets impacted by the leverage multiplier, the MIM you have to repay to exit fully your position and your .

  5. This pane gives information about the cauldron itself, including fees, risk parameters and MIM available. You can't borrow more MIM than what is available.

Once you have selected your parameters, the middle pane will show you what your leverage position will look like, after the transaction is successfully completed. Using leverage mode, Abracadabra automatically determines how much MIM needs to be borrowed and swaps it for the collateral.

The price impact of the swap can be seen in the Dynamic Opening Fee section.

  • Collateral Deposited: Amount of collateral into the position and its USD value.

  • MIM to Repay: Total amount of MIM that will be owed after the position is opened. (it includes the Mint Fee)

  • Liquidation Price: Collateral price at which your borrow position will be liquidated.

  • Current Price: Current value of one unit of Collateral.

Liquidation Price

The liquidation price that is shown will always refer to the collateral that has been deposited to borrow MIM. A liquidation price of $32.9 means that if the price of AVAX drops to $32.9, your position is at risk of being liquidated. Please refer to the "Liquidations" section of the docs to learn more.

Leveraged position are inherently more risky than simple borrows. Liquidations of levered positions leave no assets in the user's position.

Opening a position

When you are finally ready to open a position, simply click on the "Leverage Up" button.

Note that if this is your first time using Abracadabra, you may need to grant several approvals before you can open the position.

The final transaction will deposit the collateral into the Cauldron, borrow MIM exchange it for more Collateral and deposit it back into your position.

Sometimes, transaction may fail because of slippage. The interface will let you know. Use the gear (⚙) icon next to "Mint MIM" to adjust slippage accordingly.

Once the transaction is confirmed, the page will refresh to show the updated values.

Closing a position

In order to close your position, head over to the My Positions page, and click on the Manage button. This will bring you back to the Cauldron Page.

From there, clic on the Repay button to switch to repay mode, and toggle the Deleverage button next to "Repay MIM".

The Deleverage interface is the exact opposite of the Leverage interface. It enables you to select how much MIM you want to repay, how much collateral you want to remove, and the consequence it would have on your position.

In this example, I want to reduce my leverage to have a safer position, and chose not to remove any collateral. It will take some of my AVAX collateral, sell it for 17.2 MIM and use those MIM to partially repay my debt. Using Flash Repay will send the deleverage transaction.

If this is your first time, you'll need to approve the use of MIM by DegenBox before using the Remove and Repay button.

While the interface allow you to deleverage and remove any custom amount, if you want to fully close your position (repay max and remove max) the "Close position" button is a shortcut to do so.

Sometimes after a deleverage, some MIM is left over after the swap. It is sent to the DegenBox, available at "My Position". From there you can simply withdraw it to your wallet.

Last updated