:-------: | :-----------: | ----------- |
| 0 | `amount_` | `uint256` | `uint256` | |
### `ImpairmentRemoved`
```solidity
event ImpairmentRemoved(
uint256 nextPaymentDueDate_
);
```
#### Parameters:
| Index | Name | Type | Internal Type | Description |
| :---: | :-------------------: | :-------: | :-----------: | ----------- |
| 0 | `nextPaymentDueDate_` | `uint256` | `uint256` | |
### `Initialized`
```solidity
event Initialized(
address borrower_,
address lender_,
address feeManager_,
address[2] assets_,
uint256[3] termDetails_,
uint256[3] amounts_,
uint256[4] rates_,
uint256[2] fees_
);
```
#### Parameters:
| Index | Name | Type | Internal Type | Description |
| :---: | :------------: | :----------: | :-----------: | ----------- |
| 0 | `borrower_` | `address` | `address` | |
| 1 | `lender_` | `address` | `address` | |
| 2 | `feeManager_` | `address` | `address` | |
| 3 | `assets_` | `address[2]` | `address[2]` | |
| 4 | `termDetails_` | `uint256[3]` | `uint256[3]` | |
| 5 | `amounts_` | `uint256[3]` | `uint256[3]` | |
| 6 | `rates_` | `uint256[4]` | `uint256[4]` | |
| 7 | `fees_` | `uint256[2]` | `uint256[2]` | |
### `LenderAccepted`
```solidity
event LenderAccepted(
address lender_
);
```
#### Parameters:
| Index | Name | Type | Internal Type | Description |
| :---: | :-------: | :-------: | :-----------: | ----------- |
| 0 | `lender_` | `address` | `address` | |
### `LoanClosed`
```solidity
event LoanClosed(
uint256 principalPaid_,
uint256 interestPaid_,
uint256 feesPaid_
);
```
#### Parameters:
| Index | Name | Type | Internal Type | Description |
| :---: | :--------------: | :-------: | :-----------: | ----------- |
| 0 | `principalPaid_` | `uint256` | `uint256` | |
| 1 | `interestPaid_` | `uint256` | `uint256` | |
| 2 | `feesPaid_` | `uint256` | `uint256` | |
### `LoanImpaired`
```solidity
event LoanImpaired(
uint256 nextPaymentDueDate_
);
```
#### Parameters:
| Index | Name | Type | Internal Type | Description |
| :---: | :-------------------: | :-------: | :-----------: | ----------- |
| 0 | `nextPaymentDueDate_` | `uint256` | `uint256` | |
### `NewTermsAccepted`
```solidity
event NewTermsAccepted(
bytes32 refinanceCommitment_,
address refinancer_,
uint256 deadline_,
bytes[] calls_
);
```
#### Parameters:
| Index | Name | Type | Internal Type | Description |
| :---: | :--------------------: | :-------: | :-----------: | ----------- |
| 0 | `refinanceCommitment_` | `bytes32` | `bytes32` | |
| 1 | `refinancer_` | `address` | `address` | |
| 2 | `deadline_` | `uint256` | `uint256` | |
| 3 | `calls_` | `bytes[]` | `bytes[]` | |
### `NewTermsProposed`
```solidity
event NewTermsProposed(
bytes32 refinanceCommitment_,
address refinancer_,
uint256 deadline_,
bytes[] calls_
);
```
#### Parameters:
| Index | Name | Type | Internal Type | Description |
| :---: | :--------------------: | :-------: | :-----------: | ----------- |
| 0 | `refinanceCommitment_` | `bytes32` | `bytes32` | |
| 1 | `refinancer_` | `address` | `address` | |
| 2 | `deadline_` | `uint256` | `uint256` | |
| 3 | `calls_` | `bytes[]` | `bytes[]` | |
### `NewTermsRejected`
```solidity
event NewTermsRejected(
bytes32 refinanceCommitment_,
address refinancer_,
uint256 deadline_,
bytes[] calls_
);
```
#### Parameters:
| Index | Name | Type | Internal Type | Description |
| :---: | :--------------------: | :-------: | :-----------: | ----------- |
| 0 | `refinanceCommitment_` | `bytes32` | `bytes32` | |
| 1 | `refinancer_` | `address` | `address` | |
| 2 | `deadline_` | `uint256` | `uint256` | |
| 3 | `calls_` | `bytes[]` | `bytes[]` | |
### `PaymentMade`
```solidity
event PaymentMade(
uint256 principalPaid_,
uint256 interestPaid_,
uint256 fees_
);
```
#### Parameters:
| Index | Name | Type | Internal Type | Description |
| :---: | :--------------: | :-------: | :-----------: | ----------- |
| 0 | `principalPaid_` | `uint256` | `uint256` | |
| 1 | `interestPaid_` | `uint256` | `uint256` | |
| 2 | `fees_` | `uint256` | `uint256` | |
### `PendingBorrowerSet`
```solidity
event PendingBorrowerSet(
address pendingBorrower_
);
```
#### Parameters:
| Index | Name | Type | Internal Type | Description |
| :---: | :----------------: | :-------: | :-----------: | ----------- |
| 0 | `pendingBorrower_` | `address` | `address` | |
### `PendingLenderSet`
```solidity
event PendingLenderSet(
address pendingLender_
);
```
#### Parameters:
| Index | Name | Type | Internal Type | Description |
| :---: | :--------------: | :-------: | :-----------: | ----------- |
| 0 | `pendingLender_` | `address` | `address` | |
### `Repossessed`
```solidity
event Repossessed(
uint256 collateralRepossessed_,
uint256 fundsRepossessed_,
address destination_
);
```
#### Parameters:
| Index | Name | Type | Internal Type | Description |
| :---: | :----------------------: | :-------: | :-----------: | ----------- |
| 0 | `collateralRepossessed_` | `uint256` | `uint256` | |
| 1 | `fundsRepossessed_` | `uint256` | `uint256` | |
| 2 | `destination_` | `address` | `address` | |
### `Skimmed`
```solidity
event Skimmed(
address token_,
uint256 amount_,
address destination_
);
```
#### Parameters:
| Index | Name | Type | Internal Type | Description |
| :---: | :------------: | :-------: | :-----------: | ----------- |
| 0 | `token_` | `address` | `address` | |
| 1 | `amount_` | `uint256` | `uint256` | |
| 2 | `destination_` | `address` | `address` | |
# FixedTermLoanManager
## Functions
### `HUNDRED_PERCENT`
Returns the value considered as the hundred percent.
```solidity
function HUNDRED_PERCENT()
view
returns (
uint256
);
```
#### Return Values:
| Index | Name | Type | Internal Type | Description |
| :---: | :--: | :-------: | :-----------: | ----------- |
| 0 | | `uint256` | `uint256` | |
### `PRECISION`
Returns the precision used for the contract.
```solidity
function PRECISION()
view
returns (
uint256
);
```
#### Return Values:
| Index | Name | Type | Internal Type | Description |
| :---: | :--: | :-------: | :-----------: | ----------- |
| 0 | | `uint256` | `uint256` | |
### `acceptNewTerms`
Accepts new loan terms triggering a loan refinance.
```solidity
function acceptNewTerms(
address loan_,
address refinancer_,
uint256 deadline_,
bytes[] calls_,
uint256 principalIncrease_
)
nonpayable;
```
#### Parameters:
| Index | Name | Type | Internal Type | Description |
| :---: | :------------------: | :-------: | :-----------: | ------------------------------------------ |
| 0 | `loan_` | `address` | `address` | Loan to be refinanced. |
| 1 | `refinancer_` | `address` | `address` | The address of the refinancer. |
| 2 | `deadline_` | `uint256` | `uint256` | The new deadline to execute the refinance. |
| 3 | `calls_` | `bytes[]` | `bytes[]` | The encoded calls to set new loan terms. |
| 4 | `principalIncrease_` | `uint256` | `uint256` | The increase in principal. |
### `accountedInterest`
Gets the amount of accounted interest.
```solidity
function accountedInterest()
view
returns (
uint112
);
```
#### Return Values:
| Index | Name | Type | Internal Type | Description |
| :---: | :--: | :-------: | :-----------: | ----------- |
| 0 | | `uint112` | `uint112` | |
### `accruedInterest`
Gets the amount of accrued interest up until this point in time.
```solidity
function accruedInterest()
view
returns (
uint256 accruedInterest_
);
```
#### Return Values:
| Index | Name | Type | Internal Type | Description |
| :---: | :----------------: | :-------: | :-----------: | ----------------------------------------------------------- |
| 0 | `accruedInterest_` | `uint256` | `uint256` | The amount of accrued interest up until this point in time. |
### `allowedSlippageFor`
Gets allowed slippage for a give collateral asset.
```solidity
function allowedSlippageFor(
address
)
view
returns (
uint256
);
```
#### Parameters:
| Index | Name | Type | Internal Type | Description |
| :---: | :--: | :-------: | :-----------: | ----------- |
| 0 | \`\` | `address` | `address` | |
#### Return Values:
| Index | Name | Type | Internal Type | Description |
| :---: | :--: | :-------: | :-----------: | ----------- |
| 0 | | `uint256` | `uint256` | |
### `assetsUnderManagement`
Gets the amount of assets under the management of the contract.
```solidity
function assetsUnderManagement()
view
returns (
uint256 assetsUnderManagement_
);
```
#### Return Values:
| Index | Name | Type | Internal Type | Description |
| :---: | :----------------------: | :-------: | :-----------: | ---------------------------------------------------------- |
| 0 | `assetsUnderManagement_` | `uint256` | `uint256` | The amount of assets under the management of the contract. |
### `claim`
Called by loans when payments are made, updating the accounting.
```solidity
function claim(
uint256 principal_,
uint256 interest_,
uint256 previousPaymentDueDate_,
uint256 nextPaymentDueDate_
)
nonpayable;
```
#### Parameters:
| Index | Name | Type | Internal Type | Description |
| :---: | :-----------------------: | :-------: | :-----------: | ------------------------------ |
| 0 | `principal_` | `uint256` | `uint256` | The amount of principal paid. |
| 1 | `interest_` | `uint256` | `uint256` | The amount of interest paid. |
| 2 | `previousPaymentDueDate_` | `uint256` | `uint256` | The previous payment due date. |
| 3 | `nextPaymentDueDate_` | `uint256` | `uint256` | The new payment due date. |
### `domainEnd`
Gets the timestamp of the domain end.
```solidity
function domainEnd()
view
returns (
uint48
);
```
#### Return Values:
| Index | Name | Type | Internal Type | Description |
| :---: | :--: | :------: | :-----------: | ----------- |
| 0 | | `uint48` | `uint48` | |
### `domainStart`
Gets the timestamp of the domain start.
```solidity
function domainStart()
view
returns (
uint48
);
```
#### Return Values:
| Index | Name | Type | Internal Type | Description |
| :---: | :--: | :------: | :-----------: | ----------- |
| 0 | | `uint48` | `uint48` | |
### `factory`
The address of the proxy factory.
```solidity
function factory()
view
returns (
address factory_
);
```
#### Return Values:
| Index | Name | Type | Internal Type | Description |
| :---: | :--------: | :-------: | :-----------: | ----------- |
| 0 | `factory_` | `address` | `address` | |
### `finishCollateralLiquidation`
Finishes the collateral liquidation.
```solidity
function finishCollateralLiquidation(
address loan_
)
nonpayable
returns (
uint256 remainingLosses_,
uint256 platformFees_
);
```
#### Parameters:
| Index | Name | Type | Internal Type | Description |
| :---: | :-----: | :-------: | :-----------: | ---------------------------------------- |
| 0 | `loan_` | `address` | `address` | Loan that had its collateral liquidated. |
#### Return Values:
| Index | Name | Type | Internal Type | Description |
| :---: | :----------------: | :-------: | :-----------: | ------------------------------- |
| 0 | `remainingLosses_` | `uint256` | `uint256` | The amount of remaining losses. |
| 1 | `platformFees_` | `uint256` | `uint256` | The amount of platform fees. |
### `fund`
Funds a new loan.
```solidity
function fund(
address loan_
)
nonpayable;
```
#### Parameters:
| Index | Name | Type | Internal Type | Description |
| :---: | :-----: | :-------: | :-----------: | ------------------ |
| 0 | `loan_` | `address` | `address` | Loan to be funded. |
### `fundsAsset`
Gets the address of the funds asset.
```solidity
function fundsAsset()
view
returns (
address
);
```
#### Return Values:
| Index | Name | Type | Internal Type | Description |
| :---: | :--: | :-------: | :-----------: | ----------- |
| 0 | | `address` | `address` | |
### `getExpectedAmount`
Gets the expected amount of an asset given the input amount.
```solidity
function getExpectedAmount(
address collateralAsset_,
uint256 swapAmount_
)
view
returns (
uint256 returnAmount_
);
```
#### Parameters:
| Index | Name | Type | Internal Type | Description |
| :---: | :----------------: | :-------: | :-----------: | ---------------------------------------------- |
| 0 | `collateralAsset_` | `address` | `address` | The collateral asset that is being liquidated. |
| 1 | `swapAmount_` | `uint256` | `uint256` | The swap amount of collateral asset. |
#### Return Values:
| Index | Name | Type | Internal Type | Description |
| :---: | :-------------: | :-------: | :-----------: | ----------------------------------------- |
| 0 | `returnAmount_` | `uint256` | `uint256` | The desired return amount of funds asset. |
### `governor`
```solidity
function governor()
view
returns (
address governor_
);
```
#### Return Values:
| Index | Name | Type | Internal Type | Description |
| :---: | :---------: | :-------: | :-----------: | ----------- |
| 0 | `governor_` | `address` | `address` | |
### `impairLoan`
Triggers the loan impairment for a loan.
```solidity
function impairLoan(
address loan_
)
nonpayable;
```
#### Parameters:
| Index | Name | Type | Internal Type | Description |
| :---: | :-----: | :-------: | :-----------: | ------------------------------------ |
| 0 | `loan_` | `address` | `address` | Loan to trigger the loan impairment. |
### `implementation`
The address of the implementation contract being proxied.
```solidity
function implementation()
view
returns (
address implementation_
);
```
#### Return Values:
| Index | Name | Type | Internal Type | Description |
| :---: | :---------------: | :-------: | :-----------: | ----------- |
| 0 | `implementation_` | `address` | `address` | |
### `isLiquidationActive`
Returns whether or not a liquidation is in progress.
```solidity
function isLiquidationActive(
address loan_
)
view
returns (
bool isActive_
);
```
#### Parameters:
| Index | Name | Type | Internal Type | Description |
| :---: | :-----: | :-------: | :-----------: | --------------------------------- |
| 0 | `loan_` | `address` | `address` | The address of the loan contract. |
#### Return Values:
| Index | Name | Type | Internal Type | Description |
| :---: | :---------: | :----: | :-----------: | ------------------------------------- |
| 0 | `isActive_` | `bool` | `bool` | True if a liquidation is in progress. |
### `issuanceRate`
Gets the current issuance rate.
```solidity
function issuanceRate()
view
returns (
uint256
);
```
#### Return Values:
| Index | Name | Type | Internal Type | Description |
| :---: | :--: | :-------: | :-----------: | ----------- |
| 0 | | `uint256` | `uint256` | |
### `liquidationInfo`
Gets the information for a liquidation.
```solidity
function liquidationInfo(
address
)
view
returns (
bool triggeredByGovernor,
uint128 principal,
uint120 interest,
uint256 lateInterest,
uint96 platformFees,
address liquidator
);
```
#### Parameters:
| Index | Name | Type | Internal Type | Description |
| :---: | :--: | :-------: | :-----------: | ----------- |
| 0 | \`\` | `address` | `address` | |
#### Return Values:
| Index | Name | Type | Internal Type | Description |
| :---: | :-------------------: | :-------: | :-----------: | ------------------------------------------------------ |
| 0 | `triggeredByGovernor` | `bool` | `bool` | True if the liquidation was triggered by the governor. |
| 1 | `principal` | `uint128` | `uint128` | The amount of principal to be recovered. |
| 2 | `interest` | `uint120` | `uint120` | The amount of interest to be recovered. |
| 3 | `lateInterest` | `uint256` | `uint256` | The amount of late interest to be recovered. |
| 4 | `platformFees` | `uint96` | `uint96` | The amount of platform fees owed. |
| 5 | `liquidator` | `address` | `address` | The address of the liquidator. |
### `migrate`
Modifies the proxy's storage by delegate-calling a migrator contract with some arguments. Access control logic critical since caller can force a selfdestruct via a malicious \`migrator\_\` which is delegatecalled.
```solidity
function migrate(
address migrator_,
bytes arguments_
)
nonpayable;
```
#### Parameters:
| Index | Name | Type | Internal Type | Description |
| :---: | :----------: | :-------: | :-----------: | ------------------------------------------------ |
| 0 | `migrator_` | `address` | `address` | The address of a migrator contract. |
| 1 | `arguments_` | `bytes` | `bytes` | Some encoded arguments to use for the migration. |
### `minRatioFor`
Gets the minimum ratio for a collateral asset.
```solidity
function minRatioFor(
address
)
view
returns (
uint256
);
```
#### Parameters:
| Index | Name | Type | Internal Type | Description |
| :---: | :--: | :-------: | :-----------: | ----------- |
| 0 | \`\` | `address` | `address` | |
#### Return Values:
| Index | Name | Type | Internal Type | Description |
| :---: | :--: | :-------: | :-----------: | ----------- |
| 0 | | `uint256` | `uint256` | |
### `paymentCounter`
Gets the payment counter.
```solidity
function paymentCounter()
view
returns (
uint24
);
```
#### Return Values:
| Index | Name | Type | Internal Type | Description |
| :---: | :--: | :------: | :-----------: | ----------- |
| 0 | | `uint24` | `uint24` | |
### `paymentIdOf`
Gets the payment if for the given loan.
```solidity
function paymentIdOf(
address
)
view
returns (
uint24
);
```
#### Parameters:
| Index | Name | Type | Internal Type | Description |
| :---: | :--: | :-------: | :-----------: | ----------- |
| 0 | \`\` | `address` | `address` | |
#### Return Values:
| Index | Name | Type | Internal Type | Description |
| :---: | :--: | :------: | :-----------: | ----------- |
| 0 | | `uint24` | `uint24` | |
### `payments`
Gets the information for a payment.
```solidity
function payments(
uint256
)
view
returns (
uint24 platformManagementFeeRate,
uint24 delegateManagementFeeRate,
uint48 startDate,
uint48 paymentDueDate,
uint128 incomingNetInterest,
uint128 refinanceInterest,
uint256 issuanceRate
);
```
#### Parameters:
| Index | Name | Type | Internal Type | Description |
| :---: | :--: | :-------: | :-----------: | ----------- |
| 0 | \`\` | `uint256` | `uint256` | |
#### Return Values:
| Index | Name | Type | Internal Type | Description |
| :---: | :-------------------------: | :-------: | :-----------: | ----------------------------------------------- |
| 0 | `platformManagementFeeRate` | `uint24` | `uint24` | The value for the platform management fee rate. |
| 1 | `delegateManagementFeeRate` | `uint24` | `uint24` | The value for the delegate management fee rate. |
| 2 | `startDate` | `uint48` | `uint48` | The start date of the payment. |
| 3 | `paymentDueDate` | `uint48` | `uint48` | The timestamp of the payment due date. |
| 4 | `incomingNetInterest` | `uint128` | `uint128` | The amount of incoming net interest. |
| 5 | `refinanceInterest` | `uint128` | `uint128` | The amount of refinance interest. |
| 6 | `issuanceRate` | `uint256` | `uint256` | The issuance rate for the loan. |
### `paymentWithEarliestDueDate`
Gets the payment id with the earliest due date.
```solidity
function paymentWithEarliestDueDate()
view
returns (
uint24
);
```
#### Return Values:
| Index | Name | Type | Internal Type | Description |
| :---: | :--: | :------: | :-----------: | ----------- |
| 0 | | `uint24` | `uint24` | |
### `poolDelegate`
```solidity
function poolDelegate()
view
returns (
address poolDelegate_
);
```
#### Return Values:
| Index | Name | Type | Internal Type | Description |
| :---: | :-------------: | :-------: | :-----------: | ----------- |
| 0 | `poolDelegate_` | `address` | `address` | |
### `poolManager`
Gets the address of the pool manager.
```solidity
function poolManager()
view
returns (
address
);
```
#### Return Values:
| Index | Name | Type | Internal Type | Description |
| :---: | :--: | :-------: | :-----------: | ----------- |
| 0 | | `address` | `address` | |
프로젝트로 돌아가기