
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.set-e-mode
: activate/deactivate the E-mode.
Detailed Tables:
supply
supply
Supplies an asset to the protocol.
lp
<ft-mint-trait>
The liquidity pool trait reference.
pool-reserve
principal
The pool reserve address.
asset
<ft>
The asset to supply.
amount
uint
The amount of the asset to supply.
owner
principal
The owner of the asset.
withdraw
withdraw
Withdraws an asset from the protocol.
pool-reserve
principal
The pool reserve address.
asset
<ft>
The asset to withdraw.
oracle
<oracle-trait>
The oracle trait reference.
assets
list
List of asset details.
amount
uint
The amount to withdraw.
current-balance
uint
The current balance of the user.
owner
principal
The owner of the asset.
borrow
borrow
Borrows an asset from the protocol.
pool-reserve
principal
The pool reserve address.
oracle
<oracle-trait>
The oracle trait reference.
asset-to-borrow
<ft>
The asset to borrow.
lp
<ft>
The liquidity pool trait reference.
assets
list
List of asset details.
amount-to-be-borrowed
uint
The amount to be borrowed.
fee-calculator
principal
The fee calculator address.
interest-rate-mode
uint
The interest rate mode.
owner
principal
The owner of the asset.
repay
repay
Repays a borrowed asset.
asset
<ft>
The asset to repay.
amount-to-repay
uint
The amount to repay.
on-behalf-of
principal
The user on behalf of whom the repayment is made.
payer
principal
The user who is making the repayment.
liquidation-call
liquidation-call
Executes a liquidation call on an undercollateralized loan.
assets
list
List of asset details.
collateral-lp
<a-token>
The collateral liquidity pool trait reference.
collateral-to-liquidate
<ft>
The collateral asset to liquidate.
debt-asset
<ft>
The debt asset involved in the liquidation.
collateral-oracle
<oracle-trait>
The oracle trait for the collateral.
debt-oracle
<oracle-trait>
The oracle trait for the debt.
liquidated-user
principal
The user being liquidated.
debt-amount
uint
The amount of debt to cover in the liquidation.
to-receive-atoken
bool
Whether to receive aTokens or underlying asset.
flashloan
flashloan
Executes a flash loan transaction.
receiver
principal
The receiver of the flash loan.
lp
<ft>
The liquidity pool trait reference.
asset
<ft>
The asset to be flash loaned.
amount
uint
The amount of the flash loan.
flashloan
<flash-loan>
The flash loan trait reference.
set-configurator
set-configurator
Sets the configurator address.
new-configurator
principal
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.
who
principal
The user for whom the setting is being applied.
lp-token
<ft>
The liquidity pool token trait reference.
asset
<ft>
The asset to set for collateral usage.
enable-as-collateral
bool
Whether the asset should be used as collateral.
oracle
<oracle-trait>
The oracle trait reference.
assets-to-calculate
list
List of assets to calculate for the collateral check.
init
init
Initializes a reserve.
a-token-address
principal
The address of the aToken.
asset
principal
The asset to initialize.
decimals
uint
The number of decimals for the asset.
supply-cap
uint
The supply cap for the asset.
borrow-cap
uint
The borrow cap for the asset.
oracle
principal
The oracle address for the asset.
interest-rate-strategy-address
principal
The interest rate strategy address.
set-reserve
set-reserve
Sets the state of a reserve.
asset
principal
The asset for which to set the reserve.
state
tuple
The state details of the reserve.
set-borrowing-enabled
set-borrowing-enabled
Enables or disables borrowing for a reserve.
asset
principal
The asset for which to set borrowing.
enabled
bool
Whether borrowing should be enabled.
set-usage-as-collateral-enabled
set-usage-as-collateral-enabled
Enables or disables a reserve's usage as collateral.
asset
principal
The asset for which to set the usage.
enabled
bool
Whether the usage as collateral should be enabled.
base-ltv-as-collateral
uint
The base LTV as collateral.
liquidation-threshold
uint
The liquidation threshold.
liquidation-bonus
uint
The liquidation bonus.
add-isolated-asset
add-isolated-asset
Adds an asset to the list of isolated assets.
asset
principal
The asset to be added to the list.
debt-ceiling
uint
The debt ceiling for the asset.
add-asset
add-asset
Adds an asset to the protocol.
asset
principal
The asset to be added.
remove-asset
remove-asset
Removes an asset from the protocol.
asset
principal
The asset to be removed.
remove-isolated-asset
remove-isolated-asset
Removes an asset from the list of isolated assets.
asset
principal
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.
asset
principal
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.
asset
principal
The asset to be removed from the list of borrowable.
set-e-mode
Activate or deactivate the E-mode.
user
principal
the actual user.
assets
list
The lists of available assets in e-mode.
new-e-mode-type
buff 1
0x00
is not in e-mode.
0x01
is in STX-correlated e-mode.
Last updated