pool-borrow
List of Core Functions:
supply
: Supplies an asset to the protocol.withdraw
: Withdraws an asset from the protocol.borrow
: Borrows an asset from the protocol.repay
: Repays a borrowed asset.liquidation-call
: Executes a liquidation call on an undercollateralized loan.flashloan
: Executes a flash loan transaction.set-configurator
: Sets the configurator address.set-user-use-reserve-as-collateral
: Sets whether a user's reserve can be used as collateral.init
: Initializes a reserve.set-reserve
: Sets the state of a reserve.set-borrowing-enabled
: Enables or disables borrowing for a reserve.set-usage-as-collateral-enabled
: Enables or disables a reserve's usage as collateral.add-isolated-asset
: Adds an asset to the list of isolated assets.add-asset
: Adds an asset to the protocol.remove-asset
: Removes an asset from the protocol.remove-isolated-asset
: Removes an asset from the list of isolated assets.set-borroweable-isolated
: Sets an asset as borrowable when isolated assets are used as collateral.remove-borroweable-isolated
: Removes an asset from the list of borrowable assets when isolated assets are used as collateral.
Detailed Tables:
supply
supply
Supplies an asset to the protocol.
Parameter | Type | Description |
---|---|---|
|
| The liquidity pool trait reference. |
|
| The pool reserve address. |
|
| The asset to supply. |
|
| The amount of the asset to supply. |
|
| The owner of the asset. |
withdraw
withdraw
Withdraws an asset from the protocol.
Parameter | Type | Description |
---|---|---|
|
| The pool reserve address. |
|
| The asset to withdraw. |
|
| The oracle trait reference. |
|
| List of asset details. |
|
| The amount to withdraw. |
|
| The current balance of the user. |
|
| The owner of the asset. |
borrow
borrow
Borrows an asset from the protocol.
Parameter | Type | Description |
---|---|---|
|
| The pool reserve address. |
|
| The oracle trait reference. |
|
| The asset to borrow. |
|
| The liquidity pool trait reference. |
|
| List of asset details. |
|
| The amount to be borrowed. |
|
| The fee calculator address. |
|
| The interest rate mode. |
|
| The owner of the asset. |
repay
repay
Repays a borrowed asset.
Parameter | Type | Description |
---|---|---|
|
| The asset to repay. |
|
| The amount to repay. |
|
| The user on behalf of whom the repayment is made. |
|
| The user who is making the repayment. |
liquidation-call
liquidation-call
Executes a liquidation call on an undercollateralized loan.
Parameter | Type | Description |
---|---|---|
|
| List of asset details. |
|
| The collateral liquidity pool trait reference. |
|
| The collateral asset to liquidate. |
|
| The debt asset involved in the liquidation. |
|
| The oracle trait for the collateral. |
|
| The oracle trait for the debt. |
|
| The user being liquidated. |
|
| The amount of debt to cover in the liquidation. |
|
| Whether to receive aTokens or underlying asset. |
flashloan
flashloan
Executes a flash loan transaction.
Parameter | Type | Description |
---|---|---|
|
| The receiver of the flash loan. |
|
| The liquidity pool trait reference. |
|
| The asset to be flash loaned. |
|
| The amount of the flash loan. |
|
| The flash loan trait reference. |
set-configurator
set-configurator
Sets the configurator address.
Parameter | Type | Description |
---|---|---|
|
| The new configurator address. |
set-user-use-reserve-as-collateral
set-user-use-reserve-as-collateral
Sets whether a user's reserve can be used as collateral.
Parameter | Type | Description |
---|---|---|
|
| The user for whom the setting is being applied. |
|
| The liquidity pool token trait reference. |
|
| The asset to set for collateral usage. |
|
| Whether the asset should be used as collateral. |
|
| The oracle trait reference. |
|
| List of assets to calculate for the collateral check. |
init
init
Initializes a reserve.
Parameter | Type | Description |
---|---|---|
|
| The address of the aToken. |
|
| The asset to initialize. |
|
| The number of decimals for the asset. |
|
| The supply cap for the asset. |
|
| The borrow cap for the asset. |
|
| The oracle address for the asset. |
|
| The interest rate strategy address. |
set-reserve
set-reserve
Sets the state of a reserve.
Parameter | Type | Description |
---|---|---|
|
| The asset for which to set the reserve. |
|
| The state details of the reserve. |
set-borrowing-enabled
set-borrowing-enabled
Enables or disables borrowing for a reserve.
Parameter | Type | Description |
---|---|---|
|
| The asset for which to set borrowing. |
|
| Whether borrowing should be enabled. |
set-usage-as-collateral-enabled
set-usage-as-collateral-enabled
Enables or disables a reserve's usage as collateral.
Parameter | Type | Description |
---|---|---|
|
| The asset for which to set the usage. |
|
| Whether the usage as collateral should be enabled. |
|
| The base LTV as collateral. |
|
| The liquidation threshold. |
|
| The liquidation bonus. |
add-isolated-asset
add-isolated-asset
Adds an asset to the list of isolated assets.
Parameter | Type | Description |
---|---|---|
|
| The asset to be added to the list. |
|
| The debt ceiling for the asset. |
add-asset
add-asset
Adds an asset to the protocol.
Parameter | Type | Description |
---|---|---|
|
| The asset to be added. |
remove-asset
remove-asset
Removes an asset from the protocol.
Parameter | Type | Description |
---|---|---|
|
| The asset to be removed. |
remove-isolated-asset
remove-isolated-asset
Removes an asset from the list of isolated assets.
Parameter | Type | Description |
---|---|---|
|
| The asset to be removed from the list. |
set-borroweable-isolated
set-borroweable-isolated
Sets an asset as borrowable when isolated assets are used as collateral.
Parameter | Type | Description |
---|---|---|
|
| The asset to be set as borrowable. |
remove-borroweable-isolated
remove-borroweable-isolated
Removes an asset from the list of borrowable assets when isolated assets are used as collateral.
Parameter | Type | Description |
---|---|---|
|
| The asset to be removed from the list of borrowable. |
Last updated