Protection
Protection Structures
Protection Struct
This struct represents information related to a protection provided by Concrete protocol associated with a loan.
This information is set in SetProtectionDataAction
(link pending)
Pointer: USER_ID_PROTECTIONID
Definition
struct Protection {
uint256 protectionId;
uint256 openingFee;
bool active;
uint256 cancellationFee;
uint256 startDate;
ProtectionStatus protectionStatus;
uint256 ltvProtect;
}
Fields
protectionId
: A unique identifier for the protection associated with a loan.openingFee
: The fee in USD associated with initiating the protection agreement.active
: A boolean flag indicating whether the protection is currently active.cancellationFee
: The fee in USD incurred in case of cancellation of the protection.startDate
: The timestamp indicating when the protection was created.protectionStatus
: see ProtectionStatus.
ProtectionStatus Enum
An enum representing the current status of the protection.
Definition
enum ProtectionStatus {
OPEN,
CLOSED,
LTV_PROTECT
}
ProtectionUpdate Struct
This struct provides information related to the available credit and end date of a protection.
This information is set in SetProtectionUpdateAction
(link pending)
Pointer: USER_ID_PROTECTION_UPDATES
Definition
struct ProtectionUpdate {
uint256 endDate;
uint256 availableCredit;
}
Fields
endDate
: The end date of the protection.avaliableCredit
: The amount of available credit of the protection in USD.
UpdateField Enum
An enum representing the field to be updated in ProtectionUpdate
.
This value is send as an argument in UpdateProtectionAction
(link pending).
Definition
enum UpdateField {
END_DATE,
AVAILABLE_CREDIT,
ALL
}
Values
END_DATE
: UpdatesendDate
.AVAILABLE_CREDIT
: UpdatesavaliableCredit
.ALL
:Updates both fields.
ProtectionFinancialTerms Struct
This struct provides financial parameters to govern the protection coverage associated with a loan. Each tranche is utilized and supplied as collateral each time the LTV ratio reaches an unhealthy value. If no tranche is available, the loan is foreclosed.
This information is set in SetProtectionFinancialTermsAction
(link pending)
Pointer: USER_ID_PROTECTION_FINANCIAL_TERMS
Definition
struct ProtectionFinancialTerms {
uint256 totalCreditOffered;
uint256 totalNumberOfTokens;
uint256 singleTokenPrice;
uint256 trancheOneAmount;
uint256 trancheOneFee;
uint256 trancheTwoAmount;
uint256 trancheTwoFee;
uint256 trancheThreeAmount;
uint256 trancheThreeFee;
}
Fields
totalCreditOffered
: The total credit amount offered for the protection in USD.totalNumberOfTokens
: The total number of tokens associated with the protection.singleTokenPrice
: The price of 1 single token in USD.trancheOneAmount
: The amount in USD associated with the first tranche of protection.trancheOneFee
(uint256): The fee in USD for utilizing the first tranche of protection.trancheTwoAmount
: The amount in USD associated with the second tranche of protection.trancheTwoFee
: The fee in USD for utilizing the second tranche of protection.trancheThreeAmount
: The amount in USD associated with the third tranche of protection.trancheThreeFee
: The fee in USD for utilizing the third tranche of protection.
UpdateFinancialTermsField Enum
An enum representing the field to be updated in ProtectionFinancialTerms
.
This value is send as an argument in UpdateProtectionFinancialTermsAction
(link pending).
Definition
enum UpdateFinancialTermsField {
TRANCHE_ONE_AMOUNT,
TRANCHE_TWO_AMOUNT,
TRANCHE_THREE_AMOUNT,
ALL
}
Values
TRANCHE_ONE_AMOUNT
: UpdatestrancheOneAmount
.TRANCHE_TWO_AMOUNT
: UpdatestrancheTwoAmount
.TRANCHE_THREE_AMOUNT
: UpdatestrancheThreeAmount
.ALL
:Updates all three fields.
Last updated