AlienFinance
0x50454acC07bf8fC78100619a1b68e9E8d28cE022
Methods
absorbToReserves
Increase reserves by absorbing the surplus cash.
This function is callable by the reserve manager only.
Parameters
market
address
The address of the market
acceptOwnership
The new owner accepts the ownership transfer.
accrueInterest
Accrue the interest of a market.
Parameters
market
address
The address of the market
allAllowedExtensions
The list of all allowed extensions for a user
Parameters
_0
address
undefined
_1
uint256
undefined
Returns
_0
address
undefined
allCreditMarkets
The list of a user's credit markets
Parameters
_0
address
undefined
_1
uint256
undefined
Returns
_0
address
undefined
allEnteredMarkets
The list of all markets a user has entered
Parameters
_0
address
undefined
_1
uint256
undefined
Returns
_0
address
undefined
allMarkets
The list of all supported markets
Parameters
_0
uint256
undefined
Returns
_0
address
undefined
allowedExtensions
The mapping of a user's allowed extensions
Parameters
_0
address
undefined
_1
address
undefined
Returns
_0
bool
undefined
borrow
Borrow an amount of asset from Alien.
Parameters
from
address
The address which will borrow the asset
to
address
The address which will receive the token
market
address
The address of the market
amount
uint256
The amount of asset to borrow
calculateLiquidationOpportunity
Calculate the amount of aToken that can be seized in a liquidation.
Parameters
marketBorrow
address
The address of the market being borrowed from
marketCollateral
address
The address of the market being used as collateral
repayAmount
uint256
The amount of the borrowed asset being repaid
Returns
_0
uint256
The amount of aToken that can be seized
checkAccountLiquidity
Check the account liquidity of a user.
Parameters
user
address
The address of the user
configureYield
creditLimitManager
The credit limit manager address
Returns
_0
address
undefined
creditLimits
The mapping of the credit limits
Parameters
_0
address
undefined
_1
address
undefined
Returns
_0
uint256
undefined
deferLiquidityCheck
Defer the liquidity check to a user.
The message sender must implement the IDeferLiquidityCheck.
Parameters
user
address
The address of the user
data
bytes
The data to pass to the callback
delistMarket
Delist a market.
This function is callable by the market configurator only.
Parameters
market
address
The address of the market
enteredMarkets
The mapping of a user's entered markets
Parameters
_0
address
undefined
_1
address
undefined
Returns
_0
bool
undefined
getATokenBalance
Get the AToken balance of a user in a market.
Parameters
user
address
The address of the user
market
address
The address of the market
Returns
_0
uint256
The AToken balance
getAccountLiquidity
Get the account liquidity of a user.
Parameters
user
address
The address of the user
Returns
_0
uint256
The total collateral value, liquidation collateral value, and total debt value of the user
_1
uint256
undefined
_2
uint256
undefined
getAllMarkets
Get all markets.
Returns
_0
address[]
The list of all markets
getBorrowBalance
Get the borrow balance of a user in a market.
Parameters
user
address
The address of the user
market
address
The address of the market
Returns
_0
uint256
The borrow balance
getCreditLimit
Get the credit limit of a user in a market.
Parameters
user
address
The address of the user
market
address
The address of the market
Returns
_0
uint256
The credit limit
getExchangeRate
Get the exchange rate of a market.
Parameters
market
address
The address of the market
Returns
_0
uint256
The exchange rate
getMarketConfiguration
Get the configuration of a market.
Parameters
market
address
The address of the market
Returns
_0
DataTypes.MarketConfig
The market configuration
getSupplyBalance
Get the supply balance of a user in a market.
Parameters
user
address
The address of the user
market
address
The address of the market
Returns
_0
uint256
The supply balance
getTotalBorrow
Get the total borrow of a market.
Parameters
market
address
The address of the market
Returns
_0
uint256
The total borrow
getTotalCash
Get the total cash of a market.
Parameters
market
address
The address of the market
Returns
_0
uint256
The total cash
getTotalReserves
Get the total reserves of a market.
Parameters
market
address
The address of the market
Returns
_0
uint256
The total reserves
getTotalSupply
Get the total supply of a market.
Parameters
market
address
The address of the market
Returns
_0
uint256
The total supply
getUserAllowedExtensions
Get the user's allowed extensions.
Parameters
user
address
The address of the user
Returns
_0
address[]
The list of allowed extensions
getUserCreditMarkets
Get the list of all credit markets for a user.
Parameters
user
address
The address of the user
Returns
_0
address[]
The list of all credit markets
initialize
Initialize the contract.
Parameters
_admin
address
The address of the admin
_gasStation
address
The address of the gas station
_pointsOperator
address
The address of the points operator
isAllowedExtension
Whether or not a user has allowed an extension.
Parameters
user
address
The address of the user
extension
address
The address of the extension
Returns
_0
bool
true if the user has allowed the extension, false otherwise
isCreditAccount
Whether or not an account is a credit account.
Parameters
user
address
The address of the user
Returns
_0
bool
true if the account is a credit account, false otherwise
isMarketListed
Whether or not a market is listed.
Parameters
market
address
The address of the market to check
Returns
_0
bool
true if the market is listed, false otherwise
isUserLiquidatable
Check if an account is liquidatable.
Parameters
user
address
The address of the account to check
Returns
_0
bool
true if the account is liquidatable, false otherwise
liquidate
Liquidate an undercollateralized borrower.
Parameters
liquidator
address
The address which will liquidate the borrower
borrower
address
The address of the borrower
marketBorrow
address
The address of the borrow market
marketCollateral
address
The address of the collateral market
repayAmount
uint256
The amount of asset to repay, or type(uint256).max for max
liquidityCheckStatus
The mapping of the liquidity check status
Parameters
_0
address
undefined
Returns
_0
uint8
undefined
listMarket
Parameters
market
address
undefined
config
DataTypes.MarketConfig
undefined
marketConfigurator
The market configurator address
Returns
_0
address
undefined
markets
The mapping of the supported markets
Parameters
_0
address
undefined
Returns
config
DataTypes.MarketConfig
undefined
lastUpdateTimestamp
uint40
undefined
totalCash
uint256
undefined
totalBorrow
uint256
undefined
totalSupply
uint256
undefined
totalReserves
uint256
undefined
borrowIndex
uint256
undefined
owner
Returns the address of the current owner.
Returns
_0
address
undefined
pendingOwner
Returns the address of the pending owner.
Returns
_0
address
undefined
priceOracle
The price oracle address
Returns
_0
address
undefined
proxiableUUID
Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the notDelegated
modifier.
Returns
_0
bytes32
undefined
redeem
Redeem an amount of asset from Alien.
Parameters
from
address
The address which will redeem the asset
to
address
The address which will receive the token
market
address
The address of the market
amount
uint256
The amount of asset to redeem, or type(uint256).max for max
reduceReserves
Reduce reserves by withdrawing the requested amount.
This function is callable by the reserve manager only.
Parameters
market
address
The address of the market
aTokenAmount
uint256
The amount of aToken to withdraw
recipient
address
The address which will receive the underlying asset
renounceOwnership
Leaves the contract without owner. It will not be possible to call onlyOwner
functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.
repay
Repay an amount of asset to Alien.
Parameters
from
address
The address which will repay the asset
to
address
The address which will hold the balance
market
address
The address of the market
amount
uint256
The amount of asset to repay, or type(uint256).max for max
reserveManager
The reserve manager address
Returns
_0
address
undefined
seize
Seize the unlisted token.
Parameters
token
address
The address of the token
recipient
address
The address which will receive the token
setCreditLimit
Set the credit limit for a user in a market.
This function is callable by the credit limit manager only.
Parameters
user
address
The address of the user
market
address
The address of the market
credit
uint256
The credit limit
setCreditLimitManager
Set the credit limit manager.
Parameters
manager
address
The address of the credit limit manager
setMarketConfiguration
Parameters
market
address
undefined
config
DataTypes.MarketConfig
undefined
setMarketConfigurator
Set the market configurator.
Parameters
configurator
address
The address of the market configurator
setPriceOracle
Set the price oracle.
Parameters
oracle
address
The address of the price oracle
setReserveManager
Set the reserve manager.
Parameters
manager
address
The address of the reserve manager
setUserExtension
User enables or disables an extension.
Parameters
extension
address
The address of the extension
allowed
bool
Whether to allow or disallow the extension
supply
Supply an amount of asset to Alien.
Parameters
from
address
The address which will supply the asset
to
address
The address which will hold the balance
market
address
The address of the market
amount
uint256
The amount of asset to supply
transferAToken
Transfer AToken from one account to another.
This function is callable by the AToken contract only.
Parameters
market
address
The address of the market
from
address
The address to transfer from
to
address
The address to transfer to
amount
uint256
The amount to transfer
transferOwnership
Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one. Can only be called by the current owner.
Parameters
newOwner
address
undefined
upgradeTo
Upgrade the implementation of the proxy to newImplementation
. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.
Parameters
newImplementation
address
undefined
upgradeToAndCall
Upgrade the implementation of the proxy to newImplementation
, and subsequently execute the function call encoded in data
. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.
Parameters
newImplementation
address
undefined
data
bytes
undefined
Events
AdminChanged
Parameters
previousAdmin
address
undefined
newAdmin
address
undefined
BeaconUpgraded
Parameters
beacon indexed
address
undefined
Borrow
Parameters
market indexed
address
undefined
from indexed
address
undefined
to indexed
address
undefined
amount
uint256
undefined
accountBorrow
uint256
undefined
totalBorrow
uint256
undefined
CreditLimitChanged
Parameters
user indexed
address
undefined
market indexed
address
undefined
credit
uint256
undefined
CreditLimitManagerSet
Parameters
manager
address
undefined
ExtensionAdded
Parameters
user indexed
address
undefined
extension indexed
address
undefined
ExtensionRemoved
Parameters
user indexed
address
undefined
extension indexed
address
undefined
Initialized
Parameters
version
uint8
undefined
InterestAccrued
Parameters
market indexed
address
undefined
timestamp
uint40
undefined
borrowRatePerSecond
uint256
undefined
borrowIndex
uint256
undefined
totalBorrow
uint256
undefined
totalReserves
uint256
undefined
Liquidate
Parameters
liquidator indexed
address
undefined
borrower indexed
address
undefined
marketBorrow indexed
address
undefined
marketCollateral
address
undefined
repayAmount
uint256
undefined
seizedAmount
uint256
undefined
MarketConfigurationChanged
Parameters
market indexed
address
undefined
config
DataTypes.MarketConfig
undefined
MarketConfiguratorSet
Parameters
configurator
address
undefined
MarketDelisted
Parameters
market indexed
address
undefined
MarketEntered
Parameters
market indexed
address
undefined
user indexed
address
undefined
MarketExited
Parameters
market indexed
address
undefined
user indexed
address
undefined
MarketListed
Parameters
market indexed
address
undefined
timestamp
uint40
undefined
config
DataTypes.MarketConfig
undefined
OwnershipTransferStarted
Parameters
previousOwner indexed
address
undefined
newOwner indexed
address
undefined
OwnershipTransferred
Parameters
previousOwner indexed
address
undefined
newOwner indexed
address
undefined
PriceOracleSet
Parameters
priceOracle
address
undefined
Redeem
Parameters
market indexed
address
undefined
from indexed
address
undefined
to indexed
address
undefined
amount
uint256
undefined
aTokenAmount
uint256
undefined
Repay
Parameters
market indexed
address
undefined
from indexed
address
undefined
to indexed
address
undefined
amount
uint256
undefined
accountBorrow
uint256
undefined
totalBorrow
uint256
undefined
ReserveManagerSet
Parameters
manager
address
undefined
ReservesDecreased
Parameters
market indexed
address
undefined
recipient indexed
address
undefined
aTokenAmount
uint256
undefined
amount
uint256
undefined
ReservesIncreased
Parameters
market indexed
address
undefined
aTokenAmount
uint256
undefined
amount
uint256
undefined
Supply
Parameters
market indexed
address
undefined
from indexed
address
undefined
to indexed
address
undefined
amount
uint256
undefined
aTokenAmount
uint256
undefined
TokenSeized
Parameters
token indexed
address
undefined
recipient indexed
address
undefined
amount
uint256
undefined
Upgraded
Parameters
implementation indexed
address
undefined
Last updated