Milestones and private trades

OTC Crypto Escrow for Private Trades

An OTC crypto escrow can hold the payment for a private trade. One DeFiEscrow contract cannot swap ETH for USDC inside a single deal.

· 4 min read · DeFiEscrow

An OTC crypto escrow is a way to lock the payment for a private trade until both sides approve. Over-the-counter means you are not clicking a public order book. You have a counterparty, a price, and a delivery that may be another token, a wire, or something that is not a token at all. DeFiEscrow can hold the asset that is being locked. It cannot, inside one escrow, swap ETH for USDC. One escrow, one token. If your trade is two tokens crossing, you need a structure that respects that, or you need a different instrument, such as an atomic swap, which this contract is not.

That limit is the whole design conversation. Ignore it and you will build a trade that looks hedged and is not.

What one token can honestly lock

The clean pattern is a payment escrow. The buyer deposits USDC or USDT for the agreed dollar amount. The seller delivers the other asset outside this contract: ETH to the buyer's wallet, a wire, a balance on an exchange both people accept, a piece of equipment, an account credential you are willing to transfer this way. Both parties approve only after each has what the agreement required. Release credits the seller the stablecoins. If the approval deadline passes without both approvals, the buyer can get the deposit back.

The seller's delivery is not escrowed by this contract. You are trusting the sequence and the other person's incentive. The seller does not want to deliver and then have the buyer refuse to approve, but the buyer's refusal ends in a refund of the buyer, not in payment to the seller. So the seller should not deliver the off-chain asset until they are ready to approve, and the buyer should not approve until the off-chain asset has arrived. Write that order down. A common wording is: seller delivers, buyer confirms, both approve, then either of them can release.

If the seller delivers and the buyer stalls, the seller's remedy inside the contract is limited. They can raise a dispute, which freezes release and, after 30 days, refunds the buyer. That is a bad outcome for a seller who already delivered. Dispute behavior is not a court that awards the USDC to the person who performed. For that reason, OTC against an off-chain delivery works best when delivery and approval happen in the same sitting, or when the off-chain asset can be reversed, or when the amount is one you can enforce some other way. It is a weak fit for "ship the container, then wait a month for their approval."

What one token cannot do

You cannot deposit ETH and USDC into the same DeFiEscrow and have them trade places. The create function takes a single token address. People sometimes imagine two escrows crossed: Alice escrows USDC payable to Bob, Bob escrows ETH payable to Alice, and each approves when the other escrow is funded. That can be coordinated, and it is not atomic. One person can approve their side, the other can walk away before approving, and you are back to deadlines and refunds that may not line up in time. If you attempt it, treat it as two deals with two sets of deadlines, and assume one of them can refund while you wished they were glued together.

An atomic swap, or a purpose-built exchange contract, is the tool that either completes both legs or completes neither. This escrow is the tool that holds one leg under an approval rule. What the contract cannot do states that in one place so it does not get rediscovered mid-trade.

NFTs and arbitrary tokens are out as well. If the thing being sold is an NFT, this contract does not take custody of it. You can still escrow the payment token and transfer the NFT yourself before you approve. The same delivery risk as any other off-chain, or off-this-contract, asset applies.

Price, fee, and the addresses

Agree the amount in the token you will actually lock. A price of "2 ETH, paid in USDC at the spot price on Tuesday" needs a number before the escrow is created. The contract will not read a price feed. Type the USDC amount. The 1% protocol fee is on that amount. Decide whether the buyer adds it or the seller receives net of it. ETH versus USDC versus USDT matters here because a private trade quoted in dollars should usually be locked in a stablecoin, and a trade quoted in ETH should not be quietly converted unless both of you saw the number.

Both wallets should be checked out of band. An OTC counterparty who asks you to rush a deposit to a slightly different address is not in a hurry. They are changing the party. Only the named address can deposit, and only the named withdrawer is credited on release.

Set the approval deadline to the delivery window, not to "sometime this quarter." A long window is a long time a seller can be stuck having performed, or a buyer can be stuck having locked funds, while the other person goes quiet. If the trade is not done when the deadline passes, the refund path is the feature.

A short rule for private trades

Lock the asset this contract can hold. Move the other asset in a way you can verify before you approve. Do not approve early to be polite. Do not describe two crossed escrows as a swap that cannot fail. An OTC crypto escrow is a locked payment with a refund if the approvals never arrive. Used inside that description, it is a reasonable way for two people to trade without handing a custodian the tokens. Used as a story about guaranteed simultaneous exchange, it is the wrong story.