User flow examples

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.
Empty newly opened vault

Depositing collateral

In the example LP positions are used which may not be currently supported. Check Collaterals for up-to-date positions which can be used with BOB CDP.
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$
Collateral deposit pop-up
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.
Empty vault with locked collateral
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.
Borrow 5,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%.
Vault health after successfull debt mint

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.
Repaying half of the active loan
As a result of a successful repayment, the vault health factor has doubled to 280%.
Vault health after successfull repayment

Withdraw collateral

Once the loan has been fully repaid, the borrower is able to claim back the deposited collateral.
Withdraw locked collateral after full-repayment

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:
Post-liquidation message
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.