# About ZAP

## **A gas efficient tool to join and exit PowerPool indices** <a href="#c6d3" id="c6d3"></a>

## What is ZAP?

We have launched a one-click solution that allows users to join or exit indices with only USDC or ETH by leveraging ZAP contracts.

Supplying or redeeming liquidity from a Smart Portfolio may involve multiple transactions, tens of them for some methods. At that scale transaction fees can quickly eat into a users profit margin even with a sizable deposit and a long time horizon.

**Value proposition**\
1\. Supply and withdraw liquidity using a one click transaction

Zap is a gas efficient tool to pool resources with other users for deposits and withdraws from PowerPool indices.&#x20;

2\. Minimal gas costs: ERC20 transfer + cost of approval transaction

### How does it work?

**How It Works (PIPT/YETI/ASSY):**\
Users can deposit ETH and USDC to the special smart contract where funds will be stored. Once every 24 hours the Poker Agent, PowerOracle v2 Price Reporter, calls the ZAP contract and the ZAP interacts with an ERC20 PIPT Swap. The PIPT swap contract is responsible for buying the Index basket for ETH/USDC which is then supplied to the Index. Finally, all users that deposited funds receive Index tokens based on their supplied liquidity.

Users supply a single token type (may vary by index) to the ZAP contract with a single transaction. Tokens are stored in the ZAP contract until either a certain dollar amount has been reached OR 24 hours has elapsed, at which point all the funds will be deposited into the assets underlying the index assets or pools.&#x20;

**How It Works (YLA):**\
YLA is relatively much more complex to join or exit since Yearn v1 Vaults don’t have external markets or liquidity pairs. Currently, YLA is the main liquidity pair for them. Therefore, USDC deposits and withdrawals require USDC to be deposited in five Curve Pools, then deposit these LP tokens in Yearn vaults, and after that deposit these five LP tokens into YLA. This process involves more than 20 transactions in total, counting approvals, and \~$800 in gas costs. Sounds crazy, right?

### What are the tradeoffs?

While this is the most gas efficient method to gain exposure to the underlying assets and pools it comes at another cost, time. For users who aren't time sensitive and don't mind waiting up-to 24 hours to enter an index this is a great solution to save on transaction fees.


---

# 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.powerpool.finance/powerpool-and-poweragent-network/smart-portfolios/index-products/about-zap.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.
