DEV Community

Typelex
Typelex

Posted on

Address-Specific OTC Orders: A Simpler Way to Settle Private On-Chain Deals

Public DEXs are designed for open trading.

A user selects two assets, accesses shared liquidity, and receives a price calculated during execution.

But some transactions are not meant for the open market.

A project may sell tokens to a specific investor. A DAO may exchange treasury assets with an approved partner. Two funds may agree on a private stablecoin swap.

In these cases, the participants already know the counterparty, assets, amounts, and exchange rate.

Typelex converts those negotiated terms into an address-specific on-chain OTC order.

The Problem With Open Orders

Not every offer should be available to every wallet.

Consider a private token allocation:

the project has selected an investor;
both sides have agreed on the price;
the receiving wallet is already known;
the allocation is not intended for the public market.

Publishing this transaction as an unrestricted order creates unnecessary risk.

Another wallet could attempt to execute it, even though the agreement was made with a specific participant.

Typelex solves this by connecting the order to an authorized wallet address.

What the Order Defines

A Typelex OTC order can include:

the token offered by the maker;
the token expected in return;
the amount of each asset;
the fixed exchange rate;
the authorized counterparty;
the expiration time.

The smart contract does not negotiate or recalculate these conditions.

Its role is much simpler:

Verify the order and execute it exactly as agreed.

Wallet-Level Access Control

When a user attempts to fill the order, the contract checks the sender’s wallet.

Conceptually, the validation may look like this:

require(
msg.sender == authorizedCounterparty,
"Unauthorized wallet"
);

The actual implementation may differ, but the principle remains the same:

An on-chain order can be publicly visible without being publicly executable.

A wallet that is not included in the order cannot complete the transaction.

Fixed Terms, Not Dynamic Quotes

An AMM calculates the exchange result from current liquidity.

A Typelex OTC order starts with a result that has already been agreed.

For example:

Maker provides: Token A
Counterparty provides: Token B
Rate: Fixed before execution
Authorized wallet: Defined in the order
Expiration: Defined in the order

The amounts do not automatically change because:

another transaction was processed first;
liquidity moved in an external pool;
an aggregator selected a new route;
the market price changed before confirmation.

When the original terms can no longer be completed, the transaction is rejected or the order expires.

The contract does not replace the agreement with a different quote.

Both Transfers Happen Together

Access control alone is not enough.

The settlement must also ensure that one participant cannot receive assets while the other side gets nothing.

Typelex uses atomic execution.

There are only two possible results:

Both transfers are completed.
The entire transaction is reverted.

Before execution, the contract can verify:

wallet authorization;
token balances;
transfer approvals;
order status;
expiration time;
exact token amounts.

There is no partial settlement and no need to decide which participant should transfer first.

Negotiation Happens Off-Chain, Settlement Happens On-Chain

Typelex separates the deal into two stages.

  1. Negotiation

The participants agree on:

assets;
volume;
rate;
wallet addresses;
execution period.

This can happen through an RFQ workflow, private communication channel, DAO decision, or existing business relationship.

  1. Settlement

The agreed parameters are added to the on-chain order.

The smart contract then verifies the conditions and coordinates both transfers.

Participants define the deal. Typelex enforces the settlement logic.

Why Public Liquidity Is Not Required

The price has already been agreed, so the transaction does not need to search for liquidity inside an AMM.

The assets come directly from the participating wallets.

This avoids dependence on:

public pool depth;
intermediary tokens;
multi-hop routing;
dynamic AMM pricing;
several external liquidity venues.

The settlement remains recorded on-chain, but the exchange does not need to be executed as a public-market swap.

Where Address-Specific Orders Can Be Used
Strategic token allocations

Projects can create orders for selected investors or partners.

DAO treasury operations

A DAO can exchange assets with an approved counterparty under predefined terms.

Stablecoin rebalancing

Two participants can settle a direct stablecoin exchange without routing the transaction through public pools.

Fund and market maker settlement

Previously negotiated transactions can be completed between approved wallets.

Private token sales

A large holder can transfer an allocation directly to a specific buyer.

Non-Custodial Execution

Typelex does not require users to keep assets on a shared platform balance.

Participants connect their own wallets and approve the necessary transfers themselves.

The protocol does not need to:

hold private keys;
approve withdrawals manually;
maintain internal user balances;
decide which participant should send first;
release funds through a human operator.

The transaction result is determined by the order parameters and smart contract logic.

Final Takeaway

Not every on-chain deal should be open to the entire market.

Some transactions are created for specific participants under previously agreed conditions.

Typelex turns those agreements into fixed-rate, address-specific OTC orders.

The contract verifies the authorized wallet, checks the transaction parameters, and executes both transfers atomically.

Private negotiation. Defined counterparty. Transparent on-chain settlement.

Top comments (0)