Liquidator
Functions
collateralAsset
collateralAsset
Returns the address of the collateral asset.
Return Values:
collateralRemaining
collateralRemaining
Returns the amount of collateral yet to be liquidated.
Return Values:
factory
factory
The address of the proxy factory.
Return Values:
fundsAsset
fundsAsset
Returns the address of the funding asset.
Return Values:
getExpectedAmount
getExpectedAmount
Returns the expected amount to be returned from a flash loan given a certain amount of `collateralAsset`.
Parameters:
Return Values:
globals
globals
Return Values:
governor
governor
Return Values:
implementation
implementation
The address of the implementation contract being proxied.
Return Values:
liquidatePortion
liquidatePortion
Flash loan function that: 1. Transfers a specified amount of `collateralAsset` to `msg.sender`. 2. Performs an arbitrary call to `msg.sender`, to trigger logic necessary to get `fundsAsset` (e.g., AMM swap). 3. Performs a `transferFrom`, taking the corresponding amount of `fundsAsset` from the user. If the required amount of `fundsAsset` is not returned in step 3, the entire transaction reverts.
Parameters:
loanManager
loanManager
Returns the address of the loan manager contract.
Return Values:
migrate
migrate
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.
Parameters:
poolDelegate
poolDelegate
Return Values:
pullFunds
pullFunds
Pulls a specified amount of ERC-20 tokens from the contract. Can only be called by `owner`.
Parameters:
setCollateralRemaining
setCollateralRemaining
Sets the initial amount of collateral to be liquidated.
Parameters:
setImplementation
setImplementation
Modifies the proxy's implementation address.
Parameters:
upgrade
upgrade
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.
Parameters:
Events
FundsPulled
FundsPulled
Funds were withdrawn from the liquidator.
Parameters:
PortionLiquidated
PortionLiquidated
Portion of collateral was liquidated.
Parameters:
Upgraded
Upgraded
The instance was upgraded.
Parameters:
Last updated