PrimaryLendingPlatformAtomicRepaymentCore
Last updated
Last updated
Core contract for the atomic repayment functionality for the PrimaryLendingPlatform contract.
Abstract contract that implements the atomic repayment core functionality for the PrimaryLendingPlatform contract.
Emitted when the exchange aggregator and registry aggregator addresses are set.
Parameters:
Name | Type | Description |
---|---|---|
Emitted when the primary lending platform address is set.
Parameters:
Emitted when an atomic repayment is executed, where a user sells collateral to repay a loan.
Parameters:
Throws if the caller is not the moderator.
Throws if the project token is not listed.
Parameters:
Sets up initial roles, initializes AccessControl, and sets the provided PIT address
Parameters:
Updates the Exchange Aggregator contract and registry contract addresses.
Requirements:
The caller must be the moderator.
exchangeAggregatorAddress
must not be the zero address.
registryAggregatorAddress
must be a valid Augustus contract if it is not the zero address.
Parameters:
Sets the address of the primary lending platform contract.
Parameters:
Requirements:
pit
cannot be the zero address. |
Calculates the outstanding amount (i.e., loanBody + accrual) for a given user, project token, and lending token.
Parameters:
Return values:
Returns the remaining deposit of a user for a specific project token.
Parameters:
Return values:
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
exchangeAggregator
address
The address of the exchange aggregator.
registryAggregator
address
The address of the registry aggregator.
newPrimaryLendingPlatform
address
The new address of the primary lending platform.
user
address
The address of the user who executed the atomic repayment.
collateral
address
The address of the collateral asset sold by the user.
lendingAsset
address
The address of the lending asset that was repaid.
amountSold
uint256
The amount of collateral sold by the user.
amountReceive
uint256
The amount of lending asset received by the user after the repayment.
projectToken
address
The project token address.
pit
address
The address of the PrimaryLendingPlatform contract.
exchangeAggregatorAddress
address
The new address of the Exchange Aggregator contract.
registryAggregatorAddress
address
The new address of the Aggregator registry contract.
pit
address
The address of the primary lending platform contract.
user
address
The user for which to compute the outstanding amount.
projectToken
address
The project token for which to compute the outstanding amount.
lendingAsset
address
The lending token for which to compute the outstanding amount.
outstanding
uint256
The outstanding amount for the user, project token, and lending token.
user
address
The address of the user.
projectToken
address
The address of the project token.
remainingDeposit
uint256
The remaining deposit of the user for the project token.