# Zapper Framework

**Unified Modeling of Zap Actions as Swaps:**\
The zapper framework integrates seamlessly with the DynaRouterAPI, simplifying and optimising interactions with DeFi vaults and liquidity pools. It models deposits into vaults as a swap from contribution tokens to vault shares. The underlying vault zapper contracts facilitate the transparent exchange of contribution tokens into deposit tokens of the vault. Similarly, liquidity zapper contracts manage the addition or removal of liquidity using a single underlying AMM weighted pool token.<br>

**Predictable Cross-Protocol Optimal Routes:**

By modelling all zap actions as swap actions, the router framework can select the optimal output amount by previewing vault share redemption against the preview of a swap of vault shares in a decentralised exchange.\
\
**Fine Grained Access Control:**\
For regulated tokens or closed beta launches, Singularity Finance has developed a TokenWhitelistRegistry that manages access to different token routers and zappers.<br>

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXd3b9Wg5DvDFqIGblUBqs7WiPaHNnm_On60S9xBHeoPuzebH_D4Km6zWFjmTstU-BY7SM0jlvWf2yd4y-jG6oibv5faRIrAOQmXiCaJS_gI-iAIzG090sZeU1POzr8k8OoqQtAP?key=HUJOBXQsrKa0DOk8r_dxjpBF" alt=""><figcaption></figcaption></figure>


---

# 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.singularityfinance.ai/sfi-value-proposition/core-pillars-of-the-sfi-l2/sfi-vaults/features/zapper-framework.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.
