Skip to content

Commit 2b5866e

Browse files
authored
Merge pull request #328 from 0xCodeThief/main
Auto Leverage & Repay with collateral overview docs
2 parents 84bb023 + d22bdc1 commit 2b5866e

File tree

3 files changed

+180
-0
lines changed

3 files changed

+180
-0
lines changed

SUMMARY.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
## What's New?
1010

11+
* [Leveraged Positions](whats-new/leveraged-positions.md)
1112
* [E-Mode](whats-new/emode.md)
1213
* [Isolated Pools](whats-new/isolated-pools.md)
1314
* [Reward Distributor](whats-new/reward-distributor.md)
@@ -53,6 +54,7 @@
5354
* [Gasless Transactions on zkSync](guides/gasless-transactions-zksync.md)
5455
* [Import Positions](guides/import-positions.md)
5556
* [Enable E-mode](guides/enable-e-mode.md)
57+
* [Boost and Repay with Collateral](guides/leveraged-positions.md)
5658

5759
## Technical reference
5860

guides/leveraged-positions.md

Lines changed: 146 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,146 @@
1+
# **Looping Made Easy on Venus Protocol**
2+
3+
On Venus Protocol, building leveraged positions — traditionally known as “looping” — used to require users to manually repeat a tedious cycle: borrow → swap on an external DEX → supply as collateral → borrow again, often 5–20 times. Each step cost gas, time, and risk of transaction failures.
4+
5+
Auto-leverage boost changes that completely.
6+
7+
With Venus’s one-click Boost feature, the entire looping process is fully automated and executed in a single, atomic transaction using flash loans.
8+
9+
Here’s what happens behind the scenes when you click “Boost”:
10+
11+
* Venus instantly calculates the maximum safe leverage based on your current borrowing power and the selected collateral’s loan-to-value (LTV) ratio.
12+
* A flash loan borrows a large amount (far beyond your normal borrowing power).
13+
* The borrowed asset is swapped (via the best available route) into your chosen collateral asset.
14+
* The resulting tokens are supplied as collateral on Venus.
15+
* The loop repeats internally as many times as needed — all in the same transaction — until your target leverage is reached.
16+
* The flash loan is repaid at the end, leaving you with a fully leveraged position.
17+
18+
Result: What once took dozens of manual transactions, high gas costs, and constant monitoring is now instant, and completely safe from liquidation on execution (health factor is always kept \> 1).
19+
20+
Whether you’re looping 2×, 5×, or pushing close to the maximum LTV of assets like BNB, BTCB, or stablecoins, Venus does all the heavy lifting.
21+
22+
Looping is no longer reserved for advanced users — on Venus Protocol, it’s literally as easy as clicking Boost.
23+
24+
---
25+
26+
# **Repay Debt with Collateral**
27+
28+
Closing or reducing a leveraged position on Venus Protocol is just as simple as opening one. The Repay with Collateral feature lets you instantly repay any borrowed asset using the collateral you already have supplied — without needing to hold the borrowed token in your wallet.
29+
30+
## **How it works**
31+
32+
• Select the loan you want to repay (fully or partially).
33+
• Venus automatically withdraws the required amount from one or more of your supplied assets.
34+
• It swaps the withdrawn collateral into the exact borrowed asset (using the best available route).
35+
• The debt is repaid immediately, and any leftover tokens are returned to your wallet.
36+
37+
## **Perfect for leveraged positions**
38+
39+
When you have a looped (Boosted) position, your wallet typically holds little or none of the borrowed asset. Repay with Collateral eliminates the need to manually unwind loops by letting you deleverage or fully close the position in a single transaction — even if you want to exit at maximum leverage.
40+
41+
## **Key benefits**
42+
43+
• No need to source the borrowed token externally
44+
• One-click full or partial deleveraging
45+
• Minimal slippage thanks to optimized routing
46+
• Works seamlessly with Boost positions
47+
• Saves a lot of time
48+
49+
Combined with the Boost feature, Repay with Collateral makes entering and exiting leveraged positions on Venus faster, and more user-friendly than ever before.
50+
51+
---
52+
53+
# **Key Use Cases for Users**
54+
55+
**Yield Farmers – Maximize APY with one click**
56+
Loop stablecoins or blue-chip assets (e.g., USDT, USDD, BTCB) up to the maximum safe LTV and earn higher lending \+ VAI rewards without manually repeating borrow-\>swap-\>supply dozens of times.
57+
58+
**Long-term Bulls – Amplify exposure instantly**
59+
Want 4–8× exposure to an asset with only your existing collateral? Boost turns a modest position into a highly leveraged long in seconds.
60+
61+
**Bearish Traders – Short an asset instantly**
62+
Believe an asset is overvalued? Boost lets you instantly borrow and swap into stablecoins, creating a 5–10× leveraged short position in a single click.
63+
64+
**Quick deleveraging during volatility**
65+
When prices move against you, repay any borrow instantly using your supplied collateral, no scrambling for tokens or manual unwinding.
66+
67+
**Closing Boosted positions – cleanly**
68+
Exit an entire looped position (long or short) in one transaction. Repay with Collateral handles all withdrawals, swaps, and debt repayment automatically.
69+
70+
**Capital-efficient entry & exit**
71+
Enter high-leverage long or short strategies with zero upfront capital beyond your initial supply, and exit cleanly without ever holding large amounts of the borrowed asset.
72+
73+
Boost \+ Repay with Collateral turns advanced leveraged strategies — long or short — into simple, one-click actions on Venus Protocol.
74+
75+
---
76+
77+
# **Risks of Using Boost & Repay with Collateral**
78+
79+
While the one-click experience makes leveraging incredibly fast and simple, the risks remain the same as any leveraged position on Venus — just easier to enter at higher ratios.
80+
81+
## **Key risks you must understand:**
82+
83+
**Liquidation Risk**
84+
Boosted positions run very close to the asset’s maximum LTV. A small adverse price move can drop your health factor below 1.1 and trigger liquidation.
85+
86+
**Amplified Price Exposure**
87+
5–10× leverage magnifies gains and losses. A 10 % drop in the collateral asset price can wipe out 50–100 % of your equity.
88+
89+
**Execution & Slippage Risk**
90+
In rare cases of extreme market conditions, the internal swaps during Boost may fail or experience high slippage, causing the transaction to revert (you only lose gas).
91+
92+
**Oracle Risk**
93+
Venus relies on price oracles. Temporary oracle mispricing can lead to unexpected liquidations or failed Boost attempts.
94+
95+
**Borrow Interest Erosion**
96+
High or rising borrow rates on leveraged positions can reduce net yield over time and can turn a profitable strategy negative.
97+
98+
**Impermanent Loss (LP tokens)**
99+
Boosting with liquidity-provider tokens adds impermanent loss risk on top of borrowing costs.
100+
101+
## **Best practices**
102+
103+
• Only use funds you can afford to lose
104+
• Leave a safety margin instead of always maxing leverage
105+
• Monitor your health factor regularly
106+
• Know the exact liquidation price before confirming Boost
107+
108+
Leverage is a double-edged sword — Boost makes it easy to wield, but the responsibility remains yours.
109+
110+
---
111+
112+
# **How Venus Calculates Your Maximum Boost (With Example)**
113+
114+
Venus automatically determines the highest safe leverage so your health factor is above 1 after using Boost.
115+
116+
Note: Upon execution, the user's health factor will be greater than 1, which avoids immediate liquidation. Thereafter, the user must continue monitoring their health factor, as the protocol is not responsible for any subsequent liquidations that may occur.
117+
118+
## **Internal Formula**
119+
120+
**Maximum Additional Borrow \= Unused Borrowing Power ÷ (1 − Collateral Factor)**
121+
122+
## **Example – Looping USDT (Collateral Factor \= 80%)**
123+
124+
**Your Current Position:**
125+
• Supplied: 100 USDT (enabled as collateral)
126+
• Already borrowed: 20 USDT
127+
128+
### **Step-by-Step Calculation (Performed Instantly by the Protocol)**
129+
130+
1. **Unused Borrowing Power**
131+
Unused Borrowing Power \= (Supplied × Collateral Factor) − Existing Borrow
132+
→ (100 × 0.8) − 20 \= 80 − 20 \= 60 USDT
133+
2. **Maximum Additional Borrow with Boost**
134+
→ 60 ÷ (1 − 0.8) \= 60 ÷ 0.2 \= 300 USDT
135+
136+
### **Result After Clicking Boost**
137+
138+
• Total supplied: ≈ 400 USDT
139+
• Total borrowed: ≈ 320 USDT
140+
• Net equity: still ≈ 80 USDT (your original capital)
141+
• Effective leverage achieved: ≈ 5×
142+
143+
With only 60 USDT of unused borrowing power, Boost instantly creates a 5× leveraged position — something that would normally require 8–10 manual loops and multiple transactions.
144+
145+
The Boost interface shows the exact boost amount, the final leverage multiplier, and the updated health factor before you confirm — no manual calculations needed.
146+

whats-new/leveraged-positions.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
### **Leveraged Positions (Boost & Repay with Collateral)**
2+
3+
The Leveraged Positions feature allows users to significantly amplify their exposure in the protocol using a single-click workflow powered by flash loans. Instead of manually looping borrow → swap → supply multiple times, users can instantly achieve their desired leverage level in one atomic transaction, while maintaining full control and precision.
4+
5+
The feature consists of two complementary tools:
6+
7+
#### **1\. Boost**
8+
9+
The Boost tab enables users to open a leveraged position by fully utilizing their available (unused) borrowing power.
10+
11+
**How it works**
12+
13+
* Users must first supply assets to the protocol and enable them as collateral.
14+
* The interface displays the maximum “available to boost” amount, which is derived from the user’s remaining borrowing power.
15+
* When a Boost is executed, the protocol uses a flash loan to temporarily borrow a larger amount, swaps it into the chosen collateral asset, and supplies it — all in a single transaction.
16+
* This results in a leveraged position consisting of a larger supplied (collateral) amount and a corresponding borrowed amount.
17+
* Upon execution, the user's health factor will be greater than 1, which avoids immediate liquidation. Thereafter, the user must continue monitoring their health factor, as the protocol is not responsible for any subsequent liquidations that may occur.
18+
19+
**Key benefit**
20+
21+
With only a modest amount of unused borrowing power, users can open positions that are multiple times larger than what would be possible through ordinary borrowing — achieving high leverage efficiently and effortlessly.
22+
23+
#### **2\. Repay with Collateral**
24+
25+
Repaying debt or reducing a leveraged position is equally straightforward.
26+
27+
Instead of needing to hold the borrowed asset in their wallet to repay debt, users can directly repay any outstanding borrow using their supplied collateral in one click.
28+
29+
This is particularly convenient for deleveraging or fully closing leveraged positions, as it eliminates the need for additional swaps or external funds.
30+
31+
Together, Boost and Repay with Collateral provide a seamless, user-friendly way to enter and exit highly leveraged positions while keeping the process safe, fast, and capital-efficient.
32+

0 commit comments

Comments
 (0)