[How Privacy Boost Works #3]: Using Private Assets in DeFi Without Leaving the Pool
![[How Privacy Boost Works #3]: Using Private Assets in DeFi Without Leaving the Pool](/_next/image?url=%2Fblog-external-gateway.png&w=3840&q=75&dpl=dpl_7HmqkwqS3iiyPbdLYNnJwozEJEPV)
tl;dr
- Privacy Boost V2's External Gateway lets users swap tokens and interact with DeFi vaults directly from private balances, without first exposing assets through a personal public wallet.
- It currently supports 30+ Morpho vaults on Base and Optimism plus 1inch-routed swaps, while keeping both successful outputs and failed-operation refunds inside the private pool.
- The design adds a privacy layer without rebuilding existing DeFi protocols, allowing users to tap into existing liquidity while obscuring which pool participant initiated the transaction.
Privacy has always been a concern in onchain DeFi. If someone knows a wallet address, they can keep watching which tokens that person buys and how much they deposit into which vaults. Privacy Boost had the same limitation. It could hold assets privately, but swapping tokens or depositing into a vault meant moving them back out into the open.
External Gateway in Privacy Boost V2 is built to reduce this problem at the point where assets are actually put to use. With it, users can execute external DeFi operations using the private assets held inside Privacy Boost, then bring the resulting assets back into their private balance.
On this foundation, Privacy Boost now supports deposits and redemptions across 30+ Morpho vaults on Base and Optimism, as well as swaps routed through the 1inch aggregator. Supported chains and DeFi protocols will expand gradually over time.
Two problems with private DeFi
DeFi is one of the main ways onchain assets are put to use. Assets should do more than sit in storage or move between wallets. They should be exchangeable for other tokens, and deployable into protocols that can later be withdrawn from as needed.
However, when a privacy protocol supports only transfers and custody, users face the same choice every time: leave the assets private and idle, or give up privacy by moving them to a public wallet in order to use the DeFi protocols they want. The moment they choose the latter, a record of the activity is left on that public wallet, and those records can reveal sensitive information such as portfolio composition or trading patterns.
Another approach is to build DeFi from the ground up for private use cases, using privacy-preserving cryptography such as FHE. This approach, however, cannot tap into the deep liquidity that already exists onchain. Liquidity would need to be bootstrapped from scratch, and the DeFi logic itself would need to be rebuilt.

The Gateway introduced in Privacy Boost V2 connects the private ledger inside Privacy Boost with existing DeFi services. In other words, it executes external operations from the pool and receives the resulting assets back into the pool, all within a single transaction and without routing through the user's personal public wallet as an intermediate stop.
Example: Deposit flow
Consider depositing USDC into a standard ERC-4626 vault through the Privacy Boost Gateway. The flow works as follows.

- Step 1: Authorize what will be done. The user decides the target vault, the deposit amount, the minimum amount of shares to receive, and the execution deadline. This authorization is more than a simple permission to spend the asset. It is bound to the specific operation to be executed and the conditions under which the result is accepted.
- Step 2: The server generates a ZK proof and submits a transaction onchain. The Privacy Boost server generates a ZK proof that includes verification of the user's authorization above, then submits a transaction that verifies the proof and executes the operation.
- Step 3: The Gateway executes the external operation. Once the proof verifies that the authorized private assets can be spent for the specified operation, the Gateway deposits them into the approved vault. The share tokens issued by the vault return to the shielded pool instead of the user's public wallet.
- Step 4: The result is reflected in the private balance. The pool checks the actual amount of tokens received and processes the deposit.
Withdrawing later runs in the opposite direction. The privately held share tokens are used to redeem assets from the vault, and the returned assets are brought back into the private balance. The same connection structure is used for token swaps as well.
Privacy only on success is not enough
DeFi actions such as swaps can often fail. A call may revert, or the amount of tokens obtainable may fall short of the minimum the user specified. To handle these cases, the Privacy Boost Gateway is designed to process assets privately on failure as well.
When a user passes an action to the Gateway, they also authorize how the input assets should be handled if execution fails, alongside the success path. If the external call fails, or if the deadline passes before it can be executed, the input assets allocated to that call are returned to the shielded pool as the original token and become part of the private balance again.
A structure that fits naturally into existing DeFi
Adding privacy to DeFi does not require rebuilding vaults or swap protocols from scratch. An existing DeFi vault receives assets and issues share tokens. A swap protocol receives input tokens and exchanges them for other tokens. These protocols generally do not need to know which participant in the private pool initiated the operation.
The Gateway takes advantage of this. It sends requests to external protocols through their existing interfaces, while user authorization and ownership verification of private assets are handled within Privacy Boost.
Privacy can be added without changing most of the core DeFi logic, in a way that never reveals which pool participant executed the public operation. Outside observers can see asset movements through the pool and the Gateway, but there is no need to attach the user's personal public wallet address to the call as the executing party. The resulting assets are returned to the pool and credited to the user's private balance.
Thanks to this structure, privacy can be extended while still leveraging the liquidity and functionality of existing protocols.
Conclusion
The Gateway in Privacy Boost V2 leaves the logic of existing DeFi protocols untouched while concealing who used them. Swaps and deposits are possible without withdrawing assets to a public wallet, and even if execution fails, assets return to the private balance. The goal of this update is to remove the trade-off between keeping assets private and putting them to use in DeFi.
See Privacy Boost in action
Explore the privacy infrastructure behind confidential onchain finance.
Read next

Privacy Boost is Now Live on Base
Anyone on Base can now manage assets end-to-end privately: shield a balance, privately swap and earn, and send and receive without exposing the counterparty or the amount. Fully self-custodial, on the wallet setup you already use.

Privacy Boost V2: End-to-End Onchain Privacy
Privacy Boost V2 is live: private lending and swaps through Morpho, Aave, and 1inch, support for the MPC and Safe wallets you already use, and Portal addresses that shield incoming funds without exposing who's depositing.