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
  • Open a vault
  • Depositing collateral
  • Borrow BOB
  • Repay BOB
  • Withdraw collateral
  • Observe liquidation
  1. BOB CDP

User flow examples

PreviousVault healthNextTechnical docs

Last updated 1 year ago

In order to fully understand how different parameters impact the system, and what can happen to a position over time, let's look at a specific example.

Open a vault

A vault is the basic building block within BOB CDP. Start using the protocol by opening an empty vault.

Opening a new vault is straightforward from the UI and requires a single on-chain transaction.

Depositing collateral

The borrower should already have a Uniswap V3 position. In this example, the borrower has a position for WETH/USDC, valued at 10,000$ with the current price for ETH at 1750$

The borrower can easily deposit their Uniswap V3 position into the newly created vault by authorizing an on-chain transaction through their wallet.

Once the collateral is deposited, the borrower can see their vault status, the amount of locked collateral, and their max available borrow amount.

The user's position has a current value of 10,000$, while the borrow threshold for the chosen collateral is set to 60%, which means that the maximum available borrow amount is 10,000$ * 60% = 6,000 BOB.

Borrow BOB

Once the vault has some locked collateral, a borrower can freely mint collateralized BOB tokens, up to the maximum configured borrow limit of 6,000 BOB.

Minting debt decreases the borrower's vault health factor. By minting 5,000 BOB, the borrower ends up with a vault health factor of 140%.

Repay BOB

Once the borrower is ready to repay their loan, they can do so at any time, either by repaying the full amount, or a fraction of both loan principal and accumulated interest.

Here the borrower repays half the loan - 2,501 BOB.

As a result of a successful repayment, the vault health factor has doubled to 280%.

Withdraw collateral

Once the loan has been fully repaid, the borrower is able to claim back the deposited collateral.

Observe liquidation

In the unfortunate event of vault liquidation, the borrower's debt would be fully repaid by an external party, with the vault's collateral seized in favor of liquidator. The owner of the liquidated vault will see the corresponding message in the UI:

Depending on the price of the collateral at the time of the liquidation, the borrower may be eligible to claim the remaining BOB after a successful liquidation.

In the example LP positions are used which may not be currently supported. Check for up-to-date positions which can be used with BOB CDP.

🏘️
Collaterals
Empty newly opened vault
Collateral deposit pop-up
Empty vault with locked collateral
Borrow 5,000 BOB
Vault health after successfull debt mint
Repaying half of the active loan
Vault health after successfull repayment
Withdraw locked collateral after full-repayment
Post-liquidation message