Turnkey decentralized exchange (DEX) development

A prototype exchange works in a test environment, but on the real market slippage, stuck orders, and failures under load appear. We design and develop DEX turnkey: we choose the trading mode, assemble contracts and interfaces, and support the launch. The client receives an exchange with predictable liquidity and a clear servicing procedure.

Blockchain Development Services

Frequently Asked Questions

Latest works

  • Development of a web application for FEEDME
    Development of a web application for FEEDME
    1375
  • Development of an online store for the company FURNORO
    Development of an online store for the company FURNORO
    1349
  • B2B Advance company logo design
    B2B Advance company logo design
    794
  • Development of a web application for Enviok
    Development of a web application for Enviok
    1087
  • AIDER company logo development
    AIDER company logo development
    1032
  • CRM development for Chasseurs
    CRM development for Chasseurs
    1129

DEX Development: Where an Exchange Prototype Breaks

An exchange prototype comes together quickly: a liquidity pool, swap mechanics, an interface. It breaks not during a demo, but at the first real volumes — and in three places at once: thin liquidity, the transaction queue, and an unprotected settlement layer.

Thin liquidity. When a pool holds few funds, a large order moves the price: slippage grows, arbitrage drains the remainder, and the user leaves for a competitor.

Decentralized exchange development starts not with the storefront, but with the price model — how it is calculated when the pool becomes imbalanced, what limits are placed on trade size, and what happens during a sharp withdrawal of funds.

Transaction queue. While an order waits to be included in a block, everyone can see it. The execution order determines who profits from the price difference and who gets the worse price.

Without explicit rules — slippage limits, protection against repeated execution, and a well-designed sequence of operations — the exchange feeds those who read the queue faster, not its own users.

Settlement layer. An error in administrator rights or in withdrawal logic cannot be rolled back — it is recorded forever.

That is why the settlement layer is designed before the interface: separation of privileges and multisignature, daily withdrawal limits, contract pausing, and verifiable upgrades without loss of state.

Below, we break down how each of these areas is covered in a working exchange.

What Changes After Launch: Speed, Liquidity, Failures

Before launch, metrics look abstract; after, they turn into four numbers that reveal the exchange’s condition: trade execution time, liquidity depth, resilience to peak load, and price slippage.

We capture them from the first weeks of operation and keep them as a benchmark for every contract change — this way, regression is visible before traders notice it.

Trade execution time consists of the user’s signature, the route between pools, and network confirmation.

The routing module splits a large order into parts and routes it through several pools with different depth: the trade goes through with less price movement, and execution fits into a single block instead of a chain of sequential swaps. Price slippage is calculated in advance and shown to the user before signing, not after.

Liquidity depth is not only the sum in the pool, but also its distribution across price ranges. Concentrated liquidity keeps density around the current mark, so a comparable volume passes with less slippage than in a uniform pool.

Separately, we look at how depth changes under a stream of arbitrage trades: a stable spread attracts liquidity providers, while its widening is a signal that fee parameters are set incorrectly.

We test resilience to peak load by running it, not by reasoning: we emulate a multiple increase in the number of orders, monitor queues, retries, and confirmation order. The key is idempotency: resubmission must not lead to double debiting.

The share of stuck operations where debiting and crediting diverged is reduced to zero — such cases are treated as an incident, not as a “network quirk.”

Contracts are built and deployed on Ethereum and compatible networks; logic is moved into verifiable modules with invariant tests: preservation of reserve totals, no withdrawal of funds bypassing the pool, and correct refund on cancellation.

Metrics are captured from contract events and external monitoring, so the report shows not “it got better,” but specific trade time and the share of rejected orders at peak.

Trading Modes: Liquidity Pool vs. Order Book

The trading mode determines where the price comes from and who holds liquidity: a pool calculates it with an automated pricing formula, while a book uses opposing orders from participants.

An error at this level cannot be fixed with interface settings: changing the mode after launch means rewriting the settlement core and re-auditing the contracts.

Option When It Fits Limitations
Liquidity pool A new asset without a circle of market makers, a long tail of pairs Slippage on large volumes, provider losses during sharp movements
Order book Pairs with high trade frequency and professional participants Requires market makers and depth support from day one
Hybrid scheme Book for large orders, pool as depth insurance More complex settlement layer, more expensive audit and scenario testing
Auction mode Listings, offerings, illiquid assets No continuous trading, price recalculated once per interval

A hybrid scheme is viable when the modes share a common settlement layer and a unified balance accounting: otherwise the price difference between the pool and the book turns into arbitrage against users.

We choose modes based on the asset profile and participant composition, not on “trendiness,” and immediately build in the ability to switch between them without rewriting the core.

Auction mode is often the first stage of a listing — it collects orders into an interval and provides a fair starting price, after which the asset is moved to a pool or book.

DEX Development Process: From Design to Launch

We fix the work order before the start: it determines at which step external audit is engaged, where you get access to the repository, and when the test network appears.

Below are the implementation stages that turnkey exchange design goes through, with a verifiable result at each boundary.

  1. Requirements analysis. Trading model — liquidity pools or an order book, list of pairs, fee scheme, roles and permissions, client verification requirements, target networks.
  2. Exchange design. Contract scheme: core, pool, router, treasury; separation of permissions; price sources; limits on volume and slippage; fee economics.
  3. Build. Contracts, wallet, interface, event indexer, and API — on a unified storage scheme so data does not diverge between layers.
  4. Contract verification. Unit and fuzzing tests, run on mainnet state, load scenarios, external audit, and re-check after edits.
  5. Testnet pilot. Limited group, test pairs, simulation of oracle failure and forced position closures, monitoring, and alerts.
  6. Launch. Gradual limits, liquidity migration, key management via multisignature, incident response procedure.
  7. Project handover. Repository, diagrams, documentation, contract upgrade instructions, training for your team.

Project Artifacts: Configurations, Diagrams, Procedures

We deliver the project not as a “working product,” but as a complete package with which your team can develop the exchange without us.

Everything listed resides in the project repository and documentation, not in chat — during acceptance, we go through the list together and verify each item in a clean environment.

  • Contract source code with comments on key invariants, tests for swaps, adding and removing liquidity, and build configs — the project builds and passes tests from scratch.
  • Architecture diagram: movement of funds between the pool, router, and user wallet, external dependencies such as oracles and aggregators, the role of each contract and the boundaries of its authority.
  • Description of protocol parameters with permissible boundaries: fee, trade limits, thresholds for protective mechanisms — where they change and what they affect.
  • Access policies: who and with which role changes parameters, upgrades contracts, withdraws funds; multisignature scheme, quorum, and distribution of keys among responsible parties.
  • Incident procedure: how an anomaly is recorded, who decides to pause trading, the stopping procedure, notifications to liquidity holders, and root cause analysis.
  • Upgrade instructions: release preparation, change verification, state migration, post-deployment control, and rollback point to the previous version.
  • Security review report with a list of findings and the closure status of each, plus access to monitoring of liquidity, volumes, and call errors.

We hand over the package in a single session with your team — so that support and the next release do not depend on us.

Case Study: How Slippage Was Removed in a Thin Market

A team came to us that had launched a decentralized exchange in a pair with an asset whose turnover is several times smaller than on major venues.

Trades went through, and the contracts had been audited — but an order of average size for the venue moved the price by 4-6%, and arbitrage bots drained the difference between pools faster than liquidity providers could react.

A scheme with uniform liquidity distribution across the entire curve — the approach that Uniswap established for the market — works against the venue in a thin market: capital sits in ranges the price never reaches, while the tradable portion remains too thin.

What We Changed

Liquidity was reassembled into narrow ranges around the actual price instead of a uniform spread across the entire curve — depth at working levels tripled with the same amount of deposited funds.

We added a price oracle and a limit on trade size within a single block: a single large dump no longer moves the quote across the entire pool. The fee was made dynamic — low in calm mode and rising during a volatility spike.

The Outcome

Metric Before After
Slippage on a typical order 4-6% 0.3-0.8%
Pool depth in the working range thin three times higher
Share of volume in arbitrage trades the majority a few percent
Trade failures during volatility spikes regular isolated

A manipulative dump that previously paid for itself within a few trades now hits the size limit and the rising fee — the economics of this class of attacks no longer add up.

What If the Exchange Is Already Launched on Another Stack?

First, we analyze exactly what is unsatisfactory in the current solution — settlement speed, lack of routing between pools, limitations on order types. Often the core works and does not need to be touched; it is enough to close specific gaps.

A full exchange migration is justified when the contracts are closed to changes or there is no access to administrative functions.

A layer on top of the solution is the fastest path: we keep the current contracts and add a layer that reads events and closes gaps — a route aggregator, a trade history indexer, a limit order module. Trading does not stop.

The main thing is to prevent state divergence: operations must be idempotent, and balance reconciliation runs on every settlement cycle.

Liquidity migration is the most sensitive part: pools live on the old contracts, and providers hold share tokens.

We transfer them with a transition contract: it accepts the old share token and issues a new one at the current rate, while parallel pools are supported by a shared rewards program so liquidity does not leave at the moment of switching. We keep the price curve and depth continuous — a price gap costs more than the migration itself.

Gradual replacement of components goes through compatibility adapters: the router first moves a small share of the flow to the new module, then it is increased as calculations match the previous ones. Any stage can be rolled back by switching the route, and state is not lost.

The choice of scenario is determined by access to administrative functions, the ability to export state, and the availability of an audit of the previous code — we check this before assessment.

Security Concerns: Contract and Key Audits

Contract audit is not a one-time check before launch, but part of the development cycle.

We run the logic through static analyzers, then engineers manually review execution paths: reentrancy, price oracle manipulation, overflows, and separation of permissions for administrative functions.

The output is a report with risk classes and reproducible scenarios: it shows exactly what breaks and under what conditions. We build base modules from vetted sets such as OpenZeppelin rather than writing cryptography from scratch.

Key storage is based on separation of powers: the administrator key does not sit in a single wallet and does not belong to one person.

The hot perimeter signs routine operations, the cold one — logic upgrades and withdrawal of funds, and threshold signatures require agreement from several participants. Compromise of a single device does not provide access to reserves.

Can logic be changed after launch?

Yes, through a proxy contract with a timelock: the change is first published, then applied, and users have a window to withdraw funds. State is transferred by a separate migration script, tested in a test environment.

What happens during a key leak or incident?

Mechanisms for stopping operations and an incident response procedure are built in advance: who makes the decision, how keys are rotated, and how the timeline is recorded. This reduces response time from hours to minutes — before an attack withdraws funds.

Let’s Discuss the Task: What to Send for Assessment

To come back with an assessment and work plan, rather than general wording, we need inputs on the product and constraints. Describe the task in free form — we will clarify the missing details on a call with the engineers who will lead the project.

  • Network and liquidity model: one chain or several, constant product pools, concentrated liquidity, or an order book.
  • Protocol economics: whether a native token is needed, how fees are distributed, whether there are incentives for liquidity providers.
  • Price sources and routing: external oracles, swap aggregation, quote accuracy requirements, and slippage protection.
  • What already exists: prototype, contracts, interface design, completed audit — or starting from scratch.
  • Access and governance: multisignature, administrator roles, contract upgrade procedure without stopping trading.
  • Restrictions on users and jurisdictions that affect the architecture and the wallet connection interface.
  • Expected launch order: testnet, limited launch with a narrow group, public.

Based on these inputs, we assemble the team composition — a contract engineer, an interface and wallet connection developer, a node infrastructure engineer, and a security specialist — and come back with an assessment and a stage-by-stage work plan. Describe the task: we will come back with an assessment and plan.