Developers · Private OTC

Restrict a USDC deposit to one buyer wallet in code.

Private OTC turns a public deposit into a one-buyer route. It is the right tool when your product already knows the counterparty: a payroll-style payout, a negotiated trade, or a known-buyer settlement.

01

Create a restricted deposit

  1. 1Call offramp(walletClient, { amount, platform, currency, identifier, otcTaker }).
  2. 2The SDK creates the deposit, then attaches a whitelist hook for the otcTaker wallet.
  3. 3Read otcLink from the result and send it to the approved buyer.
  4. 4Any wallet other than otcTaker is rejected onchain before it can start a fill.
02

Manage restriction on existing deposits

HelperWhat it does
enableOtc(walletClient, depositId, taker)Restrict an existing deposit to one buyer wallet
disableOtc(walletClient, depositId)Remove the restriction and return the deposit to public
getOtcLink(depositId)Build the shareable buyer link for a restricted deposit
03

Why it takes more than one transaction

EscrowV2's createDeposit does not take a whitelist parameter, so the SDK attaches the hook in a follow-up transaction after the deposit exists. The restriction is enforced by the Base contract, not by the UI or the link, which is why a non-approved wallet is rejected onchain even if it has the link.

Onchain enforcement

The whitelist hook gates the deposit, not the link.

The OTC link is a convenience. The actual protection is the pre-intent hook attached to the Base deposit.

createDeposit takes no whitelist parameter, so the hook is attached in a follow-up transaction.

EscrowV20x777777779d229cdF3110e9de47943791c26300Efdeposit and hook attach
Whitelist hook0xda023Ea0d789A41BcF5866F7B6BBd2CaDF9b79B8blocks non-approved wallets
Buyer linkotc.usdctofiat.xyz/d/<escrow>/<depositId>one buyer, one URL

Common questions

How do I make a deposit private in code?

Pass otcTaker to offramp() when creating the deposit, or call enableOtc on an existing deposit. The SDK attaches an onchain whitelist hook so only that buyer wallet can fill, and returns an otcLink to share.

Can the approved buyer be changed later?

Yes. Use disableOtc to remove the restriction or re-run enableOtc with a new taker. Each change is an onchain update, and the new buyer must use the resulting deposit link.

Does private OTC remove payment-app risk?

No. It restricts who can fill the deposit. The fiat leg still happens through the chosen payment app, with that app's limits, reviews, and reversal behavior.