# Liquidator.sol

View Source: [contracts/test/Liquidator.sol](https://app.gitbook.com/s/-MQ0mmOovvt0G2zyJIgA/contracts/test/Liquidator.sol)

**↗ Extends:** [**ErrorReporter**](https://app.gitbook.com/s/-MQ0mmOovvt0G2zyJIgA/docs/ErrorReporter.md)**,** [**SafeToken**](https://app.gitbook.com/s/-MQ0mmOovvt0G2zyJIgA/docs/SafeToken.md)

### Contract Members

**Constants & Variables**

```javascript
contract AlkemiEarnVerified public alkemiEarnVerified;
```

**Events**

```javascript
event BorrowLiquidated(address  targetAccount, address  assetBorrow, uint256  borrowBalanceBefore, uint256  borrowBalanceAccumulated, uint256  amountRepaid, uint256  borrowBalanceAfter, address  liquidator, address  assetCollateral, uint256  collateralBalanceBefore, uint256  collateralBalanceAccumulated, uint256  amountSeized, uint256  collateralBalanceAfter);
```

### Functions

* liquidateBorrow(address targetAccount, address assetBorrow, address assetCollateral, uint256 requestedAmountClose)
* tokenAllowAll(address asset, address allowee)
* tokenTransferAll(address asset, address recipient)

#### liquidateBorrow

```javascript
function liquidateBorrow(address targetAccount, address assetBorrow, address assetCollateral, uint256 requestedAmountClose) public nonpayable
returns(uint256)
```

**Arguments**

| Name                 | Type    | Description |
| -------------------- | ------- | ----------- |
| targetAccount        | address |             |
| assetBorrow          | address |             |
| assetCollateral      | address |             |
| requestedAmountClose | uint256 |             |

#### tokenAllowAll

```javascript
function tokenAllowAll(address asset, address allowee) internal nonpayable
```

**Arguments**

| Name    | Type    | Description |
| ------- | ------- | ----------- |
| asset   | address |             |
| allowee | address |             |

#### tokenTransferAll

```javascript
function tokenTransferAll(address asset, address recipient) internal nonpayable
```

**Arguments**

| Name      | Type    | Description |
| --------- | ------- | ----------- |
| asset     | address |             |
| recipient | address |             |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.alkemi.network/earn-contracts/docs/liquidator.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
