Skip to main content
The Zama integration gives access to confidential vaults: vaults whose deposit and balance amounts are encrypted on-chain with Zama’s fully homomorphic encryption (FHE). You deposit the confidential version of a token (cUSDC, cUSDT, cWBTC or cAUSD) and receive an ERC-7984 confidential share token. Each mainnet vault is a Morpho Vaults V2 vault wrapped for confidentiality, so the strategy underneath is public while each holder’s amounts stay private.

Availability

All six vaults are on Ethereum mainnet. For testing, ethereum-sepolia-usdc-zama-steakhouse-usdc-confidential-vault runs on Ethereum Sepolia with test cUSDC and a zero reward rate. Enable the Zama yields for your project in the Yield.xyz dashboard, from the project’s enabled-yields list. If you do not have a project yet, set one up first. Then query GET /v1/yields?providers=zama for the live list of Zama vaults enabled for your project. Contract addresses are on the yield object, in the tokens, rewardTokens and argument options, so read them from there rather than hardcoding them.

Confidential tokens

A confidential token is an ERC-7984 token whose balances and transfer amounts are encrypted on-chain. Each one wraps a plain ERC-20 token and holds the same value. A Zama vault takes the confidential token, not the plain one. How a user takes a position depends on what the wallet holds:
  • The wallet holds cUSDC. It deposits cUSDC directly.
  • The wallet holds USDC. It wraps USDC into cUSDC first: an approval of USDC if the allowance is short, then a wrap on cUSDC, which is the wrapper contract for USDC. The Zama widget sends these transactions for the user, and the Zama API guide shows them in code.
Wrapping keeps the value one to one. Confidential tokens have 6 decimals, so cUSDC, cUSDT and cAUSD match their plain tokens unit for unit. WBTC has 8 decimals, so wrapping rounds the amount down to a multiple of 0.000001 WBTC and refunds the rest to the wallet. To get the plain token back from a vault, use an instant exit, which pays out the plain token, such as USDC, directly. A private exit pays out the confidential token. Yield.xyz does not unwrap a confidential token held in the wallet; the wrapper contract itself supports a two-step unwrap, covered in the Zama wrapper docs linked above.

How confidential deposits work

When you deposit, your app encrypts the amount with the Zama SDK before it goes on-chain, so the amount never appears in plain form. To keep the chosen vault private too, a deposit carries an encrypted amount for every Zama vault of that asset: the real amount for the vault you chose and an encrypted zero for each of the others. Anyone reading the chain sees a deposit into every vault of that asset and cannot tell which one holds the real amount. Deposits do not enter the vault one by one. They join a batch, and the batch settles against the vault as one combined amount. Your position starts earning when its batch settles.

Batch schedule

The yield’s investmentSchedule exposes this schedule (see Yield metadata), and a pending position’s date shows when its batch is due.

Entering

You enter with the confidential token only, and the action returns one DEPOSIT transaction. The Earn API takes encrypted amounts only: a request with a plain amount is rejected with “Confidential vaults take encrypted amounts only”. Your app encrypts the amount with the Zama SDK and sends the encrypted values as action arguments. The Zama API guide covers the arguments and the encryption step by step. The Zama widget handles wrapping and encryption for the user, so a widget integration needs no Zama code of its own.

Exiting

A Zama exit is either private or instant. You pick one with the exit’s outputToken.
  • Private. Omit outputToken or set it to the confidential token. The withdrawal joins the next daily batch and pays out in the confidential token, so the amount stays encrypted.
  • Instant. Set outputToken to the plain token (for example USDC). The withdrawal does not wait for a batch, but the amount becomes public. It finishes with a WITHDRAW pending action on the withdrawable balance.
The Zama API guide covers the transactions for each path, including the public decrypt step of an instant exit.

Pending requests and canceling

A deposit or private withdrawal made through Yield.xyz actions shows, while it waits for its batch, as an entering or exiting balance with a CANCEL_PENDING pending action, submitted through POST /v1/actions/manage. Canceling returns everything that wallet has in that batch, including amounts added to the same batch from the Zama app. A batch cannot be partly canceled, and a batch that has been sent to the vault cannot be canceled. While a cancel is waiting to confirm, the position stays listed without a cancel action.

Balances

Zama balances are encrypted. A Zama balance has isEncrypted: true, an empty amount, the encrypted handle in shareAmountRaw, and no USD value. Only the owner can reveal the amount, by signing a decryption permit with their wallet. See Balances and positions for the balance types.
After a deposit or a private withdrawal, positions in other Zama vaults of the same asset can appear. They are encrypted like any other Zama balance and reveal as zero. They come from the encrypted zero amounts sent to the vaults you did not choose, which is how Zama keeps the chosen vault private.

Reward rate

The reward rate is the base APY of the underlying vault. Share value rises as the vault earns, and no claim step is needed.
Zama campaign incentives need a separate opt-in in the Zama app. The Earn API and the widget do not perform this opt-in, and the reward rate does not include these incentives.

List the live yields

Copy this request to list the Zama yields enabled for your project. Yield IDs change as vaults are added, so query the API rather than hardcoding them.

Next steps

Zama API

Encrypt amounts, enter, exit, cancel, and reveal balances through the Earn API.

Zama widget

Offer Zama vaults in the widget, with wrapping and encryption handled for you.

Vaults

Compare Zama against other vault integrations.

Zama documentation

Zama’s own docs on the protocol, confidential tokens and the SDK.