Keeper contract architecture
Last updated
Last updated
Contract helper for Marginly position liquidators.
It makes liquidations utilizing AAVE flashloans
Emitted when liquidation occurs
Parameters
Name | Type | Description |
---|---|---|
Takes a simple flashloan in AAVE v3 protocol to liquidate a position in Marginly
Parameters
Executes an operation after receiving the flash-borrowed asset
Ensure that the contract can return the debt + premium, e.g., has enough funds to repay and has approved the Pool to pull the total amount
Parameters
Return Values
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
liquidatedPosition
address
liquidated position
token
address
profit token
amount
uint256
profit amount
asset
address
borrow asset
amount
uint256
borrow amount
referralCode
uint16
referral code to get rewards in AAVE
marginlyPool
address
address of marginly pool
positionToLiquidate
address
address of liquidatable position in Marginly pool
minProfit
uint256
amount of minimum profit worth in borrow asset
asset
address
The address of the flash-borrowed asset
amount
uint256
The amount of the flash-borrowed asset
premium
uint256
The fee of the flash-borrowed asset
initiator
address
The address of the flashloan initiator
data
bytes
[0]
bool
True if the execution of the operation succeeds, false otherwise