Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BSIP70: Harmonizing early loan closure #206

Merged
merged 1 commit into from
Sep 10, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions bsip-0070.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ Both potential lenders and potential borrowers can place offers on the Loan Orde
|<div id="loan-offer-margin-call-collateral-ratio"/>Margin call collateral ratio (MCCR)|The _minimum_ collateral ratio below which [a margin call of the loan is initiated](#process-margin-call-initiation). MCR &ge; MCCR &ge; 1|
|<div id="loan-offer-margin-call-duration"/>_Maximum_ duration of margin call|The _maximum_ duration of a [margin call](#process-margin-call), if one is necessary, after which a [portfolio confiscation](#process-portfolio-confiscation) will be triggered.|
|<div id="loan-offer-tradable-asset"/> Asset type to trade against (Tradable asset)|The asset type that the lender permits the borrower to trade against. This restriction protects the lender from exit scam trading.|
|<div id="loan-offer-minimum-duration"/>_Minimum_ duration of loan|The _minimum_ duration of the loan that the lender is willing to accept. The loan may still be closed early during Stage 5.|
|<div id="loan-offer-minimum-duration"/>_Minimum_ duration of loan|The _minimum_ duration of the loan that the lender is willing to accept.|
|<div id="loan-offer-maximum-duration"/>_Maximum_ duration of loan|The _maximum_ duration of the loan that the lender is willing to accept|
|<div id="loan-offer-interest-rate"/>Minimum interest rate|The _minimum_ daily interest rate that the lender is willing to accept|
|Expiration date|Expiration date of the offer|
Expand All @@ -146,7 +146,7 @@ Borrow offers contain the following parameters:
|<div id="borrow-offer-margin-call-collateral-ratio"/>Margin call collateral ratio (MCCR)|The _maximum_ collateral ratio below which [a margin call of the loan is initiated](#process-margin-call-initiation). MCR &ge; MCCR &ge; 1|
|<div id="borrow-offer-margin-call-duration"/>_Minimum_ duration of margin call protection|The _minimum_ duration of a [margin call](#process-margin-call), if one is necessary, after which a [portfolio confiscation](#process-portfolio-confiscation) will be triggered.|
|<div id="borrow-offer-tradable-asset"/> Asset type to trade against (Tradable asset)|The asset type that the borrower can trade against.|
|<div id="borrow-offer-minimum-duration"/>_Minimum_ duration of loan|The _minimum_ duration of the loan that the borrower is willing to accept. The loan may still be closed early during Stage 5.|
|<div id="borrow-offer-minimum-duration"/>_Minimum_ duration of loan|The _minimum_ duration of the loan that the borrower is willing to accept.|
|<div id="borrow-offer-maximum-duration"/>_Maximum_ duration of loan|The _maximum_ duration of the loan that the borrower is willing to accept|
|<div id="borrow-offer-interest-rate"/>_Maximum_ interest rate|The _maximum_ daily interest rate that the borrower is willing to accept|
|Expiration date|Expiration date of the offer|
Expand Down Expand Up @@ -235,11 +235,11 @@ This loan portfolio shall then become available for [margin trading by the borro

#### <div id="loan-duration" /> Effective Dates of the Loan

The start date of the loan shall be when the loan is matched. The end date of the loan shall be calculated by adding the loan duration to the start date. The loan may be closed:
The start date of the loan shall be when the loan is matched. The _earliest end date_ of the loan shall be calculated by adding the minimum loan duration, that is compatible with the matched [loan offer](#loan-offer-minimum-duration) and [borrow offer](#borrow-offer-minimum-duration), to the start date. The _latest end date_ of the loan shall be calculated by adding the maximum loan duration, that is compatible with the matched [loan offer](#loan-offer-maximum-duration) and [borrow offer](#borrow-offer-maximum-duration), to the start date. The loan may be closed:

- [by the borrower before the end date](#process-loan-closure),
- [by the smart contract when the end date arrives](#process-loan-expiration), or
- [by the smart contract before the end date if the loan portfolio is undervalued](#process-margin-call-initiation).
- [by the borrower](#process-loan-closure) on or after the _earliest_ end date and before the _latest_ end date,
- [by the smart contract when the _latest_ end date arrives](#process-loan-expiration), or
- [by the smart contract any time before the _latest_ end date if the loan portfolio is undervalued](#process-margin-call-initiation).

#### <div id="offer-filling"/> Filling of Loan Offer

Expand Down Expand Up @@ -467,7 +467,7 @@ Bob may withdraw bitBTC up to this limit because the balance of bitBTC, 0.025, e

## <div id="process-loan-closure-initiation" /> Stage 5a: Initiation of Loan Closure by Borrower

A borrower may close an outstanding loan position _any time before loan expiry_ by having a [sufficient balance of the borrowed asset type](#process-loan-closure) in the loan portfolio and then initiating a loan closure with the appropriate parameters.
A borrower may close an outstanding loan position _any time between [the earliest end date and the latest end date](#loan-duration)_ by having a [sufficient balance of the borrowed asset type](#process-loan-closure) in the loan portfolio and then initiating a loan closure with the appropriate parameters.

|Initiation of Loan Closure Parameter|Description|
|-|-|
Expand Down