zSwap and DeFi Adaptors: Unlocking private DeFi usage

zSwap is the very first use case for Panther’s DeFi Adaptors and one of Panther’s v1 most important features. Here’s how it works.

zSwap and DeFi Adaptors: Unlocking private DeFi usage

Table of Contents:

In our latest monthly update, we shared the user interface for zSwap, the very first use case for Panther’s DeFi Adaptors… and one of the most important features of Panther’s v1.

zSwap allows users to execute swaps on most liquid DEXs with a high degree of privacy. As such, it is the first piece of Panther’s plan to enable private access to DeFi from multiple fronts.

Let’s take a look at how it all works.

But first, what are DeFi Adaptors?

One key component that will help realize Panther’s vision of private DeFi access is to develop plugins that are specific to existing protocols and connect them to Panther Pools (Panther’s private Multi-Asset Shielded Pools). This overall solution is referred to as DeFi Adaptors.

Each plugin enables zAssets (assets shielded in a Panther Pool) to interact with DeFi protocols by passing relevant values and function types, resulting in a seamless transaction flow while maximizing the benefits of both protocols for the user. Thanks to this system, users gain access to Panther’s zero-knowledge privacy without having to let go of the underlying security of the blockchain networks Panther is deployed on.

Panther’s catalog of DeFi Adaptors will be ever-expanding to interact with a broad range of DeFi dApps and protocols, starting with some of the ecosystem’s most popular applications –DEXs, NFT marketplaces, and lending/borrowing protocols. Each of these different interaction types will have a dedicated Adaptor and, as you will see below, the DeFi Adaptor dedicated to swapping assets through DEXs is called zSwap.

Panther’s Multi-Asset Shielded Pools connect to DeFi dApps through custom plugins. The overall solution is what we refer to as “DeFi Adaptors.”

Since Panther’s vision is to give users the ability to access DeFi with full privacy, Adaptors play a key role in enabling them to break the on-chain link between their assets and their DeFi activity. Like Panther Pools, DeFi Adaptors will be debuted in Polygon at the release of Panther’s v1. If you want to learn more about zAssets and Panther Pools, please see this article.

zSwap’s user interface.‌ ‌

The first use case for DeFi Adaptors, zSwap, is designed to facilitate swap transaction flow towards some of the most widely used protocols in the Polygon DeFi ecosystem –Quickswap, Uniswap v3, and Curve. This functionality is found within the “Swap” tab in Panther’s decentralized application (dApp).

zSwap features a user interface similar to those of the DEXs mentioned above for a familiar user experience. It also allows users to dictate the token IDs for the assets they want to sell/buy from a list of accepted assets (see below), enabling them to choose the specific swap pair they wish to trade. Users can also input the amount of the sell token they wish to trade, and the zSwap function will query an exchange rate based on these inputs and provide users with up-to-date values. This ensures that users can make informed decisions about their trades and optimize their transactions for the best possible outcome.

zSwap’s goal is to cater to a wide range of user types, including retail users, institutions, and market makers. At v1, zSwap will support the interaction with three different platforms, with the ability to highlight the best platform or “route” for users to conduct their swaps, allowing them to swap tokens at the most favorable rates and incur smaller fees.

Economic optimization of swapping opportunities

zSwap uses advanced algorithms to identify the optimal routing path for the trade execution while allowing the user to choose other sub-optimal options if that is their preference. It provides an optimized user experience by automatically defaulting to the platform with the least price impact based on the trade variables that the user is wishing to execute.

Additionally, zSwap displays a calculation of the difference between the best available opportunity and the rest of them in terms of the price impact of each DEX (e.g. a trade could feature a 2% impact in Curve as opposed to a 0.3% on in Uniswap). In the future, zSwap might be expanded to support more DEX integrations to allow further diversity of asset flow and access to deeper liquidity.

zSwap screen, featuring the routing functionalities.

How zSwap enables user privacy in DeFi

The ability for users to swap assets privately serves a double purpose:

  1. Allowing users to trade between all whitelisted assets available using the platforms above.
  2. Contributing to the privacy that Pools provide to users holding assets within them. In other words, no one can link assets within the pool to specific users since they have the ability to swap assets and trade with one another within it, even if deposits/withdraws to the Pool itself are viewable by observers.

Comparing Panther’s privacy to a typical transparent L1 blockchain when swapping assets.

The Panther DAO can propose assets for whitelisting at any time since whitelisting an asset requires a manual configuration. For the protocol’s first release, Panther will roll with the following assets:


  • USDC
  • USDT
  • DAI

Other tokens:

  • wETH
  • wBTC
  • CRV
  • LINK

These tokens represent the largest DEX flow on Polygon and, as such, can aid Panther’s goal of bootstrapping its privacy through user activity. Further integrations can then be leveraged as activations on their own and help the protocol’s organic growth by engaging the communities associated with them.

User path

The following scenario may help you understand how zSwap works in a practical setting.

  1. Alice wants to swap her ETH for USDC. As a privacy-conscious user, she already holds her ETH as zETH within Panther Protocol (ETH deposited into a Panther Pool, helping others in the process by increasing the Pool’s size and its mixture of assets). This grants her access to the privacy-preserving functionalities of zSwap. Alice then proceeds to the Swap page on the Panther dApp’s interface.
  2. Alice navigates to the left side of the UI and chooses the selling token and an amount based on her historical deposits (for example, zETH). She then chooses the receivable token (for example, zUSDC.
  3. zSwap automatically calculates the exchange rate between the sellable and receivable asset (e.g. 1750 zUSDC per 1 zETH) according to real-time market data from DEXs.
  4. zSwap will automatically display the best swapping route identified, as well as the details of the swap. Alice can choose to expand the list of DEX routing options to compare the costs of using a different DEX and select it if she decides to do so.
  5. After Alice finds a preferred option among all the DEX options available, she executes the transaction by pressing the Swap button.
  6. Once her transaction successfully goes through, the newly deposited asset (in our example, USDC) is delivered to Alice as a zUSDC. Alice also gets rewarded for conducting a transaction on zSwap through Privacy Reward Points (PRPs), which reward users for increasing the anonymity rate of the Panther ecosystem. Should there be an issue that causes the transaction to fail at any step of the way, Alice’s asset balance would remain unchanged.

About Panther

Panther is a chain-agnostic privacy layer that allows users to access DeFi privately and compliantly, maintaining control of their transactional and historical data. Its users can execute transactions and deploy assets across DeFi. Panther’s zero-knowledge primitives are also generalizable to KYC, selective disclosures between trusted parties, private ID, voting, and data verification services.

Users access Panther’s privacy by depositing assets from different chains into Multi-Assed Shielded Pools (MASPs or simply Shielded Pools). Shielded Pools exist in different chains, interconnected by zBridges. Using DeFi Adaptors, users can also deploy their assets into DeFi dApps/Protocols, or they can transact with and swap them privately within MASPs.Since Panther’s privacy is enabled by zero-knowledge proofs, users can disclose any part or the whole of their transaction history to anyone at will. They can also choose to withdraw their assets from MASPs into stealth addresses. Panther also features ZK- and non-ZK Reveals.

Share this article on: