REBALANCE
  • INTRO
    • ❔What is REBALANCE?
    • 🛫Future Vision
  • How it works
    • 🍸Chill® Strategy
      • Mathematical Approach
      • Strategy backtests
      • Chainlink driven mechanism
      • Shares price&fees
    • 🥇Turbo® Strategy
  • RISK MANAGEMENT
    • 🔐Rebalance contracts security
    • 🛡️Risk Mitigation
      • 🔎Risk parameters
      • 🐼MAMMALS
  • Twitter
  • Discord
  • Website
Powered by GitBook
On this page
  • Refinancing Algorithm
  • Health Factor Computation
  • Liquidations management
  • Liquidation Mechanics
  1. Borrowing Optimization

Borrowing Optimization

• Coming later •

Last updated 11 months ago

REBALANCE enhances the DeFi experience by introducing an advanced borrowing refinancing system, designed to optimize debt positions and mitigate the risk of liquidation through strategic refinancing and a soft-liquidation process. Here’s how it works:

Refinancing Algorithm

The algorithm takes into account each integrated protocols’ math, to count the potential influence of the liquidity on the borrowing rates and utilization. The refinancing process involves several key steps to ensure debt positions benefit from optimal interest rates.

  1. Calculation: The system calculates which lending protocol offers the best rate for the user's debt position based on the on-chain data.

  2. Refinance initiation: The efficient allocation model is transferred to the loans vault.

  3. Refinance execution: Protocol takes a flash loan, repays borrowing position, and withdraws a collateral. Then the debt is transferred to a new protocol offering a better rate.

Health Factor Computation

The cornerstone of managing debt positions within REBALANCE is the computation of the user’s health factor. This metric determines the risk of liquidation for a debt position. Due to Solidity's limitations with decimal numbers, the health factor is scaled by a factor of 1e18. A health factor below 1e18 signals an "unhealthy" position, indicating it is at risk of liquidation. (see formula below)

HF=assetsuser×liqRatio×pricedebtuser×1e18HF = \frac{assets_{user} \times liqRatio \times price}{debt_{user}} \times 1e18HF=debtuser​assetsuser​×liqRatio×price​×1e18

Liquidations management

REBALANCE employs a "soft-liquidation" process to manage positions nearing liquidation.

If a user's health factor falls between 1e18 and 0.95e18, indicating moderate risk, only up to 50% of the debt can be liquidated. For health factors at or below 0.95e18, full liquidation becomes possible.

This process is regulated by introducing a "close factor" to manage liquidation extents. (see formula below)

Liquidation Mechanics

During liquidation, liquidators repay part of the debt to receive asset shares from the liquidated user at a discounted rate, typically 97% of the asset's oracle price, applying a 3% penalty on the user for asset liquidation.

CF={0.5if 1e18>HF>0.95e181if 0.95e18≥HFCF = \begin{cases} 0.5 & \text{if } 1e18 > HF > 0.95e18 \\ 1 & \text{if } 0.95e18 \geq HF \end{cases} CF={0.51​if 1e18>HF>0.95e18if 0.95e18≥HF​
💰
Page cover image