Skip to content

VaultT1Liquidator ​

Git Source

Inherits: Owned

State Variables ​

ETH_ADDRESS ​

solidity
address public constant ETH_ADDRESS = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;

FLA ​

solidity
InstaFlashInterface public immutable FLA;

WETH ​

solidity
IWETH9 public immutable WETH;

rebalancer ​

solidity
mapping(address => bool) public rebalancer;

Functions ​

constructor ​

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

isRebalancer ​

solidity
modifier isRebalancer();

toggleRebalancer ​

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

spell ​

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

withdraw ​

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

liquidation ​

solidity
function liquidation(LiquidationParams memory params_) public isRebalancer;

executeOperation ​

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

receive ​

solidity
receive() external payable;

Events ​

Liquidated ​

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

Withdraw ​

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

ToggleRebalancer ​

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

Errors ​

FluidVaultT1Liquidator__InvalidOperation ​

solidity
error FluidVaultT1Liquidator__InvalidOperation();

Structs ​

LiquidationParams ​

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