\
Returns the value considered as the hundred percent.
function HUNDRED_PERCENT()
view
returns (
uint256
);
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 | uint256 |
uint256 |
\
Returns the precision used for the contract.
function PRECISION()
view
returns (
uint256
);
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 | uint256 |
uint256 |
\
Accepts new loan terms triggering a loan refinance.
function acceptNewTerms(
address loan_,
address refinancer_,
uint256 deadline_,
bytes[] calls_,
uint256 principalIncrease_
)
nonpayable;
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. |
\
Gets the amount of accounted interest.
function accountedInterest()
view
returns (
uint112
);
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 | uint112 |
uint112 |
\
Gets the amount of accrued interest up until this point in time.
function accruedInterest()
view
returns (
uint256 accruedInterest_
);
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 | accruedInterest_ |
uint256 |
uint256 |
The amount of accrued interest up until this point in time. |
\
Gets allowed slippage for a give collateral asset.
function allowedSlippageFor(
address
)
view
returns (
uint256
);
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 | `` | address |
address |
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 | uint256 |
uint256 |
\
Gets the amount of assets under the management of the contract.
function assetsUnderManagement()
view
returns (
uint256 assetsUnderManagement_
);
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 | assetsUnderManagement_ |
uint256 |
uint256 |
The amount of assets under the management of the contract. |
\
Called by loans when payments are made, updating the accounting.
function claim(
uint256 principal_,
uint256 interest_,
uint256 previousPaymentDueDate_,
uint256 nextPaymentDueDate_
)
nonpayable;
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. |
\
Gets the timestamp of the domain end.
function domainEnd()
view
returns (
uint48
);
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 | uint48 |
uint48 |
\
Gets the timestamp of the domain start.
function domainStart()
view
returns (
uint48
);
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 | uint48 |
uint48 |
\
The address of the proxy factory.
function factory()
view
returns (
address factory_
);
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 | factory_ |
address |
address |
\
Finishes the collateral liquidation.
function finishCollateralLiquidation(
address loan_
)
nonpayable
returns (
uint256 remainingLosses_,
uint256 platformFees_
);
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 | loan_ |
address |
address |
Loan that had its collateral liquidated. |
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 | remainingLosses_ |
uint256 |
uint256 |
The amount of remaining losses. |
1 | platformFees_ |
uint256 |
uint256 |
The amount of platform fees. |
\
Funds a new loan.
function fund(
address loan_
)
nonpayable;
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 | loan_ |
address |
address |
Loan to be funded. |
\
Gets the address of the funds asset.
function fundsAsset()
view
returns (
address
);
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 | address |
address |
\
Gets the expected amount of an asset given the input amount.
function getExpectedAmount(
address collateralAsset_,
uint256 swapAmount_
)
view
returns (
uint256 returnAmount_
);
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. |
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 | returnAmount_ |
uint256 |
uint256 |
The desired return amount of funds asset. |
\
function governor()
view
returns (
address governor_
);
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 | governor_ |
address |
address |
\
Triggers the loan impairment for a loan.
function impairLoan(
address loan_
)
nonpayable;
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 | loan_ |
address |
address |
Loan to trigger the loan impairment. |
\
The address of the implementation contract being proxied.
function implementation()
view
returns (
address implementation_
);
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 | implementation_ |
address |
address |
\
Returns whether or not a liquidation is in progress.
function isLiquidationActive(
address loan_
)
view
returns (
bool isActive_
);
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 | loan_ |
address |
address |
The address of the loan contract. |
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 | isActive_ |
bool |
bool |
True if a liquidation is in progress. |
\
Gets the current issuance rate.
function issuanceRate()
view
returns (
uint256
);
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 | uint256 |
uint256 |
\
Gets the information for a liquidation.
function liquidationInfo(
address
)
view
returns (
bool triggeredByGovernor,
uint128 principal,
uint120 interest,
uint256 lateInterest,
uint96 platformFees,
address liquidator
);
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 | `` | address |
address |
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. |
\
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.
function migrate(
address migrator_,
bytes arguments_
)
nonpayable;
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. |
\
Gets the minimum ratio for a collateral asset.
function minRatioFor(
address
)
view
returns (
uint256
);
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 | `` | address |
address |
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 | uint256 |
uint256 |
\
Gets the payment counter.
function paymentCounter()
view
returns (
uint24
);
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 | uint24 |
uint24 |
\
Gets the payment if for the given loan.
function paymentIdOf(
address
)
view
returns (
uint24
);
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 | `` | address |
address |
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 | uint24 |
uint24 |
\
Gets the information for a payment.
function payments(
uint256
)
view
returns (
uint24 platformManagementFeeRate,
uint24 delegateManagementFeeRate,
uint48 startDate,
uint48 paymentDueDate,
uint128 incomingNetInterest,
uint128 refinanceInterest,
uint256 issuanceRate
);
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 | `` | uint256 |
uint256 |
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. |
\
Gets the payment id with the earliest due date.
function paymentWithEarliestDueDate()
view
returns (
uint24
);
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 | uint24 |
uint24 |
\
function poolDelegate()
view
returns (
address poolDelegate_
);
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 | poolDelegate_ |
address |
address |
\
Gets the address of the pool manager.
function poolManager()
view
returns (
address
);
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 | address |
address |
\
Gets the amount of principal out.
function principalOut()
view
returns (
uint128
);
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 | uint128 |
uint128 |
\
Reject/cancel proposed new terms for a loan.
function rejectNewTerms(
address loan_,
address refinancer_,
uint256 deadline_,
bytes[] calls_
)
nonpayable;
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 | loan_ |
address |
address |
The loan with the proposed new changes. |
1 | refinancer_ |
address |
address |
The refinancer to use in the refinance. |
2 | deadline_ |
uint256 |
uint256 |
The deadline by which the lender must accept the new terms. |
3 | calls_ |
bytes[] |
bytes[] |
The array of calls to be made to the refinancer. |
\
Removes the loan impairment for a loan.
function removeLoanImpairment(
address loan_
)
nonpayable;
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 | loan_ |
address |
address |
Loan to remove the loan impairment. |
\
Sets the allowed slippage for a collateral asset liquidation.
function setAllowedSlippage(
address collateralAsset_,
uint256 allowedSlippage_
)
nonpayable;
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 | collateralAsset_ |
address |
address |
Address of a collateral asset. |
1 | allowedSlippage_ |
uint256 |
uint256 |
New value for `allowedSlippage`. |
\
Modifies the proxy's implementation address.
function setImplementation(
address implementation_
)
nonpayable;
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 | implementation_ |
address |
address |
\
Sets the minimum ratio for a collateral asset liquidation. This ratio is expressed as a decimal representation of units of fundsAsset per unit collateralAsset in fundsAsset decimal precision.
function setMinRatio(
address collateralAsset_,
uint256 minRatio_
)
nonpayable;
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 | collateralAsset_ |
address |
address |
Address of a collateral asset. |
1 | minRatio_ |
uint256 |
uint256 |
New value for `minRatio`. |
\
Gets the information of the sorted list.
function sortedPayments(
uint256
)
view
returns (
uint24 previous,
uint24 next,
uint48 paymentDueDate
);
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 | `` | uint256 |
uint256 |
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 | previous |
uint24 |
uint24 |
|
1 | next |
uint24 |
uint24 |
|
2 | paymentDueDate |
uint48 |
uint48 |
\
Triggers the default of a loan.
function triggerDefault(
address loan_,
address liquidatorFactory_
)
nonpayable
returns (
bool liquidationComplete_,
uint256 remainingLosses_,
uint256 platformFees_
);
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 | loan_ |
address |
address |
Loan to trigger the default. |
1 | liquidatorFactory_ |
address |
address |
Factory that will be used to deploy the liquidator. |
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 | liquidationComplete_ |
bool |
bool |
True if the liquidation is completed in the same transaction (uncollateralized). |
1 | remainingLosses_ |
uint256 |
uint256 |
The amount of remaining losses. |
2 | platformFees_ |
uint256 |
uint256 |
The amount of platform fees. |
\
Returns the amount unrealized losses.
function unrealizedLosses()
view
returns (
uint128
);
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 | uint128 |
uint128 |
\
Updates the issuance parameters of the LoanManager, callable by the Governor and the PoolDelegate. Useful to call when `block.timestamp` is greater than `domainEnd` and the LoanManager is not accruing interest.
function updateAccounting()
nonpayable;
\
Upgrades a contract implementation to a specific version. Access control logic critical since caller can force a selfdestruct via a malicious `migrator_` which is delegatecalled.
function upgrade(
uint256 version_,
bytes arguments_
)
nonpayable;
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 | version_ |
uint256 |
uint256 |
|
1 | arguments_ |
bytes |
bytes |
Some encoded arguments to use for the upgrade. |
\
Emitted when `setAllowedSlippage` is called.
event AllowedSlippageSet(
address collateralAsset_,
uint256 newSlippage_
);
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 | collateralAsset_ |
address |
address |
Address of a collateral asset. |
1 | newSlippage_ |
uint256 |
uint256 |
New value for `allowedSlippage`. |
\
Funds have been claimed and distributed into the Pool.
event FundsDistributed(
address loan_,
uint256 principal_,
uint256 netInterest_
);
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 | loan_ |
address |
address |
The address of the loan contract. |
1 | principal_ |
uint256 |
uint256 |
The amount of principal paid. |
2 | netInterest_ |
uint256 |
uint256 |
The amount of net interest paid. |
\
Emitted when the issuance parameters are changed.
event IssuanceParamsUpdated(
uint48 domainEnd_,
uint256 issuanceRate_,
uint112 accountedInterest_
);
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 | domainEnd_ |
uint48 |
uint48 |
The timestamp of the domain end. |
1 | issuanceRate_ |
uint256 |
uint256 |
New value for the issuance rate. |
2 | accountedInterest_ |
uint112 |
uint112 |
The amount of accounted interest. |
\
Emitted when the loanTransferAdmin is set by the PoolDelegate.
event LoanTransferAdminSet(
address loanTransferAdmin_
);
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 | loanTransferAdmin_ |
address |
address |
The address of the admin that can transfer loans. |
\
A fee payment was made.
event ManagementFeesPaid(
address loan_,
uint256 delegateManagementFee_,
uint256 platformManagementFee_
);
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 | loan_ |
address |
address |
The address of the loan contract. |
1 | delegateManagementFee_ |
uint256 |
uint256 |
The amount of delegate management fee paid. |
2 | platformManagementFee_ |
uint256 |
uint256 |
The amount of platform management fee paid. |
\
Emitted when `setMinRatio` is called.
event MinRatioSet(
address collateralAsset_,
uint256 newMinRatio_
);
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 | collateralAsset_ |
address |
address |
Address of a collateral asset. |
1 | newMinRatio_ |
uint256 |
uint256 |
New value for `minRatio`. |
\
Emitted when a payment is removed from the LoanManager payments array.
event PaymentAdded(
address loan_,
uint256 paymentId_,
uint256 platformManagementFeeRate_,
uint256 delegateManagementFeeRate_,
uint256 startDate_,
uint256 nextPaymentDueDate_,
uint256 netRefinanceInterest_,
uint256 newRate_
);
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 | loan_ |
address |
address |
The address of the loan. |
1 | paymentId_ |
uint256 |
uint256 |
The payment ID of the payment that was removed. |
2 | platformManagementFeeRate_ |
uint256 |
uint256 |
|
3 | delegateManagementFeeRate_ |
uint256 |
uint256 |
|
4 | startDate_ |
uint256 |
uint256 |
|
5 | nextPaymentDueDate_ |
uint256 |
uint256 |
|
6 | netRefinanceInterest_ |
uint256 |
uint256 |
|
7 | newRate_ |
uint256 |
uint256 |
\
Emitted when a payment is removed from the LoanManager payments array.
event PaymentRemoved(
address loan_,
uint256 paymentId_
);
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 | loan_ |
address |
address |
The address of the loan. |
1 | paymentId_ |
uint256 |
uint256 |
The payment ID of the payment that was removed. |
\
Emitted when principal out is updated
event PrincipalOutUpdated(
uint128 principalOut_
);
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 | principalOut_ |
uint128 |
uint128 |
The new value for principal out. |
\
Emitted when unrealized losses is updated.
event UnrealizedLossesUpdated(
uint256 unrealizedLosses_
);
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 | unrealizedLosses_ |
uint256 |
uint256 |
The new value for unrealized losses. |
\
The instance was upgraded.
event Upgraded(
uint256 toVersion_,
bytes arguments_
);
Index | Name | Type | Internal Type | Description |
---|---|---|---|---|
0 | toVersion_ |
uint256 |
uint256 |
The new version of the loan. |
1 | arguments_ |
bytes |
bytes |
The upgrade arguments, if any. |
\