Leverage Collateral
Last updated
Last updated
You've mastered the griddle. Now it's time to start stacking assets like a pro, building your burger as high as possible if you want any shot of "making it." But be careful, leverage is risky and you might get liquidated. While we all joke about it, no one is actually having fun staying poor.
Stack offers the option to leverage re.al native RWA tokens like Tangible Baskets and USTB or your favorite crypto asset bridged over to re.al.
Stack's leverage slider is a one-click tool you can use to borrow against your assets, increasing your exposure to the borrowed asset and increasing the yield, in the case of yield-bearing tokens. Here's a conceptual overview of how it works:
The user selects the token and amount of leverage they want to take on that asset
The asset is deposited as collateral and $MORE
is minted based on the Maximum Collateral Ratio
The $MORE
is swapped for more of the leveraged token on a DEX
That same token is deposited as collateral, the LTV (loan-to-value ratio) increases, $MORE
is minted and the process repeats
This process "repeats" until the desired number of "loops" have been completed (leverage factor is met) or the borrowing amount is maxed out.
With each "loop," the amount that can be borrowed decreases as the collateral ratio allows a smaller and smaller amount to be borrowed until there's nothing left.
The "looping" concept is used to describe the leverage process to make it easier to understand. However, under the hood, nothing actually loops and leverage is completed in one set of transactions.
This diagram visualizes the process:
Let's say you provide X $USTB
tokens and you want to lever up 3x.
Leverage is called with 3 arguments:
X: Collateral token amount
Y: Borrow token amount
Swap function (includes swap amount)
The contract will then:
Flash-mint Y $MORE
Swap $MORE
for collateral (we should now have ~3x)
Deposit collateral
Borrow Y $MORE
against it
Use borrowed $MORE
to repay the initial flash loan
Visit the Leverage page and select the collateral you want to get leverage on. Follow the same process you used in Borrow.
Moving the slider towards the right will increase your loops (leverage factor) moving your position closer to the maximum collateral ratio, making your position riskier and therefore the liquidation price closer to live price. Make sure to check the amount of $MORE
borrowed as well as your actual leverage.
Note that a Borrow Fee will be charged on the leveraged $MORE
amount that the user is borrowing. This fee is a total on all the $MORE
minted to complete all leverage "loops" in the process.
The Liquidation Price changes dynamical as you move the slider. Make sure you understand the Liquidation Price before opening the leveraged position. If the price of the leveraged asset trades below the liquidation price, you may be liquidated.
**Leveraged USTB positions , however an accumulation of interest fees can put a position in bad standing**
As you adjust your transaction parameters, the data below will update allowing you refine the transaction to your desired outcomes:
Collateral Deposit: The amount of collateral you will deposit for leverage.
$MORE
Borrowed: This is the amount of $MORE
the crew member is borrowing to make the completed leverage stack.
Leverage Factor: The multiple applied to the collateral deposit, increasing the amount of $MORE
borrowed.
Position Size: The total value of your collateral position after it's been leveraged.
Effective APR: APR based on leveraged returns from initial collateral deposit.
Collateral Utilization: If your collateral utilization exceeds the Maximum Collateral Ratio, either through price movement or accumulation of interest, your position will be liquidated
Liquidation Price: If the trading price of your collateral is , your position will be liquidated.
After all the parameters are set, click the yellow button at the bottom to initiate the transaction.
Note: The borrower will not end up with any $MORE
in their wallet after the transaction, it will have all been spent on new collateral to increase the farming yield with leverage.
Please be aware that all open positions utilizing the same collateral will be consolidated into a single position on Stack, regardless of whether they are leveraged or not. It's crucial for users to review their combined liquidation parameters after making any adjustments, as these parameters are likely to differ from the figures displayed during the transaction flow above.
Users should refer to the data in the Dashboard to ensure they have an accurate understanding of their overall liquidation risk.
To deleverage your position, visit the Dashboard.
Full deleverage instructions can be found in the Dashboard section of these docs.
As shown in the diagram above, leveraged positions execute a swap as $MORE
is minted and traded for leveraged assets.
Like when trading tokens on a DEX, you'll have the option to set your swap tolerance, or slippage, the amount of change in value when the trade is executed that the user is comfortable with.
If the swap tolerance is not high enough, the transaction will fail and an error will pop up.
Clicking on the small cogwheel above the position's health, will allow you to change the swap tolerance.
🍔
Congratulations, you've mastered the art of leverage and those delicious stacks now have you on the path from McDonalds to McMansion.