BOB
  • πŸ‘‹BOB Stablecoin
  • BOB Info
    • πŸ—ΊοΈBOB Ecosystem
      • Mellow Protocol Vaults
    • 🦊MetaMask
      • Swap BOB with Metamask Swap
    • πŸ”BOB Swap
    • πŸ¦„Uniswap v3
    • πŸ™‹β€β™€οΈBOB FAQ
  • BOB CDP
    • ℹ️About
    • πŸ’‘Use Cases
    • πŸ‘¨β€πŸŽ€System actors
    • πŸ“šSystem configurations
    • 🏦Vault health
    • 🏘️User flow examples
    • πŸ‘¨β€πŸ’»Technical docs
      • Position valuation (technical)
      • Liquidations
      • Deployment addresses
      • Smart Contracts
        • NFTVaultRegistry
        • NFTVault
        • UniV3Oracle
        • ChainlinkOracle
        • DebtMinter
        • SurplusMinter
    • πŸ™‹β€β™‚οΈCDP FAQ
  • BOB DAO
    • πŸ§‘β€πŸ€β€πŸ§‘Governance
      • BOB DAO
      • Protocol Governance
        • GP 0: Increase SAFE membership
        • GP 1: Bob Swap beta testing infrastructure
        • GP 2: Upgrade Contracts to v1.0.0
        • GP 3: Enable Bob Swap for Public Use
        • GP 4: Increase Multisig & Upgrade BOB contract on all networks
        • GP 5: Enable Bob Swap on Ethereum Mainnet
        • GP 6: Upgrade zkBob to support direct deposits
        • GP 7: Increase Multi-chain Inventory and Update Bob Swap
        • GP 8: Extend pool limits for KYC'd users
        • GP 9: Deactivate Kyberswap inventory pairs [Emergency Measure]
        • GP 10: Reallocate previous Kyberswap inventory
        • GP 11: Add 24 hour timelock to BOB contract on Optimism
        • GP 12: Raise Polygon limits
        • GP 13: Launch BOB CDP
        • GP 14: Migrate BOB pool to USDC on Polygon
        • GP 15: KYB tiers on Optimism
        • GP 16: Remove excess inventory on Arbitrum and BNB Smart Chain
        • GP 17: Remove excess inventory on Optimism and Ethereum
        • GP 18: Remove excess inventory on Polygon
        • GP 19: Accrued Revenue Allocation
        • GP 20: Migrate BOB pool to USDC on Optimism
        • GP 21: BOB inventory reduction
    • πŸ“‹Inventory
      • Inventory Actions
  • BOB Resources
    • 🧩Visual Assets
    • ⛓️Links
Powered by GitBook
On this page
  • Health Factor
  • Comparison with other protocols
  • Example
  • Health Factor impacting actions
  • Avoiding liquidations
  • Impacts of price movements
  1. BOB CDP

Vault health

Health Factor

It is important for borrowers to monitor their vault health conditions. Vault health mainly depends on the value of the locked collateral and its overall debt.

Collateral value is calculated as a sum of the current valuations of deposited LP positions, see Position valuation (technical) for more details. It's important to note specific collateral type may be subject to rapid changes with market movements.

Overall debt slowly increases over time, targeting a configured annual stability fee (currently set at 1% per annum).

Vault health factor is typically expressed in the % format, and calculated as:

HF=ClDHF = \frac{C_l}{D}HF=DCl​​

Where:

  • ClC_lCl​ - collateral liquidation threshold, which is fraction of total locked collateral value

  • DDD - vault current debt

The higher the health factor is, the more safety margin you have, and less likely your vault will be subject to liquidation.

As you actively manage your vault, the protocol will not allow your vault health factor to go lower than a predetermined minimal theshold:

HFmin=ClCb≀HF,HFmin>100%HF_{min}=\frac{C_l}{C_b} \leq HF, HF_{min} > 100\%HFmin​=Cb​Cl​​≀HF,HFmin​>100%

Where:

  • ClC_lCl​ - collateral liquidation threshold

  • CbC_bCb​ - vault max borrow amount

Comparison with other protocols

BOB CDP uses a different approach of calculating health factors compared to other lending markets. To reduce confusion, here is high-level comparison:

Protocol
BOB CDP
MakerDAO
MAI
AAVE
Compound

Scale

1% ... >1,000%

1% ... >1,000%

1% ... >1,000%

0.01 ... >10

100% ... 1% (inverted)

Healthy range

>100%

>130...350%

>110...150%

>1.00

<70...90%

Liquidation HF

100%

130...350%

110..150%

1.00

70...90%

Min HF after borrow

110%...130%

130...350%

110..150%

1.03-1.20

65...83%

In contrast to other protocols, the health factor is calculated based on the liquidation threshold, rather than the collateral amount. A 150% health factor in BOB CDP is not the same as a 150% collateralization ratio in MakerDAO and other protocols.

Example

  1. Bob deposits 10,000$ worth of collateral into a newly created vault.

  2. Since the vault debt is 0 and there is no risk of liquidation, HF is equal to ∞\infin∞.

  3. ClC_lCl​ is calculated using a collateral liquidation factor of 70%, and is set to 7,000 BOB.

  4. CbC_bCb​ is calculated using a max borrow factor of 60%, and is set to 6,000 BOB, which is the max amount available to borrow given the current collateral condition.

  5. Bob mints 50% of available debt - 3,000 BOB.

  6. Bob's vault HF is now equal to 7,000 BOB / 3,000 BOB = 233%.

  7. Collateral price drops to 9,000$.

  8. Bob's vault HF is now equal to 6,300 BOB / 3,000 BOB = 210%.

  9. Bob mints remaining available debt - 2,400 BOB, given that CbC_b Cb​is 5,400 BOB.

  10. Bob's vault HF is now equal to 117%.

  11. Collateral price drops to 7,500$.

  12. Bob's vault HF is now equal to 97%, making his vault subject to liquidation.

Health Factor impacting actions

Conditions that bring a vault closer to liquidation:

  • minting of new debt

  • reducing vault collateral

  • collateral value market value depreciation

Actions that bring vault further from liquidation:

  • active debt repayment

  • increasing vault collateral (can be done in the Uniswap UI)

  • depositing additional collateral

  • collateral value market appreciation

Borrowers are responsible for leaving necessary safety margins in their vaults, regularly monitoring their vault condition to avoid liquidations, and acting accordingly whenever necessary.

In-range positions on Uniswap earn LP fees, which positively impact locked collateral value. With absence of big market movements, earned LP fees are likely to greatly exceed paid stability fees, resulting in a vault become healthier on its own, over time.

Avoiding liquidations

A liquidation can be automatically triggered and executed by liquidators once the health factor drops below 100%, meaning the total vault debt exceeded the collateral liquidation threshold:

HF<100%⇔D>Cl>CbHF < 100\% \Leftrightarrow D > C_l > C_bHF<100%⇔D>Cl​>Cb​

Impacts of price movements

The valuation of particular LP positions depends on the asset pair used in that particular LP and its price movements. Generally, it can be assumed that volatility of LP tokens is strictly limited by the volatility of individual assets comprising that LP position.

Thus, if the ETH price drops by 10%, the price of any WETH/BOB LP position, regardless of its range, won't drop by more than 10%. In a more realistic scenario, however, when the position stays in-range, the price drop in the valuation of the LP position can be significantly lower. In practice, this usually means that well-ranged WETH/BOB LP collateral (or similar) is safer and "more conservative" then pure WETH (or similar) collateral, thus allowing higher collateral utilization without an increase in liquidation risks.

It's also important to keep in mind that in-range position for liquid pairs actively generate LP fees, which have a strictly positive impact on the position valuation.

PreviousSystem configurationsNextUser flow examples

Last updated 1 year ago

Here is an awesome open-source tool for comparing expected performance and valuation of Uniswap V3 LP positions -

🏦
https://defi-lab.xyz/uniswapv3simulator
Comparison between valuation of 100% ETH HODL and WETH/BOB Uniswap V3 LP strategies.