Skip to content

Decentralized OTC Contracts for Issuers and Tokenizers of RWAs

Protofire writes decentralized OTC contracts for tokenizers and issuers. Wallets you permit take offers on your own assets, and both legs settle in one transaction. In 2021 we built the DEX core and subgraph for Swarm Markets and contributed to its dOTC. You operate the venue and run KYC.

Luis Medeiros

Reviewed by Luis Medeiros, Field CTO at ProtofireLast reviewed: November 2026

On this page
  1. Overview
  2. Why it matters
  3. Why Protofire
  4. How it settles
  5. What you get
  6. Regulation
  7. How it runs
  8. How work starts
  9. License
  10. Not the right fit
  11. Related guides and services
  12. FAQ

Work shipped for 60+ networks and 95+ protocols, including

  • Chainlink
  • Ethereum
  • Solana
  • Safe
  • Ripple
  • Aave

Decentralized OTC for block trades in tokenized assets

A decentralized OTC contract handles block trades in a tokenized asset. One wallet posts an offer, another wallet takes it at the offer's price, and the contract settles both sides. For example, you issued a tokenized bond to verified investors. One of them now wants to sell a large block, and your head of treasury asks where that trade can happen.

Protofire writes decentralized OTC contracts for the asset, the access rules and the chain you run. Pooled trading is our DEX development work. The issuance platform behind the token is our tokenization infrastructure service.

Who builds and who runs a dOTC venue

The contracts reject a take from a wallet that the authorization contract does not approve. Your keys hold the owner, manager and escrow roles.

Protofire builds

Offer, take and escrow contracts

Wallets make, cancel and take offers through these contracts, which handle expiry and partial takes and settle each take in one transaction.

Authorization hook, tests and launch scripts

The hook is the one-function check that your KYC answers. Tests cover each rejected take, and the scripts deploy the contracts.

Front end and offer indexer

The front end lists offers and lets wallets take them. The offer indexer behind the page keeps that list.
The venue operator

Owner, manager and escrow roles

These keys set the fees, the addresses and the escrow's powers, and they run the launch scripts.
The venue operator and its KYC provider

KYC and wallet approval

The operator and its KYC provider decide which wallets pass the authorization check.

Why a pool does not fit block trades in permissioned tokens

A token built to ERC-3643 refuses a transfer to a wallet that is not a verified identity.The standard says: "The receiver MUST be whitelisted on the Identity Registry and verified" (EIP-3643). So a public pool address cannot receive the token unless someone registers it.

Where a pool is allowed, a large order is visible before it settles. The ethereum.org docs describe how a searcher "will watch the mempool for large DEX trades" and trades ahead of and behind them (ethereum.org).

Pantera Capital's market data describes OTC secondary trading in whitelisted tokens as limited. Its State of Tokenization Q1 2026 report (May update) scores how assets transfer. The score for "Whitelist-gated transfers" reads "Limited OTC secondary" (Pantera).

For the illiquid assets, assets that are inherently illiquid off-chain, tokenizing them doesn't suddenly increase liquidity or demand for trading these assets.
Alan Chiu, Co-Founder, Boba Network, The Protocol Roundtable, episode 2, 23 April 2026 · Ghost Town Markets, 23:07

Our record: the Swarm Markets DEX, its dOTC and Solhint

In 2021 Protofire built the DEX core (a Balancer fork) and subgraph for Swarm Markets and contributed to its dOTC.Swarm Markets was a BaFin-licensed DEX at launch where only KYC-verified wallets trade. Swarm held the license and ran the KYC.

Swarm Markets DEX core, subgraph and dOTC, 2021

Both repositories from the Swarm Markets build are public. One is a fork of Balancer's core (swarm-markets-balancer-core, GPL-3.0). The other is a fork of Balancer's subgraph (swarm-markets-subgraph, MIT). Both were created on 25 February 2021, and their last pushes were in September and December 2021. The case study describes the build. A dOTC contract has to fit this kind of setting: a venue with a license and verified wallets.

Solhint, the Solidity linter

Protofire maintains Solhint, our open-source Solidity linter, which has been downloaded 25M+ times from npm. Contracts of this kind are the code Solhint reads.

How a dOTC contract settles trades and who holds its roles

In Swarm's open dOTC v2, the maker's asset goes into an escrow contract when the maker makes the offer.A take then settles in one transaction. Protofire describes Swarm's design because the escrow decides who needs which role (open-dotc, Swarm's own repository).

An offer names the asset the maker deposits and the asset the maker wants. It also names a price, an expiry and, optionally, the wallets allowed to take it. A taker names an offer, and the contract does the rest. In the same function, the taker's payment goes to the maker and the escrow releases the maker's asset to the taker. If either step fails, both revert. There is no AMM pool, no pricing curve and no matching engine. Swarm's documentation adds that the maker chooses partial or all-or-nothing takes (Swarm docs).

The dOTC contract checks access offer by offer. The maker can restrict an offer to named wallets or to wallets that an authorization contract approves. The authorization contract needs one function, isAccountAuthorized, and your KYC provider or your own registry answers it (KYC Select).

The escrow holds the deposits of all open offers, so its owner and manager roles matter. In Swarm's v2, the owner of the manager contract can change the fees and the dotc and escrow addresses. PeckShield's audit report of 18 January 2025 lists this power as a medium finding, PVE-004, "Trust Issue of Admin Keys", and marks it mitigated. In the build Protofire writes for you, you hold those roles.

What Protofire delivers in a dOTC build

Block trades between wallets you permit

Holders trade a large position at an agreed price without a pool in between. Protofire writes offer, take and cancel contracts for your tokens. Swarm documents its dOTC for ERC-20, ERC-721 and ERC-1155 assets.

Access rules you choose

You decide who may take an offer: named wallets, an authorization contract, or both. Protofire writes the authorization hook and connects it to your registry, or to your KYC provider through our compliance integration work.

Fixed prices or prices from a reference feed

An offer can have a fixed price, or a price set from a reference feed inside a band you choose. Dynamic prices are available where a feed exists for the asset. Protofire connects that feed through our oracle integration work.

Owner, manager and escrow roles at your addresses

These roles go to your addresses. Your engineer runs the launch scripts with your key. Protofire hands over the access configuration and the documentation with the scripts.

A front end and indexer for open offers

The front end lists open offers and lets permitted wallets take them. An indexer that you can host runs behind the page. Protofire builds the subgraph and the page for your assets.

When a decentralized OTC offer board becomes a regulated venue

The EU and US texts define a regulated trading venue by what its system does.

In the EU, a multilateral trading facility is a multilateral system that an investment firm or a market operator operates (MiFID II, Article 4(1)(22)). Such a system brings together multiple third-party buying and selling interests in financial instruments. It does so in the system and in accordance with non-discretionary rules, in a way that results in a contract. Each Member State must require prior authorization for investment services provided as a regular occupation or business on a professional basis (Article 5(1)).

For crypto-assets, operating a trading platform means managing one or more multilateral systems (MiCA, Article 3(1)(18)). These systems bring together, or facilitate the bringing together of, multiple third-party purchasing and selling interests in crypto-assets. They do so in the system and in accordance with its rules, in a way that results in a contract. A person may provide crypto-asset services in the Union only if it is authorized or is a regulated institution that MiCA lists (Article 59(1)).

In the US, a federal rule sets two conditions (17 CFR 240.3b-16(a)). A group of persons that meets both is treated as providing "a market place or facilities for bringing together purchasers and sellers of securities". First, the group brings together the orders for securities of multiple buyers and sellers. Second, it uses established, non-discretionary methods under which those orders interact and the buyers and sellers agree to the terms of a trade.

Whether a particular offer board is such a system depends on its design and on who operates it. The operator decides that question with its counsel and its regulator before launch.

How a dOTC build with Protofire runs

A Protofire dOTC build starts from your token and your access rule.It ends with launch scripts that your engineer runs.

  1. Step 1

    Asset, access rule and venue operator

    You name the token standard and the chain, who may take an offer, and which firm operates the venue and runs KYC. A permissioned token adds one requirement: the escrow contract needs an identity of its own, with the claims the token requires.
  2. Step 2

    Contracts and tests

    Protofire writes the offer, take, cancel and expiry paths and the authorization hook. We also write a test for each rejected take, including a take where one leg fails and both legs revert.
  3. Step 3

    Outside smart contract audit

    The contracts and tests go to an outside smart contract audit. An audit does not guarantee the absence of bugs. PeckShield's report covers Swarm's code at the audited commit and does not cover your build.
  4. Step 4

    Handover and launch by your engineer

    Protofire hands over the launch scripts, the access configuration and the documentation. Your engineer runs the scripts with your key, and you onboard your participants.

How work with Protofire starts

Work with Protofire starts when you send your token and chain and the access rule you want.You also name the firm that will operate the venue and run KYC. Each rule becomes a check in the authorization hook or a role in the launch scripts. Our how we work page describes the full process.

Proposal
In writing, one business day after the discovery call: findings, a plan in phases and the first step we recommend.
Price
Fixed per phase when you commission it, against written acceptance criteria. Overruns inside them are ours to absorb, invoices follow delivered milestones, and you can stop at any phase boundary. Anything we operate after launch is priced in the proposal as its own recurring line, with the notice to end it.
Ownership
Code we write for you, contracts, the keys and credentials this work creates and the accounts your infrastructure runs in are yours by contract, within the license of any third-party software involved. Keys that a custody platform or a staking provider holds under its own key model stay with it under your contract; every other custody key stays with you or the custodian you appoint. Where the scope places something on servers we rent, it says what moves to you and when. An NDA is available from your first message, and we sign a data processing agreement (DPA) together with it.
After launch
Delivery closes with a hypercare window and a defect warranty, with their terms written into the proposal. A service we operate continues under its written scope until that scope ends.
Access
Read-only by default. A role that can start requests only if your written scope names one; never a signer, approver, administrator, key holder or recovery role on your contracts, wallets or custody platform. Services we build call each platform on credentials your staff issue and keep in your vault. Anything that approves or moves funds runs in your environment, and a scope under which we operate a service lists every write call it makes. Where the scope has us operate nodes, validators, monitors, explorers or indexers, it names the role and any key we hold on those servers, and in your own cloud account you can remove it.
Licenses
Protofire is an engineering firm and holds no financial or crypto-asset license; licensed activity stays with you and your providers.

How we work shows a worked proposal.

License check for builds that start from Swarm's code

A dOTC build that starts from Swarm's published code needs a license check first.In Swarm's open-dotc repository, DotcV2.sol, DotcEscrowV2.sol and DotcManagerV2.sol each include the notice SPDX-License-Identifier: GPL-3.0-only. The repository has no license file at its root. A Protofire build for you consists of contracts written for your assets and rules. If the build starts from Swarm's published dOTC code, your counsel clears the license before the work starts, because GPL-3.0 is a copyleft license.

When a dOTC build with Protofire does not fit

Three kinds of buyer need something other than a dOTC build from Protofire.

  • You want continuous liquidity, a pricing curve or market makers. A DEX pool provides those. A dOTC contract gives holders a place to trade, but it brings no counterparties.
  • Your chain is not an EVM chain. Protofire writes its dOTC contracts in Solidity.
  • You need someone to operate the venue, hold the license or run KYC. Protofire holds no license and no client funds or keys. Protofire does not operate the venue, is not a counterparty or a broker, and gives no legal opinion. Firms that you appoint fill those roles.

Our work on Swarm Markets

dOTC
block-trading contracts we contributed to

In 2021 Protofire built the DEX core and subgraph for Swarm Markets and contributed to its dOTC contracts. Swarm Markets was a BaFin-licensed DEX at launch where only KYC-verified wallets trade. Swarm held the license and ran KYC and permissioning.

Swarm MarketsView project

FAQ

What is a decentralized OTC (dOTC) contract for tokenized assets?
A decentralized OTC (dOTC) contract is a smart contract for block trades in a tokenized asset. One wallet posts an offer, and another wallet takes it at the offer's price, with no pool and no pricing curve. Protofire builds these contracts for tokenizers and issuers on the dOTC model it contributed to. The client sets the access rules.
Who can build a dOTC for a tokenizer or an issuer?
Protofire writes block-trading contracts for the client's assets, access rules and chain. In 2021 Protofire built the DEX core and subgraph for Swarm Markets and contributed to its dOTC contracts. The client operates the venue and runs KYC through a provider it appoints.
Where is the asset between an offer and a take?
In Swarm's open dOTC v2, an escrow contract holds the maker's asset between the offer and the take. The maker deposits the asset when making the offer. A take sends the taker's payment to the maker and releases the escrowed asset to the taker in one transaction (Swarm docs).
Does an OTC contract for tokenized assets need a license?
The operator of the venue may need a license. The answer depends on whether the contract brings together several third-party interests under rules. It also depends on whether the asset is classified as a financial instrument or a crypto-asset, and on the market. The operator's counsel and regulator decide. The provisions are MiFID II and MiCA in the EU and 17 CFR 240.3b-16(a) in the US.
Can an ERC-3643 token trade through a dOTC contract?
Yes, an ERC-3643 token can trade through a dOTC contract when each contract that holds or receives the token is a verified identity. So the escrow contract needs an identity with the required claims. Each wallet that receives the token must pass the token's own registry. A taker must also pass the offer's authorization contract. Protofire's ERC-3643 development service covers the permissioned token itself.
Can a dOTC guarantee liquidity or a price?
No, a dOTC contract cannot guarantee liquidity or a price. Whether trades happen depends on the participants. Protofire promises no liquidity, price, volume or return. A pricing band and a reference feed shape an offer, but they do not bring a counterparty.

Discussed on The Protocol Roundtable

All episodes

Get a proposal

Tell us what you are building. An engineer reads it, we have a short call, and the written proposal follows within one business day.

Luis MedeirosField CTO, reads every request · LinkedIn

A demo or repository link also works.