Double Click to Zoom
There is a Liquidity Providers’ Pool (LPP) instance per denomination that serves all borrow requests and repayments in that same denomination. LPP calculates the total principal and interest due and keeps details of the opened loans. Each LPP instance calculates a fixed interest rate on a borrow request and a total liability amount. LPPs do not deal with currencies other than the LPP native one, LPN.
All lease positions are created by the Leaser contract, which acts as a smart contract factory. One Leaser is connected to one LPP and, therefore, to one stablecoin currency, the liquidity pool’s native currency, LPN. If a user wants to borrow USDC, they need to ask for the Leaser contract connected to the LPP with USDC as an LPN.
The Leaser smart contract is configured with the following parameters:
Parameter | Definition |
---|---|
Code ID | The ID of the Lease smart contract is used when initializing new Lease contracts. |
LPP address | The address of the LPP Smart Contract for the given LPN currency. |
Lease interest rate margin | The interest rate that goes to the protocol to perform buybacks, for example, 3%. |
Lease max liability | This will cause a liquidation, for example, 90%. |
Lease healthy liability | The percentage threshold must be less than the Lease max liability. It will act as the desired liability when liquidation happens. For example, it may be 83%. |
Lease initial liability | It’s the maximum possible loan-to-value (LTV) margin indicator determined at the opening of the Lease and is less than the healthy liability. For instance, it may be 60%. |
Period length | А representation of a period in seconds. For example, $90\ days = 902460*60$. |
Interest due | This is the date interest is due on an open lease contract. |
Grace period | This is the period during which a user with an open lease will be allowed not to pay the interest due. For example, $10\ days = 102460*60$. |
Liability reevaluation | Determines how often the invariant “liability covered” is re-evaluated. This is the period between two reevaluations, for example, every 2 seconds. What is reevaluated is whether the liability at a given time is less than the maximum allowed liability. The interest accrued for the next period is included in the market price calculation that triggers a liquidation. |
First liquidation warning liability percentage | Used for liquidation warnings and is the first out of three. It must be less than the second liquidation warning liability percentage. For example, 83.5%. |
Second liquidation warning liability percentage | Must be less than the second liquidation warning liability percentage. For example, 85%. |
Third and final liquidation warning liability percentage | The third and final liquidation warning liability percentage - must be less than the max liability. For example, 87.5%. |
A mathematical representation of “liability covered”:
liability in LPN at a point of time < lease max liability * lease amount in LPN
Opening a new Lease is made via the Leaser by providing only the down payment. The maximum amount to be borrowed is based on the down payment and the initial liability percentage.
Lease stores the following data:
Customer → ****the address of the user requesting a loan;
Currency → ****the currency of the loan, LPN;
Current period → ****initially, this will be the first period, starting at the moment of loan creation and ending with the first interest due date;