VaultT1Liquidator

Git Source

Inherits: Owned

State Variables

ETH_ADDRESS

address public constant ETH_ADDRESS = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;

FLA

InstaFlashInterface public immutable FLA;

WETH

IWETH9 public immutable WETH;

rebalancer

mapping(address => bool) public rebalancer;

Functions

constructor

constructor(address owner_, address fla_, address weth_, address[] memory rebalancers_) Owned(owner_);

isRebalancer

modifier isRebalancer();

toggleRebalancer

function toggleRebalancer(address rebalancer_, bool status_) public onlyOwner;

spell

function spell(address[] memory targets_, bytes[] memory calldatas_) public onlyOwner;

withdraw

function withdraw(address to_, address[] memory tokens_, uint256[] memory amounts_) public onlyOwner;

liquidation

function liquidation(LiquidationParams memory params_) public isRebalancer;

executeOperation

function executeOperation(
    address[] calldata assets,
    uint256[] calldata amounts,
    uint256[] calldata premiums,
    address initiator,
    bytes calldata _data
) external returns (bool);

receive

receive() external payable;

Events

Liquidated

event Liquidated(address indexed vault, uint256 collateral, uint256 debt);

Withdraw

event Withdraw(address indexed to, address indexed token, uint256 amount);

ToggleRebalancer

event ToggleRebalancer(address indexed rebalancer, bool indexed status);

Errors

FluidVaultT1Liquidator__InvalidOperation

error FluidVaultT1Liquidator__InvalidOperation();

Structs

LiquidationParams

struct LiquidationParams {
    address vault;
    address supply;
    address borrow;
    uint256 supplyAmount;
    uint256 borrowAmount;
    uint256 colPerUnitDebt;
    bool absorb;
    address swapRouter;
    address swapApproval;
    bytes swapData;
    uint256 route;
}