Depositing and Borrowing

Deposit

In order to borrow (or mint) cUSD, users must first deposit one of the available tokens as collateral. Depending on the LTV specified for a given token posted as collateral, users can borrow different amounts of cUSD based on the risk they choose to take on, as demonstrated by the user's health factor.

The health factor is determined by the USD value of the posted collateral, the liquidation threshold, and the USD value of cUSD borrowed. A position with a health factor less than 1 is liquidatable and a position with a health factor greater than or equal to 1 is deemed healthy. The equation for health factor is as follows:

Health Factor = $collateral x liquidation threshold / $borrowed

After depositing, the specified collateral will be held by the smart contract until the user initiates a withdraw.

Example:

  • User deposits 20 USDC and wants to borrow 10 cUSD.

  • In this case, this user’s health factor is equal to 20 * 0.96 / 10 = 1.92

  • If this user had deposited 40 USDC to borrow 10 cUSD, this user’s health factor would be equal to 40 * 0.96 / 10 = 3.84

  • If the user deposits 20 USDC and wants to borrow 5 cUSD, this user’s health factor would be equal to 20 * 0.96 / 5 = 3.84

The example above also illustrates how a user's health factor increases proportionally by the USD value of the deposit relative to the amount borrowed.

Borrow

After a user has deposited collateral, they are able to borrow (mint) cUSD. The amount of cUSD a user can mint depends on the USD value of the collateral deposited.

Example:

  • User deposits 10 USDC and wants to borrow 4 cUSD.

  • In this case, this user’s health factor is equal to 10 * 0.96 / 4 = 2.4

  • If the user had borrowed 8 cUSD with 10 USDC deposited, this user’s health factor would be equal to 10 * 0.96 / 8 = 1.2

When borrowing, the above example also illustrates how a user’s health factor decreases proportionally to the amount being borrowed.

There are a couple things to take note of when borrowing:

  1. If the collateral has a mint fee, this fee will be charged upfront. For instance, if the mint fee is 1%, when a user wants to borrow 100 cUSD, they will only receive 100 * (1 - 0.01) = 99 cUSD.

  2. The amount a user can borrow cannot exceed the max debt ratio for that collateral. Meaning if a collateral has a max debt ratio of 50% and the user deposited $10 of collateral, the maximum they can borrow against this collateral is 10 * 0.5 = 5 cUSD.

  3. If the mint limit is at capacity, then no additional cUSD can be minted with that collateral. This is to protect the protocol against risks of insolvency.

Step-by-step guide to depositing collateral and borrowing cUSD:

  1. Choose a token to post as collateral on the cUSD Markets page. For example, a user chooses to post USDC as collateral.

  2. The user determines the amount of cUSD they want to borrow. The minimum USD value of the chosen collateral that needs to be deposited to borrow a specified amount of cUSD will differ for each collateral based on its LTV ratio. The user wants to borrow 1 cUSD by posting USDC as collateral, so given USDC’s LTV ratio of 95%, the user would have to deposit a minimum of 1.052 USDC as collateral.

  3. Determine the amount of collateral you want to deposit based on the health factor you want to take on. As a reminder, a higher health factor decreases the chances of your position being liquidatable. The user wants to take on a health factor equal to 3, so the user will post 3.125 USDC as collateral to borrow 1 cUSD.

  4. The user clicks on approve and confirms the transaction on their respective wallet.

Last updated