# Liquidity ZAP Contract

### Address

### Init Function

```
function initUniswapZAP(
    address token, 
    address WETH, 
    address tokenWethPair
) 
    public
```

| Parameter     | Description                        |
| ------------- | ---------------------------------- |
| token         | Address of the token from LP pair. |
| WETH          | Address of WETH.                   |
| tokenWethPair | Address of the LP pair.            |

Initializes LP addresses.

### ZAP and unZAP Functions

```
function zapETH() external payable returns (uint256 liquidity)
```

Adds liquidity taking only ETH tokens.

```
function zapTokens(uint amount) external returns (uint256 liquidity)
```

Adds liquidity taking only Tokens.

```
function unzap() external returns  (uint amountToken, uint amountETH)
```

Unzaps LP to respective Token and ETH amounts.

```
function unzapToETH() external returns (uint amount)
```

Unzaps LP to ETH only.

```
function unzapToTokens() external returns (uint amount)
```

Unzaps LP to Token only.

### Read-Only Functions

```
function getLPTokenPerEthUnit(uint ethAmt) public view  returns (uint liquidity)
```

Returns how many LP tokens is user able to get with given ETH amount.


---

# 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://instantmiso.gitbook.io/miso/dev/pool-liquidity-smart-contract/liquidity-zap-contract.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.
