Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Parameters of the protocol

This document outlines the key configurable parameters of the LendingProtocol. These values are critical for managing risk and defining the economic model of the protocol.

Interest Rate Model Parameters

These parameters define the interest rate model for USDC borrowing. The borrow rate is calculated based on the utilization of available liquidity.

usdc_base_borrow_rate

  • Description: The base borrow rate for USDC, representing the minimum annual percentage rate (APR) when there are zero borrows (0% utilization).

usdc_rate_multiplier

  • Description: A multiplier that determines how steeply the borrow rate increases as the utilization ratio increases. The formula is: borrow_rate = usdc_base_borrow_rate + (utilization_ratio * usdc_rate_multiplier).

Liquidation Parameters

These parameters govern the process of liquidation for undercollateralized loans.

liquidation_penalty

  • Description: The percentage fee applied to the value of collateral seized during a liquidation event. This penalty covers potential losses.

insurance_allocation_rate

  • Description: The portion of the liquidation_penalty that is allocated to the protocol’s insurance fund. The remaining portion of the penalty is paid to the liquidator as a fee.

Loan-to-Value (LTV) Ratio Parameters

LTV ratios are fundamental risk parameters that determine how much can be borrowed against collateral and when a position is considered risky.

Formula: total_borrow_value.div(total_collateral_value)

borrow_threshold

  • Description: The maximum Loan-to-Value (LTV) ratio for initiating a new borrow. For example, a value of 0.75 means a user can borrow up to 75% of their collateral’s value.

withdraw_threshold

  • Description: The maximum Loan-to-Value (LTV) ratio permitted after a collateral withdrawal. This prevents users from withdrawing collateral if it would leave their position undercollateralized. It is often set to the same value as `borrow_threshold

liquidation_threshold

  • Description: The Loan-to-Value (LTV) ratio at which a user’s position becomes eligible for liquidation. This value must be higher than the borrow_threshold to provide a safety buffer for borrowers.

Oracle Parameters

oracle_price_staleness_secs

  • Description: The maximum age (in seconds) of an asset price from an oracle before it is considered stale and no longer valid for protocol operations. This is a critical safety feature to prevent acting on outdated price information.