GMX V2 Cauldrons
Last updated
Last updated
The Abracadabra GMX V2 Cauldrons operate slightly differently from other cauldrons. While the borrowing process remains the same, leveraging—though similar and straightforward—has some key distinctions that users should understand.
On GMX V2, entering or exiting a GM position is not instantaneous. Instead, users must first create a deposit or withdrawal order, which is then executed by GMX’s keepers. This means the process involves two transactions: order creation and order fulfillment.
This design choice by GMX helps prevent front-running and enhances user security. During the period between creating an order with borrowed MIM and its fulfillment, the USDC in the order serves as backing for the borrowed MIM. Once fulfilled, the GM tokens are added as collateral, and the backing functions as usual. Note: The following documentation applies for all gm based cauldrons, no matter the underlying collateral. GM cauldrons have been added to Abracadabra's lineup following
When leveraging, you typically only need to complete two transactions, just as you normally would: approving the use of your GM tokens and executing the leverage transaction. However, additional steps take place in the background.
When you execute the leverage transaction, MIM is borrowed, swapped for USDC, and then used to create a deposit order to acquire GM tokens. Until the order is executed, both the USDC and the order remain under the user's ownership. The UI will display this process on the GM Leverage screen.
After some time ((usually a few seconds, but it rare occasions it could take up to 5h) the GMX keeper will execute the deposit, converting your USDC tokens to GM and sending them back to the cauldron to be added as collateral. After this step, the leverage is complete.
Sometimes, for unforeseen reasons, the second step can fail. This does not affect the security of your funds, as the USDC is stored in a contract you own. In this case, the Abracadabra frontend will ask you to retry, sending a transaction that will finalize the leverage.
Due to the non-atomic nature of GMX V2, deleveraging a position requires an additional transaction from the user. However, the way you interact with the interface remains unchanged.
You start by selecting your parameters, specifying how much debt you want to repay and how much collateral to withdraw—just as you normally would.
After signing the transaction in your wallet, it is sent, and the UI waits for the GMX keeper to complete the withdrawal from GMX. Once this is done, you will be prompted to send a second transaction to finalize the deleveraging process.
Once the second transaction is sent, the deleverage is complete. If you forget to submit the second transaction, the UI will remind you below the "Close Position" section.
Clicking "Deleverage" will complete the process.
Note: GM cauldrons are audited by Guardian, the audit can be found .