DEX
Manifesto · Version 1.0 · Beta

Size should not be a penalty.

A liquidity pool charges you for being large. Every unit of a block trade walks the same curve, so the last token you sell prints far below the first, and the chart tells the whole market you panicked. OTCDEX settles the block instead: one agreed price, escrowed on chain, atomic at the end. This paper explains the arithmetic, the program, and the standard we think memecoin trading should move to.

01Summary

Abstract

Automated market makers solved the cold-start problem for long-tail tokens and, in doing so, made one number the price of everything: reserve depth. A constant-product pool quotes a marginal price, not a clearing price. Trade small and the difference is noise. Trade size and the difference becomes the dominant cost of the transaction, larger than fees, larger than spread, often larger than a week of the position's carry.

OTCDEX is an on-chain over-the-counter venue for Solana tokens. A holder posts an ask: a mint, a size, a price, an expiry. The tokens move into a program-owned vault. A buyer fills any slice of that order and, in a single transaction, quote goes to the seller, tokens go to the buyer, and the venue fee goes to the treasury. No pool is touched, so nothing is dragged along a curve and no reserve is depleted.

Price impact
0%
The fill price is the posted price
Venue fee
0.30%
0.15% buyer, 0.15% seller
Custody
Escrow PDA
No admin key can move funds
Settlement
Atomic
All legs land or none do
02Origin

Why we built it

The idea did not come from a design document. It came from a tape. During the $CATE flash crash, a single holder sold a block worth roughly 1.4% of supply into a pool holding roughly 4% of the market cap. The seller had no intention of moving the market: they had one position and one exit. The pool priced every token they sold further down the curve, and the print landed about 45% below where the resting interest actually was.

$CATE1m · pool route
−45.1%
one holder exitstimeline fills with "rug?"unrelated holders sell the candlepre-blockwick lowsettled
Block size
1.4% of supply
Pool depth
~4% of mcap
Print vs book
−45%
Recovered in 6h
62% of pre
Figure 1.A block sale through a pool leaves a wick that looks like an exit, then the wick becomes the story.

What happened next is the part that matters. The candle became the news. Holders who had never seen the seller's wallet read the chart as insider distribution and sold into the same thin book. The mechanical cost of routing size through a pool manufactured the fear that then justified itself. Within hours, the token traded back most of the way up, which is the clearest possible evidence that the crash was liquidity structure and not information.

The bug is the venue, not the seller
A seller who wants out should be able to find a buyer who wants in, agree on a number, and be done. Nothing about that trade requires broadcasting a 45% wick to the entire market.
03Mechanics

A pool charges you for being large

A constant-product pool holds reserves R of the token and Q of the quote asset, and preserves R × Q. Selling X tokens returns quote equal to Q × X / (R + X). Divide by the spot price Q / R and the average fill you actually receive is:

fill / spot  =  R / (R + X)
loss         =  X / (R + X)        (fraction of value given up)
value lost   =  spot * X^2 / (R + X)

The second line is the whole argument. Loss is a function of your size relative to the pool, and it grows without bound. Sell an amount equal to a quarter of the token reserve and you hand over 20% of the value before fees. Sell half the reserve and you hand over a third. There is no routing trick that removes this term, because it is not a fee: it is the definition of the curve.

Realized price against size
pool OTC
100%90%80%70%60%9.1%20.0%33.3%0%15%30%45%60%trade size as a share of pool token reserve
Figure 2.Realized price against size. The shaded wedge is value the curve keeps. The blue line is what an agreed OTC price looks like at any size.
Size vs token reserveRealized priceValue given upOn a $250k sale
1%99.01%0.99%$2,475
5%95.24%4.76%$11,900
10%90.91%9.09%$22,725
25%80.00%20.00%$50,000
50%66.67%33.33%$83,325

Constant product, fees excluded. Real routes split across pools, which softens the number but never removes the term.

04Case study

Worked example: Fartcoin

Take a liquid, well-known memecoin rather than a thin one, so the comparison is generous to the pool. A holder wants to sell $250,000 of Fartcoin. Aggregated routes show a few million dollars of usable two-sided depth near spot, which sounds like plenty until the order is priced along the curve.

RouteNotionalCost of routingReceivedChart footprint
Pool, single click$250,000Impact plus swap fees≈ $236,900Visible wick
Pool, TWAP over 4h$250,000Impact plus 4h of drift≈ $243,000Sustained sell pressure
OTCDEX, one fill$250,0000.15% venue fee$249,625None

Illustrative. The venue fee is deterministic, impact is not.

The pool route is not merely more expensive. It is uncertain: the seller learns the true cost after the transaction lands. On OTCDEX the seller sets the number, the buyer accepts the number, and the only variable left is whether someone takes the other side.

05Interactive

Price the trade yourself

Set a size and a pool depth. The calculator applies the same constant-product arithmetic as above, then shows the same trade settled at an agreed price with the venue fee applied.

Pool depth as share of market cap6.0%

Most memecoins keep 3% to 8% of their market cap in the pool. Thinner pools punish size harder.

Price impact selling through the pool
16.56%
$41,391 of your $250,000 evaporates into the curve
Pool quote reserve$1,260,000
Value lost pushing price down$41,391
Cost on OTCDEX (0.15% your side)$375.00
You keep
$41,016
Figure 3.Live comparison. Both sides use the formulas printed in section 3, no adjustments.
06Design

Design principles

PrincipleWhat it rules out
One price for the whole blockCurve pricing, hidden slippage, quotes that change between preview and signature
Non-custodial escrowDeposits into an operator wallet, withdrawal queues, admin keys over user funds
Atomic settlementTrust-me-bro sequencing where one leg lands and the other does not
Partial fills are first-classAll-or-nothing blocks that only whales can clear
Read state from chain, never from usAn indexer that can lie about the book, since every order is verifiable on chain
Open source and reproducible buildsA program binary nobody outside the team can check
Verifiable by construction
The deployed program hash is published through OtterSec's verified build service, so anyone can confirm the on-chain bytecode matches the public source before trusting it with a block.
07Protocol

How settlement works

An order is a small account owned by the program: mint, quote mint, remaining size, price, expiry, maker, and an optional price authority. Funding it moves the maker's side into a vault the program controls. From that moment the maker cannot spend those tokens elsewhere, and neither can anyone else.

step 1
Order created

Maker signs one instruction with mint, size, price and expiry. No counterparty yet.

create_ask
step 2
Escrow funded

Tokens move into a program-owned vault. The maker keeps the right to cancel, not the right to spend.

vault PDA
step 3
Taker fills

Taker sends quote for any slice up to the remaining size. Partial fills are first-class.

fill
step 4
Atomic swap

Quote to maker, tokens to taker, fee to treasury, in one transaction. Either all of it lands or none of it does.

settled
Custody: the vault is a program derived address. No admin key can move escrowed funds, and an expired order can always be reclaimed by its maker.
Figure 4.One fill, four steps. Custody changes exactly once, inside a single transaction.

Both directions exist. An ask escrows tokens and waits for quote. A bid escrows quote and waits for tokens, which lets a buyer advertise real, funded demand rather than an intention. When an ask and a bid cross, the fill settles at the resting order's price, so whoever posted first is never worse off than they asked for. When the crossing price is better than the taker asked for, the improvement is surfaced explicitly in fill history: you asked 1.00, you got 1.11.

08Pricing

Orders that track the market

A market-tracked order stores no price. It stores its maker's offset, such as 2% under market, and reads the AMM pool inside the transaction that settles the fill. Nothing is written when the market moves, no stored number can go stale, and no keeper maintains it. The order executes at the pool's marginal price without walking up its curve, so its advantage over the same pool grows with trade size.

Both sides resolve through the same formula and neither references the other. A tracked ask and a tracked bid on one token, both at zero offset, quote the identical pool price, so the book shows no spread at all. What remains between the two is the protocol fee: 0.15% on each side of a fill.

Every tracked order requires a bound, capped at 25% from the maker's reference price: a floor the seller will not sell below, a ceiling the buyer will not pay above. That bound is the maker's protection because the venue reads the pool exactly as it finds it, and a pool can move inside one block. A pool is accepted only when its owning program, account length, and discriminator exactly match. An upstream layout change therefore pauses tracked fills instead of risking a wrong price.

Fixed-price orders may still delegate updates to a price authority within a signed band. Market-tracked orders do not use that mechanism on either side.

09Execution

Sweeping a ladder

Blocks rarely rest as one order. The swap screen takes a budget, walks the resting asks from cheapest upward, and returns the exact token amount, blended price, and number of transactions before anything is signed. Because every leg is a discrete fill at a posted price, the blended number is arithmetic rather than a prediction.

Ask ladderbudget 8,000 USDC
0.8421,200,000 tokensfilled
0.8512,500,000 tokensfilled
0.8583,000,000 tokensfilled
0.8694,000,000 tokenspartial
0.8842,000,000 tokensuntouched
Batches
2
Tokens out
8,380,000
Blended price
0.8558
Figure 5.A budget consuming three full orders and part of a fourth. The last order is left untouched, not partially guessed.

If a sweep needs more instructions than fit in one transaction, it is batched and the progress of each batch is reported. A batch that fails leaves the orders it did not touch exactly as they were.

10Economics

Fees and revenue

The venue charges 0.30% per fill at the current rate, 0.15% per side. The fee is a config value the admin can change, it is visible in the preview before signing, and it is the only cost the venue imposes: there is no spread, no maker rebate, no priority tier.

0.30% total, charged once per fill
Buyer 0.15%
Seller 0.15%

The buyer pays exactly the listed price and receives 0.15% fewer tokens. The seller receives 0.15% less quote than the notional. Neither side pays a spread on top.

Revenue allocation
Buyback & burn50%

Half of all venue revenue buys $OTC on the open market and burns it, once every day at a random time.

Development25%

Program audits, indexer infrastructure, new settlement features.

Team15%

Core contributors building and operating the venue.

Partners & investors10%

Market makers, integrations and early backers.

Figure 6.Fee split per fill, and what the treasury does with it.
Why buyback and burn
Venue revenue scales with settled size, not with speculation. Routing half of it into open-market buybacks ties $OTC supply to real usage, and burning the proceeds keeps the link mechanical instead of discretionary.
11Risk surface

Token safety, stated plainly

Removing price impact does not remove counterparty risk in the asset itself. Every listing is checked against mint-level facts and the result is shown on the order, not buried:

SignalWhat it means for a buyer
Mint authority liveSupply can still be printed. Any valuation is provisional.
Freeze authority liveYour token account can be frozen after settlement.
Transfer fee extensionEvery transfer, including yours, pays the mint owner.
Transfer hookArbitrary program logic runs on transfer. Treat as unvetted.
Thin floatThe block you are buying may be a large share of tradable supply.

Warnings are derived from on-chain mint state at read time, not from a curated allowlist.

The venue is neutral
OTCDEX does not endorse a token by listing it. Anyone can post an order for any mint. Read the badges before you take the other side.
12Token

$OTC

$OTC is the venue token: six decimals, fixed maximum supply, with mint and freeze authorities revoked at launch. Revenue allocation is the mechanism described in section 10. There is no fee discount, no staking lock, and no governance theatre attached to it.

Live supply, burn history and treasury flow are published on the token page rather than in this document, because they change daily and a paper should not pretend otherwise.

13Thesis

A new standard for size

Equities never asked institutions to route blocks through the visible book. Upstairs desks, crossing networks and negotiated prints exist because moving size through a continuous market is a tax on the mover and noise for everyone else. Crypto skipped that layer and went straight to a single pooled venue for every trade at every size.

We think the missing layer is not a private club. It is a public program: anyone can post, anyone can fill, prices are visible, custody belongs to the maker until the instant of settlement, and the arithmetic is printed on the screen. Small trades belong in a pool. Blocks belong here.

Trade size. Skip the price impact.

14Disclosure

Risk and status

OTCDEX is live on mainnet and labelled beta. The program is open source and covered by a reproducible build; audits and coverage are tracked publicly on the roadmap. Per-order value limits and expiry bounds are enforced both in the interface and in the program while the venue matures.

Nothing here is investment advice. Smart contracts can contain defects, memecoins can go to zero for reasons that have nothing to do with execution quality, and an escrowed order that nobody fills simply expires and returns to you. Size your trades accordingly.

OTCDEX · Whitepaper v1.0RoadmapDocumentationotcdex.app