FAQ

Frequently asked questions about MARC Protocol.

What is FHE and how is it different from ZK proofs?

Fully Homomorphic Encryption (FHE) allows computation on encrypted data without decrypting it. Unlike ZK proofs which prove something is true without revealing the data, FHE actually keeps the data encrypted while still allowing smart contracts to operate on it. In MARC Protocol, balances and transfer amounts are stored as encrypted integers (euint64). The contract can add, subtract, and compare them without ever seeing the plaintext values. No trusted setup ceremony is required.

What does the silent failure pattern mean?

In FHE, encrypted boolean results cannot be used for conditional branching (if/else) in Solidity. If a transfer has insufficient balance, the contract cannot revert, because that would leak information about the balance. Instead, MARC uses FHE.select: if balance < amount, the transfer amount becomes 0. The transaction succeeds, events fire, but zero tokens move. This means servers bear a bounded risk of one free API response per failed payment. The SDK includes a SilentFailureGuard to detect suspicious patterns.

Are sender and recipient addresses private?

No, by design. Agent payment protocols require public sender and recipient addresses for payment verification. MARC Protocol encrypts what matters, specifically payment amounts and balances, while keeping participant identity public. This is complementary to ERC-8004 agent identity, which is intentionally public.

How much does it cost to use MARC Protocol?

Transfers between agents are FREE (zero protocol fee). Fees are only charged when entering or exiting the encrypted domain: wrap (USDC → cUSDC) and unwrap (cUSDC → USDC) cost max(0.1%, 0.01 USDC). Job completions via ERC-8183 have a 1% platform fee. Gas costs for transactions on Sepolia are paid in ETH.

What chains does MARC Protocol support?

Currently live on Ethereum Sepolia. Zama is expanding beyond EVM to other VM environments including Solana (SVM) and more. MARC Protocol will be available wherever Zama's FHE technology deploys, not limited to EVM chains. The goal is to follow Zama everywhere, across all virtual machine environments.

How does the 2-step unwrap work?

Unwrapping requires KMS (Key Management Service) decryption, which is asynchronous. Step 1: call unwrap() to burn encrypted tokens and request KMS decryption. Step 2: the KMS calls finalizeUnwrap() with the decrypted amount and a cryptographic proof. The contract verifies the proof, deducts the fee, and sends plaintext USDC. This typically takes a few seconds on Sepolia.

Can I use MARC Protocol without the SDK?

Yes. The SDK is a convenience layer. You can interact directly with the smart contracts using ethers.js, viem, or any Ethereum library. You'll need to handle FHE encryption via @zama-fhe/relayer-sdk, construct the x402 payment headers manually, and verify events on-chain yourself.

What is the NonceStore and why do I need it?

The NonceStore prevents replay attacks. The default in-memory store does not survive server restarts. For production, implement the NonceStore interface with an external store like Redis. The SDK includes a ready-to-use Redis implementation.

How does batch prepayment work?

An agent can prepay for N requests in a single transaction using recordBatchPayment(). The server grants credits and deducts them per-request without additional on-chain verification. This dramatically reduces gas costs for high-frequency API usage. Response headers include X-Batch-Credits-Remaining for tracking.

What is the difference between payAndRecord and two separate transactions?

payAndRecord() combines the confidential transfer and nonce recording into a single transaction, eliminating the risk of partial failure (where transfer succeeds but recording fails). It requires operator approval on the ConfidentialUSDC contract. Alternatively, confidentialTransferAndCall() uses the IERC7984Receiver callback pattern for atomic execution.

Is MARC Protocol audited?

MARC Protocol has been deep-audited internally at V4.3 with 800+ tests (305 contract, 328 on-chain, 173 SDK, plus plugin tests). All CRITICAL, HIGH, and MEDIUM findings have been fixed. A professional third-party audit is planned for V6.0.

What license is MARC Protocol under?

BUSL-1.1 (Business Source License). It converts to GPL-2.0 on March 1, 2030. This means the source code is viewable and the protocol is usable, but commercial forks require a license until 2030.

Still have questions?

Check the GitHub repository for full source code, or open an issue for technical questions.